! Postfix ---- ! canonical main.cf # 書き換えるアドレスの対象 canonical_classes = envelope_sender, envelope_recipient, header_sender, header_recipient # 送信者、受信者双方に適用 canonical_maps = regexp:/etc/postfix/canonical.regexp # 送信者のみ書き換え対象 # sender_canonical_maps = regexp:/etc/postfix/sender_canonical.regexp # 受信者のみ書き換え対象 # recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical.regexp ---- 以下を追記 relayhost = [mx.in.tekitou.co.jp] #リレー先をホスト名で指定する。 disable_dns_lookups = yes    #postfixのDNSを使わずにOSの設定を使うらしい。 ---- !sendmail の mailertable を postfix /etc/postfix/main.cf を修正 --- ./main.cf 2017-02-14 13:36:32.521705394 +0900 +++ ./main.cf.orignal 2017-02-14 14:11:51.701327608 +0900 @@ -678,7 +678,3 @@ # readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES -###################################################### -transport_maps = hash:/etc/postfix/transport -###################################################### /etc/postfix/transport で 作成 recived.domain: routing.domain smtp:[xxx.xxx.xxx.xxx] # others * smtp:[zzz.zzz.zzz.zzz] DBを更新 # postmap /etc/postfix/transport ---- !virtual domain # vi /etc/postfix/main.cf virtual_alias_domains = your.domain.name virtual_alias_maps = hash:/etc/postfix/virtual # # /etc/rc.d/init.d/postfix reload # # systemctl stop postfix # # systemctl start postfix # systemctl reload postfix # vi /etc/postfix/virtual your.domain.name anything webmaster@your.domain.name account1 info@your.domain.name account2 # postmap /etc/postfix/virtual ---- linux の場合は # mkdir -p /etc/skel/Maildir/{new,cur,tmp} # chmod -R 700 /etc/skel/Maildir/ で追加しておく(新規ユーザ用) ---- ! diff -u main.cf.old main.cf [root@test postfix]# diff -u main.cf.orig main.cf --- main.cf.orig 2014-05-03 09:14:21.000000000 +0900 +++ main.cf 2017-01-16 17:08:00.703646347 +0900 @@ -10,6 +10,31 @@ # For best results, change no more than 2-3 parameters at a time, # and test if Postfix still works after every change. +########################################################################### + +# myhostname = mail.my.domain +myhostname = mail.my.domain +mydomain = my.domain +myorigin = $myhostname + +inet_interfaces = all +# inet_interfaces = 192.168.200.202, 10.0.2.15, 127.0.0.1 +inet_protocols = ipv4 + +mydestination = $myhostname, localhost.mydomain, localhost, $mydomain + +mynetworks = 192.168.200.0/24,10.0.2.0/24,127.0.0.1 + +home_mailbox = Maildir/ + +smtpd_recipient_restrictions = permit_networks, reject_unauth_destination + +############################################################## +virtual_alias_domains = test.atori.com, test,h-kimo.net +virtual_alias_maps = hash:/etc/postfix/virtual +############################################################## +########################################################################### + # SOFT BOUNCE # # The soft_bounce parameter provides a limited safety net for @@ -113,10 +138,10 @@ #inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost -inet_interfaces = localhost +#inet_interfaces = localhost # Enable IPv4, and IPv6 if supported -inet_protocols = all +#inet_protocols = all # The proxy_interfaces parameter specifies the network interface # addresses that this mail system receives mail on by way of a @@ -677,3 +702,6 @@ # readme_directory: The location of the Postfix README files. # readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES +# + + [root@test postfix]# ---- 対象サーバでpostfixのログでエラー等ないか確認 journalctl -xafu postfix ---- ! Postfix / LMTP http://www.postfix-jp.info/trans-2.0/readme/LMTP_README.jp ---- ! Duplicate *https://www2.filewo.net/wordpress/2018/08/01/1568/ *https://matome.me/tech/mail/118/ ---- Tips http://www.unix-power.net/centos7/postfix.html https://open-groove.net/postfix/check-deferred-mail/ http://qiita.com/softark/items/255c44499cbc247655bc http://qiita.com/dumpty-alma@github/items/4a18857c207ee0ca72e4 https://open-groove.net/postfix/check-deferred-mail/ http://wiki.rookie-inc.com/serverapps/apache/adminer