Sendmail tip : Passing Local Mail to a Mail Hub


You have been asked to create a sendmail configuration that sends all local mail to a mail hub, while directly delivering mail addressed to external systems.


Create a sendmail configuration containing the MAIL_HUB define to identify the mail relay host for local mail. Use the LOCAL_USERcommand to exempt the root user’s mail from relaying. Here are sample commands:

dnl Define a relay server for local mail
define(`MAIL_HUB', `')
dnl Users whose mail is not passed to the mail hub

Rebuild and reinstall, and then restart sendmail.