[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: e-mail accounts per Virtual Hosts
Hi Ben,
> Can any one explain/point to how can I add new e-mail for my virtual
> hosts so they wont interfere with my existing mail.
I'm going to assume that you're using sendmail... I have no clue how to
do this in qmail or others. I'm also going to answer your question
generally, just incase anyone is interested in setting up vhosting from
scratch. (The actual answer you're looking for is at the bottom)
Firstly, in your domain m4 file, add the line:
FEATURE(virtusertable)dnl
and remake your sendmail.cf file. If you don't generate your config file
with m4, here are the relevant lines:
# Virtual user table (maps incoming users)
Kvirtuser hash -o /etc/virtusertable
After this update you need to have sendmail reload the config file...
killall -HUP sendmail
(or find the rid pid, etc.) The format of the virtusertable file is quite
simple, it's basically:
name@vhost.com recipient
so some examples:
dragon@otherhost.com dragon
hello@yourmother.com dragon@wastelands.net
@yourmother.com dragon
The last example means that any email to someone @yourmother.com not
matched in the lines above will be sent to local user dragon. And
finally, to actually answer your question:
@yourmother.com errno:nouser No such user here
This also catches any unmatched mails to this domain, but instead of
delivering to a particular user, bounces the message instead with 'No such
user'.
Good luck :)
------------------------------------------------------------------------
Gaven Cohen aka Kinslayer http://wastelands.net/
dragon@wastelands.net hkp://keys.pgp.com/0x2042AD07
freelance sysadmin/programmer linux, fantasy, female enthusiast
------------------------------------------------------------------------
RSA/1024: fingerprint 79 BC B3 3F E2 05 71 4B F7 C8 B2 45 EF 70 55 D1