log:
2018-03-02 17:41:16 DEBUG smtp session: request=smtpd_access_policy
2018-03-02 17:41:16 DEBUG smtp session: protocol_state=RCPT
2018-03-02 17:41:16 DEBUG smtp session: protocol_name=ESMTP
2018-03-02 17:41:16 DEBUG smtp session: client_address=127.0.0.1
2018-03-02 17:41:16 DEBUG smtp session: client_name=mx3.mydomain
2018-03-02 17:41:16 DEBUG smtp session: reverse_client_name=mx3.mydomain
2018-03-02 17:41:16 DEBUG smtp session: helo_name=_
2018-03-02 17:41:16 DEBUG smtp session: sender=bawon@mydomain
2018-03-02 17:41:16 DEBUG smtp session: recipient=tes@mydomain
2018-03-02 17:41:16 DEBUG smtp session: recipient_count=0
2018-03-02 17:41:16 DEBUG smtp session: queue_id=
2018-03-02 17:41:16 DEBUG smtp session: instance=a67.5a992a4c.d6b80.0
2018-03-02 17:41:16 DEBUG smtp session: size=0
2018-03-02 17:41:16 DEBUG smtp session: etrn_domain=
2018-03-02 17:41:16 DEBUG smtp session: stress=
2018-03-02 17:41:16 DEBUG smtp session: sasl_method=LOGIN
2018-03-02 17:41:16 DEBUG smtp session: sasl_username=bawon@mydomain
2018-03-02 17:41:16 DEBUG smtp session: sasl_sender=
2018-03-02 17:41:16 DEBUG smtp session: ccert_subject=
2018-03-02 17:41:16 DEBUG smtp session: ccert_issuer=
2018-03-02 17:41:16 DEBUG smtp session: ccert_fingerprint=
2018-03-02 17:41:16 DEBUG smtp session: ccert_pubkey_fingerprint=
2018-03-02 17:41:16 DEBUG smtp session: encryption_protocol=TLSv1
2018-03-02 17:41:16 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2018-03-02 17:41:16 DEBUG smtp session: encryption_keysize=256
2018-03-02 17:41:16 DEBUG LDAP connection initialied success.
2018-03-02 17:41:16 DEBUG LDAP bind success.
2018-03-02 17:41:16 DEBUG --> Apply plugin: reject_null_sender
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG --> Apply plugin: wblist_rdns
2018-03-02 17:41:16 DEBUG Found SASL username, bypass rDNS check for outbound.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG --> Apply plugin: reject_sender_login_mismatch
2018-03-02 17:41:16 DEBUG Sender: bawon@mydomain, SASL username: bawon@mydomain
2018-03-02 17:41:16 DEBUG SKIP: sender == sasl username.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG --> Apply plugin: greylisting
2018-03-02 17:41:16 DEBUG Found SASL username, bypass greylisting for outbound email.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG --> Apply plugin: throttle
2018-03-02 17:41:16 DEBUG SKIP: Sender domain (@mydomain) is same as recipient domain.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG [+] Getting LDIF data of account: tes@mydomain
2018-03-02 17:41:16 DEBUG search base dn: o=domains,dc=mydomain
2018-03-02 17:41:16 DEBUG search scope: SUBTREE
2018-03-02 17:41:16 DEBUG search filter: (&(!(domainStatus=disabled))(|(mail=tes@mydomain)(shadowAddress=tes@mydomain))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2018-03-02 17:41:16 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy', 'enabledService']
2018-03-02 17:41:16 DEBUG result: [('mail=tes@mydomain,ou=Groups,domainName=mydomain,o=domains,dc=mydomain', {'objectClass': ['mailList'], 'accessPolicy': ['allowedonly'], 'listAllowedUser': ['mamat@mydomain'], 'enabledService': ['mail', 'deliver', 'displayedInGlobalAddressBook']})]
2018-03-02 17:41:16 DEBUG --> Apply plugin: ldap_maillist_access_policy
2018-03-02 17:41:16 DEBUG Access policy of mailing list (tes@mydomain): allowedonly
2018-03-02 17:41:16 DEBUG Primary and all alias domain names of recipient domain (mydomain): mydomain
2018-03-02 17:41:16 DEBUG Sender domain and sub-domains: mydomain, .mydomain, .co.id
2018-03-02 17:41:16 DEBUG Sender is not explicitly allowed, perform extra LDAP query to check access.
2018-03-02 17:41:16 DEBUG Allowed users: mamat@mydomain
2018-03-02 17:41:16 DEBUG Allowed domains:
2018-03-02 17:41:16 DEBUG [+] Getting per-account alias addresses of allowed senders.
2018-03-02 17:41:16 DEBUG base dn: ou=Users,domainName=mydomain,o=domains,dc=mydomain
2018-03-02 17:41:16 DEBUG search scope: ONELEVEL
2018-03-02 17:41:16 DEBUG search filter: (&(objectClass=mailUser)(enabledService=shadowaddress)(|(mail=mamat@mydomain)(shadowAddress=mamat@mydomain)))
2018-03-02 17:41:16 ERROR <!> Error while applying plugin "ldap_maillist_access_policy": ['Traceback (most recent call last):\n', ' File "/opt/iRedAPD-2.2/libs/utils.py", line 105, in apply_plugin\n', ' File "/opt/iredapd/plugins/ldap_maillist_access_policy.py", line 220, in restriction\n', "UnboundLocalError: local variable 'search_attrs' referenced before assignment\n"]
2018-03-02 17:41:16 DEBUG --> Apply plugin: amavisd_wblist
2018-03-02 17:41:16 DEBUG [LDAP] query target domain of given alias domain (mydomain).
2018-03-02 17:41:16 DEBUG [LDAP] query filter: ((&(objectClass=mailDomain)(accountStatus=active)(domainAliasName=mydomain)))
2018-03-02 17:41:16 DEBUG result: []
2018-03-02 17:41:16 DEBUG [LDAP] query target domain of given alias domain (mydomain).
2018-03-02 17:41:16 DEBUG [LDAP] query filter: ((&(objectClass=mailDomain)(accountStatus=active)(domainAliasName=mydomain)))
2018-03-02 17:41:16 DEBUG result: []
2018-03-02 17:41:16 DEBUG Possible policy senders: ['bawon@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id', '127.0.0.1', '127.0.0.*', '127.0.*.1']
2018-03-02 17:41:16 DEBUG Possible policy recipients: ['tes@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id']
2018-03-02 17:41:16 DEBUG Apply wblist for outbound message.
2018-03-02 17:41:16 DEBUG [SQL] Query local addresses:
SELECT id, email
FROM users
WHERE email IN ('bawon@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id', '127.0.0.1', '127.0.0.*', '127.0.*.1')
ORDER BY priority DESC
2018-03-02 17:41:16 DEBUG Local addresses (in `users`): [(1L, '@.')]
2018-03-02 17:41:16 DEBUG [SQL] Query external addresses:
SELECT id, email
FROM mailaddr
WHERE email IN ('tes@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id')
ORDER BY priority DESC
2018-03-02 17:41:16 DEBUG No record found in SQL database.
2018-03-02 17:41:16 DEBUG [SQL] Query CIDR network:
SELECT id, email
FROM mailaddr
WHERE email LIKE '127.%%'
ORDER BY priority DESC
2018-03-02 17:41:16 DEBUG No valid sender id or recipient id.
2018-03-02 17:41:16 DEBUG Apply wblist for inbound message.
2018-03-02 17:41:16 DEBUG [SQL] Query local addresses:
SELECT id, email
FROM users
WHERE email IN ('tes@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id')
ORDER BY priority DESC
2018-03-02 17:41:16 DEBUG Local addresses (in `users`): [(1L, '@.')]
2018-03-02 17:41:16 DEBUG [SQL] Query external addresses:
SELECT id, email
FROM mailaddr
WHERE email IN ('bawon@mydomain', '@mydomain', '@.', '@.mydomain', '@.co.id', '@.id', '127.0.0.1', '127.0.0.*', '127.0.*.1')
ORDER BY priority DESC
2018-03-02 17:41:16 DEBUG No record found in SQL database.
2018-03-02 17:41:16 DEBUG No valid sender id or recipient id.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG Session ended.
2018-03-02 17:41:16 INFO [127.0.0.1] RCPT, bawon@mydomain => tes@mydomain, DUNNO [sasl_username=bawon@mydomain, sender=bawon@mydomain, client_name=mx3.mydomain, reverse_client_name=mx3.mydomain, helo=_, encryption_protocol=TLSv1, process_time=0.0153s]
2018-03-02 17:41:16 DEBUG Close LDAP connection.
2018-03-02 17:41:16 DEBUG smtp session: request=smtpd_access_policy
2018-03-02 17:41:16 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2018-03-02 17:41:16 DEBUG smtp session: protocol_name=ESMTP
2018-03-02 17:41:16 DEBUG smtp session: client_address=127.0.0.1
2018-03-02 17:41:16 DEBUG smtp session: client_name=mx3.mydomain
2018-03-02 17:41:16 DEBUG smtp session: reverse_client_name=mx3.mydomain
2018-03-02 17:41:16 DEBUG smtp session: helo_name=_
2018-03-02 17:41:16 DEBUG smtp session: sender=bawon@mydomain
2018-03-02 17:41:16 DEBUG smtp session: recipient=tes@mydomain
2018-03-02 17:41:16 DEBUG smtp session: recipient_count=1
2018-03-02 17:41:16 DEBUG smtp session: queue_id=DC195D7483
2018-03-02 17:41:16 DEBUG smtp session: instance=a67.5a992a4c.d6b80.0
2018-03-02 17:41:16 DEBUG smtp session: size=355
2018-03-02 17:41:16 DEBUG smtp session: etrn_domain=
2018-03-02 17:41:16 DEBUG smtp session: stress=
2018-03-02 17:41:16 DEBUG smtp session: sasl_method=LOGIN
2018-03-02 17:41:16 DEBUG smtp session: sasl_username=bawon@mydomain
2018-03-02 17:41:16 DEBUG smtp session: sasl_sender=
2018-03-02 17:41:16 DEBUG smtp session: ccert_subject=
2018-03-02 17:41:16 DEBUG smtp session: ccert_issuer=
2018-03-02 17:41:16 DEBUG smtp session: ccert_fingerprint=
2018-03-02 17:41:16 DEBUG smtp session: ccert_pubkey_fingerprint=
2018-03-02 17:41:16 DEBUG smtp session: encryption_protocol=TLSv1
2018-03-02 17:41:16 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2018-03-02 17:41:16 DEBUG smtp session: encryption_keysize=256
2018-03-02 17:41:16 DEBUG LDAP connection initialied success.
2018-03-02 17:41:16 DEBUG LDAP bind success.
2018-03-02 17:41:16 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG Skip plugin: wblist_rdns (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG Skip plugin: reject_sender_login_mismatch (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG --> Apply plugin: throttle
2018-03-02 17:41:16 DEBUG SKIP: Sender domain (@mydomain) is same as recipient domain.
2018-03-02 17:41:16 DEBUG <-- Result: DUNNO
2018-03-02 17:41:16 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2018-03-02 17:41:16 DEBUG Session ended.
2018-03-02 17:41:16 INFO [127.0.0.1] END-OF-MESSAGE, bawon@mydomain => tes@mydomain, DUNNO [recipient_count=1, size=355, process_time=0.0031s]
2018-03-02 17:41:16 DEBUG Close LDAP connection.