LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-13-2001, 11:51 AM   #1
kc5hwb
Member
 
Registered: Jun 2001
Location: Grapevine, Texas
Distribution: Ubuntu 14.04, CentOS 7
Posts: 102

Rep: Reputation: 15
Sendmail


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.

Anyone have any ideas?
 
Old 07-13-2001, 12:21 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
I think you can just add another Cw line to your sendmail.cf file, such as
Code:
Cwlocalhost
Cwsomedomain.com
CwsomeOtherdomain.net
Cweven.more.domains.co.uk
Clearly you then need to ensure that your box is listed as the mail exchanger for the domains in your DNS.

HTH

Jamie...
 
Old 07-13-2001, 12:27 PM   #3
kc5hwb
Member
 
Registered: Jun 2001
Location: Grapevine, Texas
Distribution: Ubuntu 14.04, CentOS 7
Posts: 102

Original Poster
Rep: Reputation: 15
Exclamation Thanks

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.
 
Old 07-13-2001, 01:45 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
The cW lines just tell Sendmail what domains it is the mail exchanger for. So on my box I have the following:
Code:
Cwlocalhost
Cwj-harris.dircon.co.uk
Cwjharris.homeip.net
Cwmnemosyne.homeip.net
and can happily email to username@j-harris.dircon.co.uk, username@jharris.homeip.net, username@mnemosyne.homeip.net or username@localhost so yeah, I'm pretty sure!! I'll be interested in what error you get if it doesn't work, be sure to post some results back on this thread.

cheers

Jamie...
 
Old 07-13-2001, 02:21 PM   #5
kc5hwb
Member
 
Registered: Jun 2001
Location: Grapevine, Texas
Distribution: Ubuntu 14.04, CentOS 7
Posts: 102

Original Poster
Rep: Reputation: 15
Exclamation Thanks

Ok, thanks. 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?

Thanks
 
Old 07-13-2001, 02:52 PM   #6
stroh78
LQ Newbie
 
Registered: Dec 2000
Location: Buffalo, NY
Posts: 8

Rep: Reputation: 0
sendmail.cw

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
 
Old 07-13-2001, 03:06 PM   #7
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Re: Thanks

Quote:
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
cheers

Jamie...
 
Old 07-13-2001, 04:04 PM   #8
kc5hwb
Member
 
Registered: Jun 2001
Location: Grapevine, Texas
Distribution: Ubuntu 14.04, CentOS 7
Posts: 102

Original Poster
Rep: Reputation: 15
Thumbs up More...

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.
 
Old 07-13-2001, 04:10 PM   #9
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
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.

Jamie...
 
Old 07-16-2001, 12:23 PM   #10
kc5hwb
Member
 
Registered: Jun 2001
Location: Grapevine, Texas
Distribution: Ubuntu 14.04, CentOS 7
Posts: 102

Original Poster
Rep: Reputation: 15
Cool

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....
 
Old 07-16-2001, 01:57 PM   #11
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Just found this while reading up on Sendmail for my own use, thought it might interest you.

http://www.sendmail.org/virtual-hosting.html

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail ignores my sendmail smarthost entry Paul_assheton Linux - General 1 03-17-2009 07:55 AM
FC4 and Sendmail - Cannot create sendmail.pem Balderayne Linux - Security 2 11-09-2005 02:55 PM
php+ sendmail no good - python + sendmail ok nephish Linux - Networking 1 10-07-2005 01:19 PM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 11:47 AM
sendmail (dont just ignore it 'cause its got sendmail in the subject :P) GnomeKing Linux - Networking 1 11-12-2001 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration