====== Postfix ====== {{ :serverapps:postfix-logo.png|Postfix}} メールサーバにはPostfixを使っています。\\ 認証系はOpenLdapで行います。\\ POP3、IMAP4はCourierImapを、smtp Authにはsaslを使用します。 ===== インストール ===== # pkg_replace -N postfix Postfix をActivateにするため Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y ==== rc.confその他の設定 ==== /etc/rc.confに以下のように設定してpostfixが開始されるようにする。 postfix_enable="YES" OR sysrc postfix_enable="YES" /etc/periodic.confを作成して以下のように設定する。 daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO" /etc/rc.confに以下のように設定してSendmailを停止する。((2017.07.04:下の3行は不要になった?)) sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" /usr/local/etc/mail/mailer.confを設定 # install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf ==== SPFレコードの設定 ==== [[serverapps:dns:bind:spf]]レコードがないとgmailなどはメールを受け取ってくれませんので、必ず設定する。 [[serverapps:dns:bind:spf|設定はこちらを参照]] ==== SASL対応 ==== sasldbを読める必要があるので、postfixをmailグループに追加。\\ /usr/local/etc/sasldb*をmailグループが読み込み可能にする。 ==== 設定チェック ==== # postfix check デフォルト値の表示 # postconf -d 現在の設定値 # postconf 以下のコマンドで標準以外の設定一覧が表示される # postconf -n