[ale] Qmail: adding accounts

Greg Sabino Mullane greg at turnstep.com
Tue Oct 19 19:02:38 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
 
> Can someone explain how to add accounts to a Qmail system that supports
> virtual hosting in a step-by-step command-line-oriented manner?  E.g.,
> there are many domains supported by the one Linux system with a single
> IP address for multiple domains.  The email is picked up by some users
> with POP/IMAP and is forwarded automatically by others.
 
Assuming that you have a domain name "werebear.com". If you've never
used that domain before, you probably want to add it to your "rcpthosts"
file in your qmail directory (e.g. /var/qmail/control).
 
Now you need to add one or more entries to the virtualdomains file. There
are other ways to do it, but I like this one. First, assume you have a user
(we'll make one called "mailman") who is going to handle all the mail
for werebear.com. We add this line to virtualdomains:
 
werebear.com:mailman-werebear
 
This tells qmail that all mail sent to werebear.com should check out
the home directory of the mailman user to figure out what to do. To make
things easy on ourselves, we cause the string "werebear" to be appended
to the address.
 
Let's say the user "greg" is local to the system and wants to get all email
addressed to greg at werebear.com, postmaster at werebear.com, and abuse at werebear.com:
 
echo /home/greg/Maildir/ > ~mailman/.qmail-werebear-greg
echo /home/greg/Maildir/ > ~mailman/.qmail-werebear-postmaster
echo /home/greg/Maildir/ > ~mailman/.qmail-werebear-abuse
 
(What's neat about qmail is that it's easy for 'greg' to tell which account
it was sent to by the top header, which qmail rewrites)
 
We want all email for "bob at werebear.com" to be forwarded:
 
echo '&transam at cavu.com' > ~mailman/.qmail-werebear-bob
 
Might want to run a 'qmailctl restart' for good measure. but it is not
needed if you are only changing .qmail files.
 
- --
Greg Sabino Mullane greg at turnstep.com
PGP Key: 0x14964AC8 200410191852
-----BEGIN PGP SIGNATURE-----
 
iD8DBQFBdZu0vJuQZxSWSsgRAn2/AJ0c4cmrc4xQTbCvcCz54FQnYVeegwCgoI/+
KWyz9Bv9zkSWr+2vHEks1ws=
=2ZKX
-----END PGP SIGNATURE-----




More information about the Ale mailing list