Topic: Incoming emails are discarded instead of being moved to Quarantine
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version: 1.7.4
- Deployed with downloadable installer.
- Linux/BSD distribution name and version: CentOS Stream 8.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage with iRedAdmin-Pro! Yes
====
Hello,
I am having an issue with how Amavis handles banned emails (e.g., .exe attachments) on my iRedMail server.
The Problem:
Outgoing emails: If I send an email with a banned attachment to an external address (e.g., Gmail), Amavis correctly blocks it, and the message appears in the iRedAdmin-Pro Quarantine web interface, from where i can release or delete.
Incoming emails: If I receive an identical email from an external or internal address, the log shows "see below" and the email is deleted immediately. It does not appear in the Quarantine web interface.
Message: "Feb 18 11:59:57 mail amavis[3917994]: (3917994-06) Blocked BANNED (application/octet-stream,.exe,.exe-ms,timestamps) {DiscardedInternal,Quarantined}, ORIGINATING LOCAL [10.53.0.2]:65445 ESMTP/ESMTP"
Relevant configuration from my amavisd.conf:
# --- Final Destinies ---
$final_spam_destiny = D_DISCARD;
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
$final_bad_header_destiny = D_DISCARD;
# --- Quarantine Methods ---
$spam_quarantine_method = 'sql:';
$virus_quarantine_method = 'sql:';
$banned_files_quarantine_method = 'sql:';
$bad_header_quarantine_method = 'sql:';
# --- Quarantine Targets ---
$spam_quarantine_to = 'spam-quarantine';
$virus_quarantine_to = 'virus-quarantine';
$banned_quarantine_to = 'banned-quarantine';
$bad_header_quarantine_to = 'bad-header-quarantine';
# --- SQL Storage ---
@storage_sql_dsn = (['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'PASSWORD_HERE']);
@lookup_sql_dsn = @storage_sql_dsn;
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.