With the increase of blocking of spam from dynamic hosts, this is for the FreeBSD users who need to relay all email through their ISP.
- Go to
/etc/mail - Edit
`hostname`.mc - Uncomment the:
define(`SMART_HOST', `your.isp.mail.server')line - Replace `your.isp.mail.server’ with the correct value
sudo make installsudo sh /etc/rc.sendmail restart- done!
To test this:
mail youremail@address.comtail /var/log/maillog- you should see something like…
Feb 6 15:51:38 www2 sm-mta[68105]: l16NpbNr068103: to=<youremail@address.com>, ctladdr=<username@server.com> (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30362, relay=your.isp.mail.server. [10.10.10.13], dsn=2.0.0, stat=Sent (Ok.)
That’s it. I decided to figure out how to do this after my own spam firewall blocked emails coming from my email servers due to PTR filtering. Now all emails from my server are properly delivered through my ISP.
[tags]email, spam, freebsd, smtp[/tags]
And that would be why the first thing I do when I install FreeBSD is install Postfix and disable Sendmail! :-)