[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IP Based Virtual Hosting



> >Now, to take things a step further. I need to setup virtual FTP
> >and Sendmail. So, let's say there are 2 domains hosted on the
> >server VIRT1.COM with a DocumentRoot of /virtual/virt1.com AND
> >VIRT2.COM with a DocumentRoot of /virtual/virt2.com. Now user
> >'joeblow' (from virt1.com) ftp's into the server to manipulate some web
> >files.
> >Instead of dropping joeblow into ~joeblow - I need it to
> >drop him into /virtual/virt1.com.
> >
> >Also, let's say the sales department of both virt1.com and virt2.com
> >want the e-mail alias 'sales'. One of them would be out of luck -
> >as only one alias would be possible - unless there was a virtual
> >sendmail setup - each virtual with their own aliases and passwd.
> >
> >Anyone know anything about this?
> Yes.
> 
> It's possible to alias user names in sendmail; in Red Hat there's an /etc/alias
> file.

Not to be picky, but the filename is:   /etc/aliases
and remember to run the command "newaliases" after you make changes.

> It's also possible to configure sendmail to handle multiple domains, but I have
> not gone there yet.  Configuring sendmail has been known to drive people right
> off the deep end, but it's possible to get sendmail to do all sorts of neat
> tricks. This would best be done gently, by looking at the existing sendmail.cf
> file in /etc
> 
> Seems that telnet and some other services would go to the "right" place as a
> result of DNS, but it's no clear how to do the same logon name to a host with
> two different domains.

You can easily configure sendmail to accept mail for multiple domains.
just add the domain names to:  /etc/sendmail.cw

As far as "virtual hosting" with sendmail, I don't know any easy way
to do that.  You could probably reprogram the sendmail.cf file to
handle it, but sendmail programming is very cryptic and difficult.

It would probably be easier to program procmail to separate out 
the different domains and forward them to the correct recipient.
Personally, I've never used procmail, so I can't help you there.
(that's what I'd try first, if it was me)

> Perhaps one of the network admins here can chime in?

Ding dong.   :{)

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------