On Thu May 11 2000 at 02:17, "andy may" wrote:
> Hello List,
>
> I am new to this list, so I apologize if this topic has already been
> covered or if it is off-topic for the list.
> My question is this:
>
> I own a redhad 5.0 server and am using it for virtual hosting. When the
Here you are talking about virtual web servers...
> virtual sites send email, I noticed that the headers contained the IP and
> domain of the machine, not the actual virtual site. I basically have a
Here you are talking about virtual *mail* servers.
> class c that is routed to the IP of my server, so I can use them how I
> please(each user gets one). I would like the headers of the virtual site's
> outgoing mail to have the it's IP and domain name, and NOT show the IP or
> domain of the machine.
>
> Can anyone tell me how to do this?
Tricky, but possible. And possible to do either on the same or a
different box.
You MUST have control over the DNS. Since you are virtual
hosting, I assume that this is the case (either directly or
indirectly). What you do with the DNS is the key to getting this
working for email as well as virtual web hosting.
Set up the DNS so that there are MX records for all the virtual
domains, and they all point to the IP address of your mail server.
All MX hosts MUST be `A' record names, not CNAMEs.
(If you don't know what I'm talking about here, then you are out
of your league... read the DNS howto and all the docs you can
find).
Do NOT configure sendmail to do any domain masquerading at all for
outgoing email.
Do configure it to know about which domains it is to accept email
for (usually in the /etc{/mail,}/sendmail.cw file. Also add it to
the /etc/mail/access list for relaying.
Configure sendmail with `genericstable' to allow remapping of
sender addresses for outgoing email (which can be VERY handy).
Also configure it with `virtusertable' and `mailertable' to allow
control over where incoming email will go. This allows you
(through email aliases and virtusertables) to allow email to, say,
[EMAIL PROTECTED] and [EMAIL PROTECTED] to go to two
different places - even if there is a local user `bob'.
Go to:
http://www.sendmail.org
and follow any links you can find that talk about hosting
multiple virtual domains. Read and follow carefully.
Get used to using .mc files with /usr/bin/m4 to create your
sendmail.cf file. It is the ONLY way to configure sendmail
properly... very rarely should /etc/sendmail.cf be hacked at
directly.
> The only things I came up with are these:
>
> 1) sendmail config
Bingo. That's where you do it.
> 2) multiple smtp servers on one machine (one for each IP - is this
> possible?)
No no no. Ugly, unnecessary. It's the sort of scheme microslop
engineers would come up with :-)
> 3) IP masquerading
No, that'll defeat the whole purpose of the virtual hosting. All
the web addresses point to the same IP address - the web server.
> I wouldnt know how to implement any of these ideas. Anyone out there have a
> clue? If you can point me in the right direction, this would solve a major
> dilema for me!
You are about to travel down a long windy bumpy - but interesting
- road. Sendmail is a mighty powerful beast, but it CAN be tamed.
I have our mail server handling email for about a dozen or so
different virtual domains (incoming, outgoing and relaying).
Everything you need to know is in the README file that comes with
the sendmail-cf configuration and at the sendmail web site.
Good luck.
Cheers
Tony
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
Tony Nugent <[EMAIL PROTECTED]> Systems Administrator, RHCE
GrowZone OnLine (a project of) GrowZone Development Network
POBox 475 Toowoomba Oueensland Australia 4350 Ph: 07 4637 8322
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-