Hi 版主, 現才回覆 ,抱歉.
ZhangHuangbin 写道:- 能否确认没有 user 将邮件 forward 给 admin@?
- 需要贴出 postfix log 和 Dovecot log 来帮助判断到底收件人有哪些。
現我從gmail 的網頁寄給 test2@mydomain.com
此帳號 user profile 的BCC 是關掉的 ;
我在 postfix 啟用debug:
main.cf:
debug_peer_level = 10
debug_peer_list = 127.0.0.1
debug_peer_list = mydomain.com
#mynetworks = 127.0.0.1 [::1]
mynetworks = 127.0.0.1
master.cf:
smtp inet n - n - 1 postscreen -v
smtpd pass - - n - - smtpd -v
pickup unix n - n 60 1 pickup -v
cleanup unix n - n - 0 cleanup -v
cleanup unix n - n - 0 cleanup -v
qmgr unix n - n 300 1 qmgr -v
下面為log :
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/virtual_group_maps.cf flags=lock|fold_fix key=test2@mydomain.com -> status=1 result=
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/virtual_group_members_maps.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/virtual_group_members_maps.cf flags=lock|fold_fix key=test2@mydomain.com -> status=0 result=test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: maps_find: virtual_alias_maps: proxy:ldap:/etc/postfix/ldap/virtual_group_members_maps.cf(0,lock|fold_fix): test2@mydomain.com = test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: mail_addr_find: test2@mydomain.com -> test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: rewrite_clnt: cached: local: test2@mydomain.com -> test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: mail_addr_map: test2@mydomain.com -> 0: test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here: test2@mydomain.com: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here_check: test2@mydomain.com: 1
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here: test2@mydomain.com: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/recipient_bcc_maps_user.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 1
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/recipient_bcc_maps_user.cf flags=lock|fold_fix key=test2@mydomain.com -> status=1 result=
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = test2@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf flags=lock|fold_fix key=test2@mydomain.com -> status=0 result=admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: maps_find: recipient_bcc_maps: proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf(0,lock|fold_fix): test2@mydomain.com = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: mail_addr_find: test2@mydomain.com -> admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = rewrite
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr rule = local
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr address = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/rewrite socket: wanted attribute: flags
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: flags
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/rewrite socket: wanted attribute: address
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: address
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/rewrite socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: rewrite_clnt: local: admin@mydomain.com -> admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here_check: admin@mydomain.com: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/virtual_alias_maps.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 1
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/virtual_alias_maps.cf flags=lock|fold_fix key=admin@mydomain.com -> status=1 result=
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/virtual_group_maps.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 1
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/virtual_group_maps.cf flags=lock|fold_fix key=admin@mydomain.com -> status=1 result=
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr request = lookup
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr table = ldap:/etc/postfix/ldap/virtual_group_members_maps.cf
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr flags = 16448
Dec 14 13:45:17 mail postfix/cleanup[5523]: send attr key = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: status
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: value
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute value: admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: private/proxymap socket: wanted attribute: (list terminator)
Dec 14 13:45:17 mail postfix/cleanup[5523]: input attribute name: (end)
Dec 14 13:45:17 mail postfix/cleanup[5523]: dict_proxy_lookup: table=ldap:/etc/postfix/ldap/virtual_group_members_maps.cf flags=lock|fold_fix key=admin@mydomain.com -> status=0 result=admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: maps_find: virtual_alias_maps: proxy:ldap:/etc/postfix/ldap/virtual_group_members_maps.cf(0,lock|fold_fix): admin@mydomain.com = admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: mail_addr_find: admin@mydomain.com -> admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: rewrite_clnt: cached: local: admin@mydomain.com -> admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: mail_addr_map: admin@mydomain.com -> 0: admin@mydomain.com
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here: admin@mydomain.com: 0
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here_check: admin@mydomain.com: 1
Dec 14 13:45:17 mail postfix/cleanup[5523]: been_here: admin@mydomain.com: 0
Dec 14 13:45:17 mail postfix/smtpd[5516]: >>> START End-of-data RESTRICTIONS <<<
上面,實際的log 有2200多行, 在開始出現 admin@ 附近的log,我把其節錄出來.
dovecot 未有 log 訊息(dovceot.log ,lda.log ,imap.log , pop3.log), 倒是 iRedApd 有 log
2018-12-14 13:45:17 INFO [209.85.210.45] Client is whitelisted for greylisting service: (id=120867, sender=209.85.128.0/17, comment="AUTO-UPDATE: stackoverflow.com")
2018-12-14 13:45:17 INFO [209.85.210.45] RCPT, rain6966@gmail.com -> test2@mydomain.com, DUNNO [sasl_username=, sender=rain6966@gmail.com, client_name=mail-ot1-f45.google.com, reverse_client_name=mail-ot1-f45.google.com, helo=mail-ot1-f45.google.com, encryption_protocol=TLSv1.2, process_time=0.0138s]
2018-12-14 13:45:17 INFO [209.85.210.45] END-OF-MESSAGE, rain6966@gmail.com -> test2@mydomain.com, DUNNO [recipient_count=1, size=2291, process_time=0.0080s]
lda.log 應該有 ,為何在 13:45 期間沒有出現log? 其它時段進來的信件,在lda.log 是有訊息的.
下面為先前幾天的測試log:
Dec 12 22:06:27 mail dovecot: lda(admin@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=test bcc, msgid=<947d2bd4-6ed9-d57c-7199-404d06bbec8b@gmail.com>, size=3870, stored mail into mailbox 'INBOX'
Dec 12 22:06:30 mail dovecot: lda(test@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=test bcc, msgid=<947d2bd4-6ed9-d57c-7199-404d06bbec8b@gmail.com>, size=3843, stored mail into mailbox 'INBOX'
Dec 12 22:32:52 mail dovecot: lda(admin@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=For test BCC 測試, msgid=<CAOAF3wkvS5vNeV7o2k=q8VH8VE7a__BM+Nchsm0TciMh_oXwzw@mail.gmail.com>, size=3289, stored mail into mailbox 'INBOX'
Dec 12 22:32:52 mail dovecot: lda(test@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=For test BCC 測試, msgid=<CAOAF3wkvS5vNeV7o2k=q8VH8VE7a__BM+Nchsm0TciMh_oXwzw@mail.gmail.com>, size=3262, stored mail into mailbox 'INBOX'
Dec 12 23:22:18 mail dovecot: lda(admin@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=test for BCC 測試2, msgid=<CAOAF3w=dw4gvk1DOqfgMBq5UV2MgA6++XpDAP+OUT0184aNWpA@mail.gmail.com>, size=3129, stored mail into mailbox 'INBOX'
Dec 12 23:22:18 mail dovecot: lda(test4@mydomain.com): sieve: from=rain6966@gmail.com, envelope_sender=rain6966@gmail.com, subject=test for BCC 測試2, msgid=<CAOAF3w=dw4gvk1DOqfgMBq5UV2MgA6++XpDAP+OUT0184aNWpA@mail.gmail.com>, size=3105, stored mail into mailbox 'INBOX'
以上為現所能提供的訊息 .