====== FreeBSD 11でEximを使う ====== ===== 試した環境 ===== * FreeBSD 11.2-RELEASE-p4 * Exim 4.91 ===== インストール ===== いつもの通りportsから入れる。インストールオプションは追加でDOCS, SPF, TCP_WRAPPERS, MYSQL, SRSを有効にしてみた。 # portmaster mail/exim ===== 設定 ===== インストール終了後に出る↓メッセージに従い、システムの設定を行う。 To use Exim instead of sendmail on startup: *) Clear the sendmail queue and stop the sendmail daemon. *) Adjust mailer.conf(5) as appropriate. *) Set the 'sendmail_enable' rc.conf(5) variable to 'NONE'. *) Set the 'daily_status_include_submit_mailq' and 'daily_clean_hoststat_enable' periodic.conf(5) variables to 'NO'. *) Consider setting 'daily_queuerun_enable' and 'daily_submit_queuerun' to "NO" in periodic.conf(5), if you intend to manage queue runners / deliveries closely. *) Set the 'exim_enable' rc.conf(5) variable to 'YES'. *) Start exim with '/usr/local/etc/rc.d/exim start'. You may also want to configure newsyslog(8) to rotate Exim log files: /var/log/exim/mainlog mailnull:mail 640 7 * @T00 ZN /var/log/exim/rejectlog mailnull:mail 640 7 * @T00 ZN Additional scripts to help upgrading are installed in: /usr/local/share/examples/exim ==== mailer.confの設定 ==== FreeBSDはmailwrapper(8)というMTAを切り替える仕組みを持っている。その設定は''/etc/mail/mailer.conf''で行い、[[https://www.freebsd.org/cgi/man.cgi?query=mailer.conf&sektion=5|man]]に各種MTAのサンプルが載っているので、Exim用の設定をコピペする。 sendmail /usr/local/sbin/exim mailq /usr/local/sbin/exim -bp newaliases /usr/bin/true rmail /usr/local/sbin/exim -i -oee /etc/periodic.conf aily_status_include_submit_mailq="NO" daily_clean_hoststat_enable="NO" daily_queuerun_enable="NO" daily_submit_queuerun="NO" /usr/local/etc/newsyslog.conf.d/exim /var/log/exim/mainlog mailnull:mail 640 7 * @T00 ZN /var/log/exim/rejectlog mailnull:mail 640 7 * @T00 ZN