Subscribe to my RSS feed RSS
February 6, 2007

Configuring FreeBSD to Relay Email Through Your ISP

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.

  1. Go to /etc/mail
  2. Edit `hostname`.mc
  3. Uncomment the: define(`SMART_HOST', `your.isp.mail.server') line
  4. Replace `your.isp.mail.server’ with the correct value
  5. sudo make install
  6. sudo sh /etc/rc.sendmail restart
  7. done!

To test this:

  1. mail youremail@address.com
  2. tail /var/log/maillog
  3. 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]

Feed for this Entry | Trackback Address

1 comment so far

  1. Casey Woods on 02.09.2007 at 1:37 am | permalink
  2. And that would be why the first thing I do when I install FreeBSD is install Postfix and disable Sendmail! :-)

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>