Postfix

インストール

ports からインストールします。

# portinstall /usr/ports/mail/postfix/

インストールのはじめにオプションについて聞かれるので、適宜答えておきます。今回は以下のようにしています。

┌----------------------- Postfix configuration options -------------------------┐
│                                                                               │
│ Please select desired options:                                                │
│ ┌-------------------------------------------------------------------------┐ │
│ │ [ ] NOPCRE    DISABLE Perl Compatible Regular Expressions               │ │
│ │ [ ] SASL      Cyrus SASLv1 (Simple Authentication and Security Layer)   │ │
│ │ [X] SASL2     Cyrus SASLv2 (Simple Authentication and Security Layer)   │ │
│ │ [ ] SASLKRB   If your SASL requires Kerberos select this option         │ │
│ │ [ ] SASLKRB5  If your SASL requires Kerberos5 select this option        │ │
│ │ [ ] SPF       SPF support                                               │ │
│ │ [ ] TLS       SSL and TLS                                               │ │
│ │ [ ] DB3       Berkeley DB3 (required if SASL also built with DB3)       │ │
│ │ [ ] DB40      Berkeley DB4.0 (required if SASL also built with DB4.0)   │ │
│ │ [ ] DB41      Berkeley DB4.1 (required if SASL also built with DB4.1)   │ │
│ │ [ ] DB42      Berkeley DB4.2 (required if SASL also built with DB4.2)   │ │
│ │ [X] DB43      Berkeley DB4.3 (required if SASL also built with DB4.3)   │ │
│ │ [ ] MySQL     MySQL map lookups (choose version with WITH_MYSQL_VER)    │ │
│ │ [ ] PgSQL     PostgreSQL map lookups (choose with DEFAULT_PGSQL_VER)    │ │
│ │ [ ] OpenLDAP  OpenLDAP map lookups (choose ver. with WITH_OPENLDAP_VER) │ │
│ │ [ ] CDB       CDB map lookups                                           │ │
│ │ [ ] NIS       NIS map lookups                                           │ │
│ │ [ ] VDA       VDA (Virtual Delivery Agent)                              │ │
│ │ [ ] Test      SMTP/LMTP test server and generator                       │ │
│ └-----v(+)----------------------------------------------------------------┘ │
├-------------------------------------------------------------------------------┤
│                           [  OK  ]       Cancel                               │
└-------------------------------------------------------------------------------┘

また、インストールの途中で2回確認を求められますが、両方とも yes と答えます。

You need user "postfix" added to group "mail".
Would you like me to add it [y]?y
Would you like to activate Postfix in /etc/mail/mailer.conf [n]?y

設定

postfixが自動起動するように、/etc/rc.conf に以下を追加します。

sendmail_enable="NO"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_procname="/usr/local/libexec/postfix/master"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"

また、sendmail 用のシステムメンテナンスジョブを無効にするため、/etc/periodic.conf に以下を追加します。

daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-05-11 (水) 15:25:24