1

Topic: Amavis blacklist bouncing emails

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====

Amavis blacklist is working totally fine, but the messages are bounced to sender with notification "Blacklisted". Is it possible to discard blacklisted emails, same way like amavis can discard virus, spam and bad headers?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by RikuS 2016-08-06 03:42:25)

Re: Amavis blacklist bouncing emails

Got it working, here's the info if someone else is looking for same thing.

White and blacklists are rejected by iredapd plugin amavisd_wblist, but emails are bounced back to sender with the information that sender is blacklisted. To disable that, remove plugin from iredapd settings. After removing plugin, amavis will give high spam score for blacklisted senders and they will be treated like spam, so it will bounced it set it to bounce by final_spam_destiny on amavis.

EDIT: looks like outbound blacklisting is done only by iredapd, so need to work with this more. Is it possible to discard email with iredapd, or can we easily disable handling inbound blacklisten mails with iredapd and use it only for outbound?

EDIT2: Made it with amavisd_blist plugin, so that can be kept on iredapd settings. On amvisd_wblist.py there's a line "return SMTP_ACTIONS['reject_blacklisted']" inside "apply_wblist_on_inbound". If you want to treat blacklisted mails as spam, you can change "reject_blacklisted" to "default". If you want no bounce messages for sender and just discard the mail, you can change it to "discard". Still I'm interested why blacklisted emails are bouncing by default?

3

Re: Amavis blacklist bouncing emails

iRedAPD rejects the email during smtp session (before queue, not after-queue), so it doesn't reach Amavisd at all. I need to know the content of this bounce message to figure out which component sent it. So, Could you please show me a sample of this bounce message?

4

Re: Amavis blacklist bouncing emails

With default settings, the bounce message is like this, credentials snipped:

==================
Mail Delivery Subsystem <mailer-daemon@googlemail.com>
==================
Delivery to the following recipient failed permanently:

     user@domain.ltd

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain domain.ltd by mail.domain.ltd. [123.123.123.123].

The error that the other server returned was:
554 5.7.1 <user@domain.ltd>: Recipient address rejected: Blacklisted
==================

So, like I wrote above, changing reject_blacklisted action to discard, will stop bouncing and just discards the email. I think usually people don't want the blacklisted senders to know that they are blacklisted.

5

Re: Amavis blacklist bouncing emails

RikuS wrote:

So, like I wrote above, changing reject_blacklisted action to discard, will stop bouncing and just discards the email. I think usually people don't want the blacklisted senders to know that they are blacklisted.

This makes sense. I will change the default blacklisting action to 'DISCARD' instead of 'REJECT' in next iRedAPD release. Thanks for the suggestion. smile

6

Re: Amavis blacklist bouncing emails

UPDATE: FIXED.
https://bitbucket.org/zhb/iredapd/commi … ed72da5d83