How can I disable admin email notifications in Amavis?

Overview

Amavis manages notification routing for detected viruses, spam, banned file attachments, and malformed headers through specific configuration variables. By default, these variables are undefined:

# $newvirus_admin = undef;
# $virus_admin = undef;
# $spam_admin = undef;
# $banned_admin = undef;
# $bad_header_admin = undef;

However, Debian and Ubuntu distributions override this behavior by setting virus notifications in /etc/amavis/conf.d/20-debian_defaults:

$virus_admin = "postmaster\@$mydomain"; # due to D_DISCARD default

This article outlines the procedure to disable virus notification emails across supported Linux distributions.

Prerequisites

  • Sudo or root access to the server
  • A command-line text editor (e.g., nano, vim)

Distribution-Specific Configuration Files

The location of the Amavis configuration file varies by operating system:

  • AlmaLinux/CloudLinux/RHEL: /etc/amavisd/warden.conf
  • Debian/Ubuntu: /etc/amavis/conf.d/99-warden

Procedure: Disable Virus Notifications

  1. Open the appropriate configuration file for your operating system using a text editor.
  2. Navigate to the end of the file and locate the final line, which contains 1;.
  3. Add the following directive immediately before that line:
$virus_admin = undef;

Apply Changes

  1. Save the file and exit the text editor.
  2. Restart the Amavis service to apply the configuration changes. Execute the command corresponding to your distribution:
// AlmaLinux/CloudLinux/RHEL
systemctl restart amavisd

// Debian/Ubuntu
systemctl restart amavis

Troubleshooting

  • Service fails to restart: Verify the syntax of the edited configuration file. Ensure the added line is placed directly before the final 1; statement and contains no trailing spaces or typographical errors.
  • Virus notifications persist after changes: Confirm that the correct distribution-specific configuration file was modified. Inspect other files within the Amavis configuration directory for conflicting overrides.
  • notifications, postmaster
  • 1 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How can I install or upgrade the extension?

We provide free installation and configuration for all our paid licenses. Open a support ticket...

How can I add stronger Postfix restrictions so that the bulk of spam is rejected at the SMTPD level before it gets processed by Amavis?

Overview Warden enables administrators to enforce stricter Postfix SMTPD restrictions. These...

How can I change the interface language of the extension?

Overview This article provides instructions on how to change the interface language within the...

How can I configure greylisting with Warden Anti-spam and Virus protection?

Overview Greylisting is an email filtering mechanism designed to mitigate spam by temporarily...