我已经将 Postfix 的默认发件人地址从[电子邮件保护]到[电子邮件保护]
我可以正常发送电子邮件,但当我检查邮件日志文件时,我看到一些“未找到“错误。
在/etc/邮件日志中:
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: [email protected]: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: log: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: @example.com: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_find: [email protected] -> (not found)
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_map: [email protected] -> (not found)
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_map11_external: [email protected] not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: > smtp-relay.gmail.com[74.125.129.28]:587: RCPT TO:<[email protected]>
Feb 24 11:52:28 webserver postfix/smtp[9789]: > smtp-relay.gmail.com[74.125.129.28]:587: DATA
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_stream_setup: maxtime=300 enable_deadline=0
Feb 24 11:52:28 webserver postfix/smtp[9789]: < smtp-relay.gmail.com[74.125.129.28]:587: 250 2.1.0 OK f70sm1283942ita.7 - gsm
tp
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_stream_setup: maxtime=300 enable_deadline=0
Feb 24 11:52:28 webserver postfix/smtp[9789]: < smtp-relay.gmail.com[74.125.129.28]:587: 250 2.1.5 OK f70sm1283942ita.7 - gsm
tp
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_stream_setup: maxtime=120 enable_deadline=0
Feb 24 11:52:28 webserver postfix/smtp[9789]: < smtp-relay.gmail.com[74.125.129.28]:587: 354 Go ahead f70sm1283942ita.7 - gs
mtp
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_stream_setup: maxtime=180 enable_deadline=0
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: [email protected]: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: log: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: @example.com: not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_find: [email protected] -> (not found)
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_map: [email protected] -> (not found)
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_map11_external: [email protected] not found
Feb 24 11:52:28 webserver postfix/smtp[9789]: maps_find: smtp_generic_maps: hash:/etc/postfix/generic(0,lock|fold_fix): root
= [email protected]
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_find: root -> [email protected]
Feb 24 11:52:28 webserver postfix/smtp[9789]: rewrite_clnt: cached: local: [email protected] -> [email protected]
Feb 24 11:52:28 webserver postfix/smtp[9789]: mail_addr_map: root -> 0: [email protected]
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_map11_external: root -> [email protected]
Feb 24 11:52:28 webserver postfix/smtp[9789]: > smtp-relay.gmail.com[74.125.129.28]:587: .
Feb 24 11:52:28 webserver postfix/smtp[9789]: > smtp-relay.gmail.com[74.125.129.28]:587: QUIT
Feb 24 11:52:28 webserver postfix/smtp[9789]: smtp_stream_setup: maxtime=600 enable_deadline=0
Feb 24 11:52:28 webserver postfix/smtp[9789]: < smtp-relay.gmail.com[74.125.129.28]:587: 250 2.0.0 OK 1519469548 f70sm1283942
ita.7 - gsmtp
Feb 24 11:52:28 webserver postfix/smtp[9789]: 078471910084: to=<[email protected]>, relay=smtp-relay.gmail.com[74.125.129.28]:
587, delay=0.2, delays=0.02/0.02/0.12/0.04, dsn=2.0.0, status=sent (250 2.0.0 OK 1519469548 f70sm1283942ita.7 - gsmtp)
Feb 24 11:52:28 webserver postfix/smtp[9789]: name_mask: resource
Feb 24 11:52:28 webserver postfix/smtp[9789]: name_mask: software
Feb 24 11:52:28 webserver postfix/smtp[9789]: disposing SASL state information
Feb 24 11:52:28 webserver postfix/qmgr[6455]: 078471910084: removed
/etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic
/etc/postfix/通用
root [email protected]
一切正常,但仍然有这些错误。为什么邮件日志首先显示“未找到”,然后几行之后显示已找到?
答案1
似乎这些maps_find
行是来自映射过程的调试信息,设置到您的 中/etc/postfix/generic
。您的映射过程终止于
maps_find: smtp_generic_maps: hash:/etc/postfix/generic(0,lock|fold_fix): root
表示这封电子邮件将发送给 root
检查debug_peer_list
并debug_peer_level
禁用main.cf
此选项(我个人将其注释掉并解决了我的日志过于冗长的问题)。您可以找到更多文档这里关于这些选项