[1] | Postfix は CentOS を [Minimal Install] した場合でもデフォルトでインストールされますが、もしインストールされていない場合はインストールしてください。
|
[root@mail ~]# yum -y install postfix ←posfixインストール |
[root@mail ~]# vi /etc/postfix/main.cf
# 75行目ぐらい:コメント解除しホスト名指定
myhostname = mail.atalanta.jp# 83行目ぐらいぐらい:コメント解除しドメイン名指定
mydomain = atalanta.jp # 99行目ぐらい:コメント解除
myorigin = $mydomain # 116行目ぐらい:変更
inet_interfaces = all # 164行目ぐらい:追記
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain # 265行目ぐらい:追記
mynetworks = *.*.*.* # 419行目ぐらい:コメント解除しMaildir形式へ移行
home_mailbox = Maildir/# 574行目ぐらい:追加
smtpd_banner = $myhostname ESMTP
# 最終行へ追加
# 送受信メールサイズを10Mに制限
message_size_limit = 10485760 # メールボックスサイズを1Gに制限
mailbox_size_limit = 1073741824
# 以下SMTP-Auth用
smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject [root@mail ~]# systemctl start postfix ←起動 [root@mail ~]# systemctl enable postfix ←自動起動 |