CONFIGURING YOUR MTA

The trick is to tell your SMTP server to deliver to different LMTP sockets based on domain name...


SENDMAIL
Many thanks to Igor Brezac, Claus Assman, and Neil Rickert for all of their help! I couldn't have figured this one out without you!

I'm not a sendmail expert by any means, but this works for me...

Near the top of your sendmail.mc (after OSTYPE and DOMAIN), add:
FEATURE(`mailertable',`hash /etc/mail/mailertable')dnl

Then at the bottom of sendmail.mc add:

MAILER_DEFINITIONS
Mlmtp,          P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
                S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
                A=FILE $h
Then make a mailertable in /etc/mail/mailertable that looks like this:

domain1.com		lmtp:/var/imap/domain1.com/socket/lmtp
domain2.com		lmtp:/var/imap/domain2.com/socket/lmtp
Now make your mailertable hash:
# makemap hash /etc/mail/mailertable < /etc/mail/mailertable

And make your sendmail.cf:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

NOTE: Creating sendmail.cf may be different on your system. Two caveats I know of:
Restart sendmail:
#/etc/init.d/sendmail stop
#/etc/init.d/sendmail start

And that's it! Test it with:
# /usr/lib/sendmail -bt
...
> /parse user@domain1.com
...
mailer lmtp, host /var/imap/domain1.com/socket/lmtp, user phil
> ^D
#

If you see something like that, you're all set!


POSTFIX
My friend has this working, and I'm waiting on his configs to post them. Stay tuned.


QMAIL
I may get to this one day, but this is low on the priority list.




Last Updated: 06/23/02

This page is © Phil Dibowitz 2001 - 2004