Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does anyone know how to setup sendmail for multiple domains?
The only thing I find in the Sendmail book I have is for doamin masquerading for the same domain (i.e. mail.yourdomain.com to mail2.yourdomain.com)
I have registered multiple doamins and want to host all of them on the same box and IP. The Primary domain email works fine, but I can't get the second or third domains email setup. I am not sure where to start. I have used Linuxconf in the past, but Sendmail.org techs say that linuxconf isn't supported by Sendmail and everytime I try to use it, it messes up by relay-domain access.
That will be easy enough. Are you sure about this, though? Have you tried it? It seems like everytime I touch the box and fix one thing, something else freezes up. Its probably me....I think I am jinxed.
On my box (redhat 6.2) there's actually a sendmail.cw file, you may want to look into this option. The contents of the file look like this:
domain1.com
domain2.com
After this you may also have to set up the virtual user table in /etc/mail before you can start receiving your virtually hosted emails.
Good Luck
Originally posted by kc5hwb Please pardon my stupidity, but I went into the sendmail.cf file and there are no "Cw" entries. There are 2 entries at the bottom for
Cg aints.net
Cg fortnerroundup.com
Are these Cg extensions the same as Cw? Should I go ahead and add Cw also?
Stupidity would be to not ask the question!!
Well... I have read the following and recon that in your case Cg will be the same as my Cw. It looks like the 'C' directive just defines a class that is used later in your config, hence you could call it just about anything you want so long as you call it that all the way through the sendmail.cf file. Heres what I read:
Quote:
Originally from O'Reilly's Sendmail book (ISBN 1-56592-222-0, 1050 pages) 12. Class
Contents:
The Class Command
The File Form of Class
Things to Try
In rule sets, it is often advantageous to compare individual
tokens to multiple strings in determining a match.
For example, consider the rules developed
in the last chapter, that is, the sender rewriting rules from
the hub delivery agent's S=Hubset rule set:
SHubset # Rewrite the sender for the hub
R$- $@ $1@${HUB} user -> user@hub
R$-@$w $@ $1@${HUB} user@local -> user@hub
The second rule's LHS looks for any sender address
that is composed of a single username followed by an @
character and ending with the short name of the local machine ($w).
Such an address is rewritten by the RHS to become that of
the central forwarding machine, defined by the {HUB} macro.
Now suppose that the local machine is known by several names in
addition to the short name in $w. All machines,
for example, have a short name (such as here) and a fully qualified name (such as here.us.edu).
They also often refer to themselves as localhost.
In addition, some machines can play special roles at a site (such
as having a printer or containing a central directory of fonts) and
might have another name appropriate to that role.
To convert any sender address so that
it becomes the central forwarder's name, no matter what the local host's
name, you can use sendmail classes.
In this chapter we will cover the class configuration command
and its cousin, the file configuration command.
Proper use of the class and file commands allows
you to replace many rules with a single rule.
12.1 The Class Command The class command declares a macro whose value is a list of strings.
Rule sets may then compare the workspace to that list of strings.
One such
list could be a list of names by which the local machine is known. A class is referenced in the LHS with the $=
prefix:
$=X single-character name
$={XXX} multicharacter name (beginning with V8.7) Here, X is a single-character class name.
Beginning with V8.7 sendmail, multicharacter class name may be
used, as shown in the second line above.
Multicharacter class names must always be enclosed in
curly braces.
The workspace is tokenized as usual; then the appropriate
token is looked up to see whether it was defined as belonging
to the class referenced by $=. If the token was
found, the workspace at that point is considered to be matched.
We'll cover this in more detail shortly.
12.1.1 Declaring a Class The words that form the list of words in a class are declared with the C configuration command.
The form for the class configuration command is as follows:
CXlist single-character name
C{XXX}list multicharacter name (beginning with V8.7) The class configuration command starts with the letter
C, which must begin a line. The C is immediately followed
(with no intervening whitespace) by the name of that class.
A class name can be a single ASCII character
or, beginning with V8.7 sendmail,
multiple ASCII characters enclosed in curly braces.
A whitespace-separated list of word elements follows
on the same line. Space between the name and the list
is optional.
For example, the following declaration places two possible
names for the local machine into the class named w:
Cw printer1 fontserver
Multiple declarations of the same class macro may exist.
Each appends its word elements to the preceding list. For example,
the following produces the same result as the single line above:
Cw printer1
Cw fontserver
Both examples define a class named w, and both assign to
that class the same list of two words
Ok, thats done. How do I create the user account? I want webmaster@fortnerroundup.com. Where would I go to create this? This is not the primary domain on the account, this is the virtual domain that I added to the sendmail.cf file. I do not have a sendmail.cw file.
You simply create a normal user called webmaster. The incomming domain won't make any difference. I'm not sure how you will deal with the clashes of names though, say you wanted webmaster@domeDomain.com and webmaster@anotherDomain.com both on the same machine. But if they're all going to the same person then its not a problem. Theres gotta be a way to do it. I'll have a little investigate for you.
Yes, one of my problems before is that I had a webmaster account for more than one domain...the primary domain worked fine, but I never could log into the secondary one. Thanks for all your help....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.