howdy. i'm trying to come up with a (relatively) simple way of
supporting email for multiple domains under sendmail-8.7.1. my
current solution is close, but no cigar. suggestions of any sort more
than welcome. it's possible i'm using the wrong tool or that some
other method using sendmail might be more appropriate.
I've been trying to do the same sort of thing.
i've got MX records for each domain pointing to the same host. this
system has a sendmail.cf with the mailertable feature, as well as with
procmail. the mailertable looks like (edited)
My mailertable looks very similar.
and the igroup.com file looks like (again, edited)
! -oi rramstad
! -oi boccibob(_at_)media(_dot_)mit(_dot_)edu
# EX_NOUSER from /usr/include/sysexits.h
Here's where we've 'parted' ways... I've got something more like:
SENDER="$1" # Get envelope sender from sendmail
RECIPIENT="$2" # Get envelope recipient from sendmail
# Put them in an extra header...
* RECIPIENT ?? user1
! -oi user1(_at_)someotherdomain(_dot_)com
* RECIPIENT ?? user2
! -oi user2(_at_)yadomain(_dot_)com
so far so good. mail to rramstad(_at_)igroup(_dot_)com gets delivered to the
local user rramstad, while boccibob(_at_)igroup(_dot_)com is forwarded to a
remote user boccibob(_at_)media(_dot_)mit(_dot_)edu(_dot_)
the problem comes when either of these addresses are added to a
mailing list or alias. from my /etc/aliases (edited)
Your basic problem is that you're not actually basing things on who sendmail
things the mail is to. Try Bcc:'ing a copy of an email to one of those
addresses and you'll probably see similar problems.