Topic: Amavis not sending BANNED/VIRUS warning message to external senders
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1 OPENLDAP edition (updated from 1.0)
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: Ubuntu (Server) 18.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I have a problem with warning messages in case of BANNED/VIRUS content.
I am using an external relayhost in my Postfix configuration and I have the following settings in my /etc/amavis/conf.d/20-debian_defaults
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_spam_destiny = D_BOUNCE;
$final_bad_header_destiny = D_PASS;
I have set warnbannedsender => 1 and warnvirussender => 1 in $policy_bank{'ORIGINATING'} of my /etc/amavis/conf.d/50-user and in amavis.policy SQL table, virus_lover is set to N and banned_files_lover is set to Y.
If I send a banned/virus file from user1@ourdomain.com to user2@ourdomain.com, user1@ourdomain.com receives the warning message accordingly.
example warning for sending banned file:
BANNED CONTENTS ALERT
Our content checker found
banned name: application/x-msdownload,.image,.png,test.dll
in email presumably from you <user1@ourdomain.com>
to the following recipient:
-> user2@ourdomain.com
Our internal reference code for your message is ...
The warning comes from postmaster@ourdomain.com and also a report from postmaster@mail.ourdomain.com (why the mail. though?!) will be sent to postmaster@domain.com.
If the banned/virus file sender is from an external domain, the sender does not receive any warning! Nor any report will be sent to postmaster@domain.com.
My guess is that somehow Amavis/Postfix do not follow the same relayhost smtp settings for sending warning messages! What do I look for?
I also noticed that in my /etc/amavis/conf.d/50-user some settings do not match the ones in etc/amavis/conf.d/20-debian_defaults:
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_bad_header_destiny = D_DISCARD;
Is this normal?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.