BSDでデフォルトでインストールされているMTAですが、Linuxにもインストールすることができます。 いままで見たMTAの中で一番ユーザーフレンドリーな設定ファイルでした。
yum install automake autoconf libtool libevent libevent-devel byacc cd /usr/local/src wget https://github.com/OpenSMTPD/OpenSMTPD/archive/opensmtpd-201406061833p1.tar.gz tar zxvf opensmtpd-201406061833p1.tar.gz cd OpenSMTPD-opensmtpd-201406061833p1/ ./bootstrap ./configure make make install
mkdir /var/empty useradd -c "SMTP Daemon" -d /var/empty -s /sbin/nologin _smtpd useradd -c "SMTPD Queue" -d /var/empty -s /sbin/nologin _smtpq
外からメールを受信できるようにします。
vim /usr/local/etc/smtpd.conf
---
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
# To accept external mail, replace with: listen on all
listen on 0.0.0.0
# If you edit the file, you have to run "smtpctl update table aliases"
table aliases file:/etc/aliases
# Uncomment the following to accept external mail for domain "example.org"
accept from any for domain "{domain}" alias <aliases> deliver to mbox
accept for local alias <aliases> deliver to mbox
accept for any relay
---
smtpd
で起動します。 デバッグモードは
smtpd -dv
です。


