On Wed, 19 May 1999, Michael wrote:
>
> >I am trying to set up multiple domains with multiple aliases. For
> example:
> Joe B. has a login of joeb and an email address of - [EMAIL PROTECTED] Yet
> Joe H. has a login in as joeh and an email address of - [EMAIL PROTECTED]
>
Repeating and summarizing several different solutions:
SOLVING THE PROBLEM WITH VIRTUALDOMAINS - THE ALIAS WAY
=======================================================
1. Domain handling
Put the all the domains in /var/qmail/control/rcpthosts like this:
foobar.net
foo.net
and in /var/qmail/control/virtualdomains put this:
foobar.net:alias-foobar
foo.com:alias-foo
DO NOT put the domains in locals if you have them in virtualdomains!
2. Create aliases
Now all mail to foobar.net is handled by ~alias/.qmail-foobar-*
which means that you can create a ~alias/.qmail-foobar-joe and put
&[EMAIL PROTECTED]
in this file. And with this in mind it is easy to understand that
foo.com is handled by ~alias/.qmail-foo-* and you can now construct
a file ~alias/.qmail-foo-joe where you put
&[EMAIL PROTECTED]
(in this case popserver.net could be handled by the same machine - e.g.
in locals and the users joeb and joeh can be regular users of the
machine)
3. Finally
give qmail-send a kill -HUP
SOLVING THE PROBLEM WITH VIRTUALDOMAINS - THE ONE DOMAIN PER USER WAY
=====================================================================
This is very similar to the previous solution, but is a common one for
servers where domain-owner-users reside.
1. Domain handling
Put the all the domains in /var/qmail/control/rcpthosts like this:
foobar.net
foo.net
and in /var/qmail/control/virtualdomains put this:
foobar.net:joeh
foo.com:joeb
DO NOT put the domains in locals if you have them in virtualdomains!
2. Create aliases
Now all mail to foobar.net is handled by ~joeh/.qmail-*
which means that you can create a ~joeh/.qmail-joe and put
./Maildir/
or whatever delivery joeh wants. And as with all other examples it
follows that foo.com is handled by ~joeb/.qmail-* and you can construct
a file ~joeb/.qmail-joe where you put
./Mailbox
or whatever delivery joeb is pleased with.
3. Finally
give qmail-send a kill -HUP
[NOTE: Worthwhile to know is that if the localhost is named
popserver.net then [EMAIL PROTECTED] is ALSO delivered to
~joeb/.qmail-joe]
SOLVING THE PROBLEM WITH LOCALS
===============================
0. Install the fastforward package
(http://pobox.com/~djb/fastforward.html)
1. Domain handling
put the all the domains in /var/qmail/control/rcpthosts like this:
foobar.net
foo.com
and in /var/qmail/control/locals put this:
foobar.net
foo.com
DO NOT put the domains in virtualdomains if you have them in locals!
2. Create aliases
Now all mail is handled by local users and finally by the user "alias".
And all aliases that are not explicitily "~alias/.qmail-*" is
delivered to fastforward through ~alias/.qmail-default.
Therefore:
put this in /etc/aliases
[EMAIL PROTECTED]:joeh
[EMAIL PROTECTED]:joeb
3. Finally
give qmail-send a kill -HUP and run /var/qmail/bin/newaliases
(See further the documentation for fastforward)
[
NOTE that both users still have these addresses, as the mail for the
domains is handled locally:
joeh: [EMAIL PROTECTED] AND [EMAIL PROTECTED]
joeb: [EMAIL PROTECTED] AND [EMAIL PROTECTED]
]
Sincerely,
magnus bodin
--
"MOST USELESS site of the year 1998" --> http://x42.com/urlcalc/