[Techtalk] `TO:' header alias rewrite - Sendmail

Nosferatu!!! keeg3 at yahoo.com
Sat Mar 30 07:30:52 EST 2002


Hi all,

I am having a little problem with my aliases in /etc/aliases file.


Scenario:

Say I have the following alias definition in /etc/aliases -

ruby:		rubidium at hotmail.com

Now, sendmail expands the "ruby" to the proper address in "RCPT TO:",
but, the "To:" header in the message still reads "To: ruby".

Its not a big deal for me except that "ruby" has Hotmail filtering
on that rejects messages whose "To:" header does not read as
"To: rubidium at hotmail.com"

Also, I want it to work this way only for selective aliases and not
for ones like

buddies:	aaa at hotmail.com, bbb at yahoo.com, ccc at rediffmail.com

I know I'll have to write rulesets for that, but, I don't have
access to the Bat book. Anybody feeling suicidal? ;) 

My sendmail.mc for Sendmail 8.9.3 looks like this 

divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify thei file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl        m4 /etc/sendmail.mc > /etc/sendmail.cf
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
include(`/usr/lib/sendmail-cf/m4/cf.m4')
define(`confDEF_USER_ID',``8:12'')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`confAUTO_REBUILD')
define(`confTO_CONNECT', `1m')
define(`confTRY_NULL_MX_LIST',true)
define(`confDONT_PROBE_INTERFACES',true)
define(`confCON_EXPENSIVE',`True')
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
define(`SMTP_MAILER_FLAGS','e')
GENERICS_DOMAIN(`norika.myip.org')
FEATURE(masquerade_envelope)
dnl FEATURE(allmasquerade)
FEATURE(`genericstable',`hash -o /etc/mail/genericstable')
FEATURE(`smrsh',`/usr/sbin/smrsh')
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
FEATURE(redirect)
dnl FEATURE(always_add_domain)
FEATURE(nocanonify)
FEATURE(use_cw_file)
FEATURE(local_procmail)
MAILER(procmail)
MAILER(smtp)
FEATURE(`access_db')
FEATURE(`blacklist_recipients')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not hav 24x7 DNS do need this.
FEATURE(`accept_unresolvable_domains')
dnl FEATURE(`relay_based_on_MX')


TIA

Nosferatu




More information about the Techtalk mailing list