Topic: blacklist recipient on catch-all domain
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.3
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): DAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes, 2.4.0
- Related log if you're reporting an issue:
====
I applied the patch from http://www.iredmail.org/forum/topic1041 … blem.html. However, it appears that my blacklist is geting ignored.
in iRedAdmin Pro
I have the following Blacklisted recipients for the domain TESTDOMAIN.com
*bugreport@DESTDOMAIN.com
There is NOT a user with the name of bugreport in LDAP. However, the domain does have a catch all. So the idea is that bugreport@ would be an exception to this catchall.
2016-01-07 23:49:51 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 23:49:51 DEBUG smtp session: protocol_state=RCPT
2016-01-07 23:49:51 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 23:49:51 DEBUG smtp session: client_address=2600::::::
2016-01-07 23:49:51 DEBUG smtp session: client_name=mail-io0-x22c.google.com
2016-01-07 23:49:51 DEBUG smtp session: reverse_client_name=mail-io0-x22c.google.com
2016-01-07 23:49:51 DEBUG smtp session: helo_name=mail-io0-x22c.google.com
2016-01-07 23:49:51 DEBUG smtp session: sender=TESTSEND@gmail.com
2016-01-07 23:49:51 DEBUG smtp session: recipient=bugreport@DESTDOMAIN.com
2016-01-07 23:49:51 DEBUG smtp session: recipient_count=0
2016-01-07 23:49:51 DEBUG smtp session: queue_id=
2016-01-07 23:49:51 DEBUG smtp session: instance=42c5.568f3fef.dcbe9.0
2016-01-07 23:49:51 DEBUG smtp session: size=2038
2016-01-07 23:49:51 DEBUG smtp session: etrn_domain=
2016-01-07 23:49:51 DEBUG smtp session: stress=
2016-01-07 23:49:51 DEBUG smtp session: sasl_method=
2016-01-07 23:49:51 DEBUG smtp session: sasl_username=
2016-01-07 23:49:51 DEBUG smtp session: sasl_sender=
2016-01-07 23:49:51 DEBUG smtp session: ccert_subject=
2016-01-07 23:49:51 DEBUG smtp session: ccert_issuer=
2016-01-07 23:49:51 DEBUG smtp session: ccert_fingerprint=
2016-01-07 23:49:51 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 23:49:51 DEBUG smtp session: encryption_protocol=TLSv1.2
2016-01-07 23:49:51 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES128-GCM-SHA256
2016-01-07 23:49:51 DEBUG smtp session: encryption_keysize=128
2016-01-07 23:49:51 DEBUG LDAP connection initialied success.
2016-01-07 23:49:51 DEBUG LDAP bind success.
2016-01-07 23:49:51 DEBUG --> Apply plugin: reject_null_sender
2016-01-07 23:49:51 DEBUG <-- Result: DUNNO
2016-01-07 23:49:51 DEBUG --> Apply plugin: greylisting
2016-01-07 23:49:51 DEBUG [SQL] Query greylisting whitelists:
SELECT id, sender
FROM greylisting_whitelists
WHERE account IN ('bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.')
2016-01-07 23:49:51 DEBUG No whitelist found.
2016-01-07 23:49:51 DEBUG [SQL] query greylisting settings:
SELECT id, account, sender, sender_priority, active
FROM greylisting
WHERE account IN ('bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.')
ORDER BY priority DESC, sender_priority DESC
2016-01-07 23:49:51 DEBUG [SQL] query result: []
2016-01-07 23:49:51 DEBUG No setting found, greylisting is disabled for this client.
2016-01-07 23:49:51 DEBUG <-- Result: DUNNO
2016-01-07 23:49:51 DEBUG --> Apply plugin: amavisd_wblist
2016-01-07 23:49:51 DEBUG Possible policy senders: ['@.', 'TESTSEND@gmail.com', '@gmail.com', '@.gmail.com', '@com', '@.com', 'TESTSEND@*', '2600::::::']
2016-01-07 23:49:51 DEBUG Possible policy recipients: ['@.', 'bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.DESTDOMAIN.com', '@com', '@.com']
2016-01-07 23:49:51 DEBUG Apply wblist for inbound message.
2016-01-07 23:49:51 DEBUG [SQL] Query local addresses:
SELECT id, email
FROM users
WHERE email IN ('@.', 'bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.DESTDOMAIN.com', '@com', '@.com')
ORDER BY priority DESC
2016-01-07 23:49:51 DEBUG Local addresses (in `users`): [(2L, '@DESTDOMAIN.com'), (1L, '@.')]
2016-01-07 23:49:51 DEBUG [SQL] Query external addresses:
SELECT id, email
FROM mailaddr
WHERE email IN ('@.', 'TESTSEND@gmail.com', '@gmail.com', '@.gmail.com', '@com', '@.com', 'TESTSEND@*', '2600::::::')
ORDER BY priority DESC
2016-01-07 23:49:51 DEBUG No record found in SQL database.
2016-01-07 23:49:51 DEBUG No valid sender id or recipient id.
2016-01-07 23:49:51 DEBUG <-- Result: DUNNO
2016-01-07 23:49:51 DEBUG --> Apply plugin: throttle
2016-01-07 23:49:51 DEBUG Check sender throttling.
2016-01-07 23:49:51 DEBUG [SQL] Query throttle setting:
SELECT id, account, priority, period, max_msgs, max_quota, msg_size
FROM throttle
WHERE kind='outbound' AND account IN ('2600::::::', '@ip', '@.', 'TESTSEND@gmail.com', '@gmail.com', '@.gmail.com', '@com', '@.com')
ORDER BY priority DESC
2016-01-07 23:49:51 DEBUG [SQL] Query result:
[]
2016-01-07 23:49:51 DEBUG No sender throttle setting.
2016-01-07 23:49:51 DEBUG Check recipient throttling.
2016-01-07 23:49:51 DEBUG [SQL] Query throttle setting:
SELECT id, account, priority, period, max_msgs, max_quota, msg_size
FROM throttle
WHERE kind='inbound' AND account IN ('2600::::::', '@ip', '@.', 'bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.DESTDOMAIN.com', '@com', '@.com')
ORDER BY priority DESC
2016-01-07 23:49:51 DEBUG [SQL] Query result:
[]
2016-01-07 23:49:51 DEBUG No recipient throttle setting.
2016-01-07 23:49:51 DEBUG <-- Result: DUNNO
2016-01-07 23:49:51 DEBUG [+] Getting LDIF data of account: bugreport@DESTDOMAIN.com
2016-01-07 23:49:51 DEBUG search base dn: o=domains,dc=DESTDOMAIN,dc=com
2016-01-07 23:49:51 DEBUG search scope: SUBTREE
2016-01-07 23:49:51 DEBUG search filter: (&(|(mail=bugreport@DESTDOMAIN.com)(shadowAddress=bugreport@DESTDOMAIN.com))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-07 23:49:51 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-07 23:49:51 DEBUG No such account.
2016-01-07 23:49:51 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-07 23:49:51 DEBUG <-- Result: DUNNO (No recipient LDIF data)
2016-01-07 23:49:51 INFO [2600::::::] RCPT, TESTSEND@gmail.com -> bugreport@DESTDOMAIN.com, DUNNO
2016-01-07 23:49:51 DEBUG Session ended
2016-01-07 23:49:51 DEBUG Close LDAP connection.
2016-01-07 23:49:52 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 23:49:52 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-07 23:49:52 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 23:49:52 DEBUG smtp session: client_address=2600::::::
2016-01-07 23:49:52 DEBUG smtp session: client_name=mail-io0-x22c.google.com
2016-01-07 23:49:52 DEBUG smtp session: reverse_client_name=mail-io0-x22c.google.com
2016-01-07 23:49:52 DEBUG smtp session: helo_name=mail-io0-x22c.google.com
2016-01-07 23:49:52 DEBUG smtp session: sender=TESTSEND@gmail.com
2016-01-07 23:49:52 DEBUG smtp session: recipient=bugreport@DESTDOMAIN.com
2016-01-07 23:49:52 DEBUG smtp session: recipient_count=1
2016-01-07 23:49:52 DEBUG smtp session: queue_id=E135F17CB
2016-01-07 23:49:52 DEBUG smtp session: instance=42c5.568f3fef.dcbe9.0
2016-01-07 23:49:52 DEBUG smtp session: size=2038
2016-01-07 23:49:52 DEBUG smtp session: etrn_domain=
2016-01-07 23:49:52 DEBUG smtp session: stress=
2016-01-07 23:49:52 DEBUG smtp session: sasl_method=
2016-01-07 23:49:52 DEBUG smtp session: sasl_username=
2016-01-07 23:49:52 DEBUG smtp session: sasl_sender=
2016-01-07 23:49:52 DEBUG smtp session: ccert_subject=
2016-01-07 23:49:52 DEBUG smtp session: ccert_issuer=
2016-01-07 23:49:52 DEBUG smtp session: ccert_fingerprint=
2016-01-07 23:49:52 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 23:49:52 DEBUG smtp session: encryption_protocol=TLSv1.2
2016-01-07 23:49:52 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES128-GCM-SHA256
2016-01-07 23:49:52 DEBUG smtp session: encryption_keysize=128
2016-01-07 23:49:52 DEBUG LDAP connection initialied success.
2016-01-07 23:49:52 DEBUG LDAP bind success.
2016-01-07 23:49:52 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-07 23:49:52 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-07 23:49:52 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-07 23:49:52 DEBUG --> Apply plugin: throttle
2016-01-07 23:49:52 DEBUG Check sender throttling.
2016-01-07 23:49:52 DEBUG [SQL] Query throttle setting:
SELECT id, account, priority, period, max_msgs, max_quota, msg_size
FROM throttle
WHERE kind='outbound' AND account IN ('2600::::::', '@ip', '@.', 'TESTSEND@gmail.com', '@gmail.com', '@.gmail.com', '@com', '@.com')
ORDER BY priority DESC
2016-01-07 23:49:52 DEBUG [SQL] Query result:
[]
2016-01-07 23:49:52 DEBUG No sender throttle setting.
2016-01-07 23:49:52 DEBUG Check recipient throttling.
2016-01-07 23:49:52 DEBUG [SQL] Query throttle setting:
SELECT id, account, priority, period, max_msgs, max_quota, msg_size
FROM throttle
WHERE kind='inbound' AND account IN ('2600::::::', '@ip', '@.', 'bugreport@DESTDOMAIN.com', '@DESTDOMAIN.com', '@.DESTDOMAIN.com', '@com', '@.com')
ORDER BY priority DESC
2016-01-07 23:49:52 DEBUG [SQL] Query result:
[]
2016-01-07 23:49:52 DEBUG No recipient throttle setting.
2016-01-07 23:49:52 DEBUG <-- Result: DUNNO
2016-01-07 23:49:52 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-07 23:49:52 INFO [2600::::::] END-OF-MESSAGE, TESTSEND@gmail.com -> bugreport@DESTDOMAIN.com, DUNNO
2016-01-07 23:49:52 DEBUG Session ended
2016-01-07 23:49:52 DEBUG Close LDAP connection.
Thank you for iRedMail!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.