sendmail is in my opinion unessisary advanced and compicated for the most installations and there are a more simpler solution already in base for OpenBSD which is smtpd. This daemon is not active by default but it’s simple to change.
Stop sendmail
pkill sendmail
Edit /etc/mailer.conf and change to the following
sendmail /usr/sbin/smtpctl
send-mail /usr/sbin/smtpctl
mailq /usr/sbin/smtpctl
makemap /usr/libexec/smtpd/makemap
newaliases /usr/libexec/smtpd/makemap
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmail
Rebuild aliases database
newaliases
Make sure smtpd starts with the system and stop sendmail
echo “sendmail_flags=NO” >> /etc/rc.conf.local
echo “smtpd_flags=” >> /etc/rc.conf.local
Start smtpd
smtpd
Done!
Modifiy /etc/mail/smtpd.conf for your system, it’s a dream in comparison to sendmail
— Johan Ryberg
Krävs väl rätt mycket ansträngning för att skapa en konfigurationsfil som inte är en dröm jämfört med sendmails dito? 🙂
Nja, tänker speciellt på att “kompilera” konfigurationen med m4. Visst är det kanske i antal tangentbordstryckningar enklare att utföra typ:
vi /etc/mail/sendmail.mc
define(
SMART_HOST',
någon.smtp.server')m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
/etc/init.d/sendmail restart
Men det är klart, det är ju en vanesak. Jag gillar att ändra i en inställning och ladda om konfigurationen som smtpd erbjuder.