A smarthost is a host through which outgoing mail is relayed.
Some ISPs block outgoing SMTP traffic (port 25) and require their users to send out all mail through the ISP's mail server. Sendmail can be configured to use the ISP's mail server as the smart host.
The following installation guide is based upon sendmail 8.11 about above.
You should have sendmail 8.11 or above installed.
Sendmail should be configured to include the following directives:
Generate the sendmail.cf file. Refer to our configuration guide for instructions to generate a sendmail.cf file.
The following sample configuration files are available for download. For the smarthost sample configuration, you should change the OSTYPE() setting to the one for your operating system. The my_isp_smtp setting should be changed to the hostname of your ISP's SMTP server.
Restart sendmail for the new configuration to take effect.
Rewriting the sender's address
If your server's hostname does not resolve in DNS, your email may be rejected by mail servers which have antispam measures enabled. Sendmail returns the following error:
You can use the genericstable feature of sendmail to rewrite the sender's address. The following entries should be included in your .mc file, and a new sendmail.cf should be generated, for sendmail to rewrite the sender's address:
Create a /etc/mail/genericstable file
Add the following entries:
In the above example, mail with a sender's address of root will be rewritten to email@example.com.
Sending mail through to a different ISP
If you wish to submit mail through a different ISP and that ISP supports mail submission over port 587, download the smarthost-submit.mc file and follow the configuration instructions mentioned above.
It is good practice to submit mail through port 587 instead of port 25 as that port has been assigned for mail submission.
If you have any comments, you can contact the author here.http://www.elandsys.com/resources/sendmail/smarthost.html