Mail admin question: one user, multiple domains...
Madison Kelly
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Thu May 18 15:29:23 UTC 2006
Aaron Vegh wrote:
> Yes, I'm using Sendmail 8.12.8-9.80. As John mentioned, I haven't used
> the virtusertable yet, but I see that it needs to be part of the
> solution.
>
> I definitely don't want to have different user names, but I can't find
> any information on this patch you mentioned, although someone else
> mentioned it in passing as well during my research.
The way the 'virtusertable' works is it looks in there for full email
addresses and when it finds one it checks the associated unix user name
and sends the email into their spool. So, theoretically (I haven't tried
this) I suspect that:
user-WNbSnoOWcWBBDgjK7y7TUQ at public.gmane.org user
user-dL8jOpOjefRBDgjK7y7TUQ at public.gmane.org user
*Should* work. That said, I always use different unix users for each
email address just to keep things separate. Ie: 'user.domain1.com' and
'user.domain2.com' and then tell the used that their POP3 login name is
their email address with a '.' instead of an '@' sign. This patch that
works around this is new to me, so I can't speak to that.
Here are samples of my files:
=- sendmail.mc -=
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
dnl # Define server and cw file
define(`confDOMAIN_NAME', `mail.alteeve.com')dnl
define(`confCW_FILE', `/etc/mail/local-host-names')dnl
Cw domain1.com mail.domain1.com
Cw domain2.com mail.domain2.com
...
Cw domainN.com mail.domainN.com
=- access -=
111.222.33.44 RELAY
111.222.33.45 RELAY
domain1.com RELAY
mail.domain1.com RELAY
...
domainN.com RELAY
mail.domainN.com RELAY
=- local-host-names -=
localhost
localhost.localdomain
domain1.com
mail.domain1.com
...
domainN.com
mail.domainN.com
=- virtusertable -=
user-WNbSnoOWcWBBDgjK7y7TUQ at public.gmane.org user.domain1.com
@domain1.com admin.domain1.com
user-dL8jOpOjefRBDgjK7y7TUQ at public.gmane.org user.domain2.com
foo-dL8jOpOjefRBDgjK7y7TUQ at public.gmane.org foo.domain2.com
bar-dL8jOpOjefRBDgjK7y7TUQ at public.gmane.org bar.domain2.com
@domain2.com admin.domain2.com
...
user-8ttO0WTGhi9BDgjK7y7TUQ at public.gmane.org user.domainN.com
@domainN.com admin.domainN.com
Then once everything is ready run: 'sendmailconfig' (if installed) or
do whatever you need to do on your server to (re)generate your *.db
files and to create the sendmail.cf file and restart sendmail.
I *don't* pretend that these configs are free of typos! I just copied
from my (working) config files and substituded with fake data to protect
the innocent. Also, my config may not be optimal... I just know that it
works. :p
HTH
Madison
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list