Preliminary Note

This information contained in this document is outdated. It describes how to configure a version of sendmail that is no more the current one. Moreover, some distributions are now replacing sendmail with Postfix. For up-to-date information, please refer to the sendmail and/or postfix documentation.

The problem

This document explains how to configure sendmail to route all mail generated by /usr/sbin/sendmail or local mail on a host through James on the same host, including mail to local addresses without @host.

Solution

Step 1: Stop sendmail from running as an SMTP daemon

DAEMON=yes

Step 2: Set up sendmail to use relay

Step 3: Stop sendmail complaining about mail apparently looping back

Mesmtp,     P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
        T=DNS/RFC822/SMTP,
        A=TCP $h

/[root@apache root]# mail -v [real-localusername]

[root@apache root]# mail -v [nonexistant-localusername]

[root@apache root]# mail -v [real-localusername]@localhost

[root@apache root]# mail -v [real-localusername]@[myhostname.mydomainname]

[root@apache root]# mail -v [real-username]@[real-remote-account]

Step 4: If that wasn't enough James requires SMTP AUTH

Ta-da!

JamesAndSendmail (last edited 2011-06-03 06:28:08 by EricCharles)