以下のようにローカル内に2台のサーバを立てており、メールの送受信をしようとしています。
ただ掲題の通り、transport_mapsが動作しません。
main.cf内にrelayhostを書く方法では問題なく送受信可能ですので原因が特定出来ておりません。
※192.168.1.2が転送先IPです
以下にてtransport_maps作成
# cat main.cf ~省略~ transport_maps = hash:/etc/postfix/transport ~省略~ # cat transport ~省略~ aki.local smtp:192.168.1.2 ~省略~ # postmap transport # ls -l 合計 268 -rw-r--r--. 1 root root 20876 10月 31 2018 access -rw-r--r--. 1 root root 11883 10月 31 2018 canonical -rw-r--r--. 1 root root 10106 10月 31 2018 generic -rw-r--r--. 1 root root 21545 10月 31 2018 header_checks -rw-r--r-- 1 root root 27973 7月 8 15:16 main.cf -rw-r--r--. 1 root root 27176 10月 31 2018 main.cf.org -rw-r--r--. 1 root root 27408 8月 20 2019 main.cf.org2 -rw-r--r-- 1 root root 27777 9月 25 2019 main.cf_bk -rw-r--r--. 1 root root 6104 8月 27 2019 master.cf -rw-r--r--. 1 root root 6104 9月 25 2019 master.cf.org -rw-r--r--. 1 root root 6816 10月 31 2018 relocated -rw-r--r-- 1 root root 12640 7月 8 15:18 transport -rw-r--r-- 1 root root 12288 7月 8 15:18 transport.db -rw-r--r-- 1 root root 12549 10月 31 2018 transport_bk -rw-r--r--. 1 root root 12696 10月 31 2018 virtual # systemctl restart postfix
unknown mail transport errorを返しており、転送出来ておりません。
#cat /var/log/maillog ~省略~ Jul 10 15:24:17 test postfix/error[28961]: 3CC3F8EFB94: to=<bbb@aki.local>, relay=none, delay=260627, delays=260626/1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error) ~省略~
mail.cf内にrelayhostを記載する方法であれば、問題なく動作。
# cat main.cf ~省略~ #relayhost = $mydomain relayhost = [192.168.1.2] #relayhost = [gateway.my.domain] #relayhost = [mailserver.isp.tld] #relayhost = uucphost #relayhost = [an.ip.add.ress] ~省略~
ログ上もstatus=sent
#cat /var/log/maillog ~省略~ Jul 10 14:08:35 test postfix/smtp[28764]: 0C5C88010FE: to=<bbb@aki.local>, relay=192.168.11.159[192.168.1.1]:25, delay=0.14, delays=0.04/0.02/0.02/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4B31KH0ntbzNlDDS)
/etc/postfix/transport
# TCP-BASED TABLES # This section describes how the table lookups change when # lookups are directed to a TCP-based server. For a descrip- # tion of the TCP client/server lookup protocol, see tcp_ta- # ble(5). This feature is not available up to and including # Postfix version 2.4. # # Each lookup operation uses the entire recipient address # once. Thus, some.domain.hierarchy is not looked up via # its parent domains, nor is user+foo@domain looked up as # user@domain. # # Results are the same as with indexed file lookups. # # CONFIGURATION PARAMETERS # The following main.cf parameters are especially relevant. # The text below provides only a parameter summary. See # postconf(5) for more details including examples. # # empty_address_recipient # The address that is looked up instead of the null # sender address. # # parent_domain_matches_subdomains # List of Postfix features that use domain.tld pat- # terns to match sub.domain.tld (as opposed to # requiring .domain.tld patterns). # # transport_maps # List of transport lookup tables. aki.local smtp:[192.168.11.159] # # SEE ALSO # trivial-rewrite(8), rewrite and resolve addresses # master(5), master.cf file format # postconf(5), configuration parameters # postmap(1), Postfix lookup table manager # # README FILES # Use "postconf readme_directory" or "postconf html_direc- # tory" to locate this information. # ADDRESS_REWRITING_README, address rewriting guide # DATABASE_README, Postfix lookup table overview # FILTER_README, external content filter # # LICENSE # The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) # Wietse Venema # IBM T.J. Watson Research # P.O. Box 704 # Yorktown Heights, NY 10598, USA # # TRANSPORT(5) [root@test ~]#
なにか考えられる原因は御座いますでしょうか。