Using a smart host in OpenBSD’s sendmail
Here are some quick notes of configuring sendmail(8) to transfer mail
to your ISP’s smart host on a standard OpenBSD Installation. Tested with
OpenBSD 4.7/i386 and 4.8/i386
First, make a copy of the default configuration. Here ‘mysettings’ is something you can name anything you’d like.
# cd /usr/share/sendmail/cf # cp openbsd-localhost.mc mysettings.mc
Define smarthost by adding this line in mysettings.mc replacing ‘smtp.myisp.com’ with the smtp server of your ISP.
define(`SMART_HOST',`smtp.myisp.com')dnl
Generate a .cf file from the .mc configuration with m4 and move it to /etc/mail/
# pwd /usr/share/sendmail/cf # m4 ../m4/cf.m4 mysettings.mc > mysettings.cf # mv mysettings.cf /etc/mail/
Add this line to /etc/rc.conf.local to override the default flags in /etc/rc.conf
sendmail_flags="-L sm-mta -C/etc/mail/mysettings.cf -bd -q30m"
Instructions shamelessly stolen from a post by Diana Eichert on the misc mailing list at OpenBSD.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.
Comments
// Begin Comments & Trackbacks ?>No comments yet.
Leave a comment