久しぶりにサーバー移転すると、Postfix の設定でいつも時間を取られる。今回は、メールが全く受信できない状態。mynetworks の記述が抜けていた。
mynetworks = IPアドレス群
設定ファイルには標準でコメントマーク行がたくさんあって煩雑に見える。
全ての#行を削除してすっきりするべし。
Postfix バージョン 2.10.1 の設定ファイル /etc/postfix/main.cf
の全部------------------------
#/etc/postfix/main.cf
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
mailbox_command = /usr/bin/procmail
smtpd_banner = $myhostname ESMTP unknown
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
#myorigin = $mydomain
myorigin = $myhostname
smtpd_helo_required = yes
debug_peer_level = 2
smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_tls_key_file = /etc/pki/postfix/postfix_noenc.key
smtpd_tls_CAfile = /etc/pki/CA/cacert.pem
smtpd_tls_cert_file = /etc/pki/postfix/postfix.pem
smtpd_use_tls = yes
#smtpd_recipient_restrictions = permit_mynetworks permit_inet_interfaces permit_sasl_authenticated check_relay_domains
smtpd_recipient_restrictions = permit_mynetworks permit_inet_interfaces permit_sasl_authenticated reject_unauth_destination
virtual_alias_domains = /etc/sendmail.cw
virtual_alias_maps = hash:/etc/postfix/virtual
allow_mail_to_commands = alias,forward,include
disable_vrfy_command = yes
#mynetworks = postfix のあるサーバーのIP, メールを送信するパソコンのグローバルIP
mynetworks = 192.168.555.0/24, 127.0.0.0/8, 221.74.333.0/24
message_size_limit = 0
mailbox_size_limit = 0