Preliminary Note

This information contained in this document is outdated. It describe how to configured 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.


Step 1: Stop sendmail from running as an SMTP daemon


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,
        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