evanadelman
11-10-2004, 11:36 PM
Hi all -
I'm fairly new to having complete control over our company's server (being previously propped up w/ a good amount of apache experience and HSPC), and just thought I'd share a tip for people who had a similar problems in setting up sendmail for different domains. I had a few requirements:
1) Wanted a way to have admin@abc.com and admin@xyz.com.
2) Didn't feel like using/administering virtusertable to map what should be unique users to actual unique users (like:
admin@abc.com admin01
admin@xyz.com admin02
)
3) Wanted users to be able to login to their mail accounts w/ just their emails and passwords.
I basically started on the path mentioned in RH's howtos, then ran into a problem - users w/ @'s in their name (created by using webmin - would love a tip how to do this from adduser) weren't authenticating correctly. (ex, I'd setup user "admin@abc.com" and mail delivery would puke).
So, after much searching, I found this post mentioning a modification to sendmail.cf
<http://www.experts-exchange.com/Networking/Email_Groupware/Sendmail/Q_20317542.html>
the link summarized:
old senmail.cf:
# short circuit local delivery so forwarded email works
R$=L < @ $=w . > $#local $: @ $1 special local names
R$+ < @ $=w . > $#local $: $1 regular local name
And now it looks like this:
# short circuit local delivery so forwarded email works
R$=L < @ $=w . > $#local $: @ $1 special local names
R$+ < @ $=w . > $#local $: $1@$2 regular local name
Note the addition of '@$2' to that last line. Also, the EnvToL ruleset must be modified in exactly the same way - here's my old version of EnvToL:
# Envelope recipient rewriting
#
SEnvToL=20
R$+ < @ $* . > $: $1 strip host part
and here is the new version:
# Envelope recipient rewriting
#
SEnvToL=20
R$+ < @ $* . > $: $1@$2 strip host part
Restart sendmail, and wallah - it works - I can setup users w/ "@"s in their usernames, (thus keeping all my user accounts unique) and allow them to check mail by just plugging in their email address (is nothing more to them) for their username. Hope this saves people some trouble of searching endlessly.
Cheers,
Evan
I'm fairly new to having complete control over our company's server (being previously propped up w/ a good amount of apache experience and HSPC), and just thought I'd share a tip for people who had a similar problems in setting up sendmail for different domains. I had a few requirements:
1) Wanted a way to have admin@abc.com and admin@xyz.com.
2) Didn't feel like using/administering virtusertable to map what should be unique users to actual unique users (like:
admin@abc.com admin01
admin@xyz.com admin02
)
3) Wanted users to be able to login to their mail accounts w/ just their emails and passwords.
I basically started on the path mentioned in RH's howtos, then ran into a problem - users w/ @'s in their name (created by using webmin - would love a tip how to do this from adduser) weren't authenticating correctly. (ex, I'd setup user "admin@abc.com" and mail delivery would puke).
So, after much searching, I found this post mentioning a modification to sendmail.cf
<http://www.experts-exchange.com/Networking/Email_Groupware/Sendmail/Q_20317542.html>
the link summarized:
old senmail.cf:
# short circuit local delivery so forwarded email works
R$=L < @ $=w . > $#local $: @ $1 special local names
R$+ < @ $=w . > $#local $: $1 regular local name
And now it looks like this:
# short circuit local delivery so forwarded email works
R$=L < @ $=w . > $#local $: @ $1 special local names
R$+ < @ $=w . > $#local $: $1@$2 regular local name
Note the addition of '@$2' to that last line. Also, the EnvToL ruleset must be modified in exactly the same way - here's my old version of EnvToL:
# Envelope recipient rewriting
#
SEnvToL=20
R$+ < @ $* . > $: $1 strip host part
and here is the new version:
# Envelope recipient rewriting
#
SEnvToL=20
R$+ < @ $* . > $: $1@$2 strip host part
Restart sendmail, and wallah - it works - I can setup users w/ "@"s in their usernames, (thus keeping all my user accounts unique) and allow them to check mail by just plugging in their email address (is nothing more to them) for their username. Hope this saves people some trouble of searching endlessly.
Cheers,
Evan