How can we help?

Watch this space: Upcoming Help Centre Migration


Adding Per-domain Anti-Virus and Anti-Spam Support

Stewart -

I want to add per domain Anti-Virus and Anti-Spam support.


  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

Anti-Virus and Anti-Spam configuration.


You can add per-domain AV and Spam filtering support, if you wish. Just follow the following steps:

  1. Open up /usr/local/atmail/mailserver/configure
  2. Find:
    MYSQL_DOMAINS = select Hostname from Domains where Hostname='${quote_mysql:$domain}'
  3. Below this, add:
    MYSQL_AVCHECK = SELECT Hostname from Domains where AV='1' and Hostname='$domain'

    MYSQL_SPAMCHECK = SELECT Hostname from Domains where Spam='1' and Hostname='$domain'
  4. Then, find this line:
    domainlist relay_to_domains =
  5. Below this, add:
    domainlist sa_domains = mysql;MYSQL_SPAMCHECK
    domainlist av_domains = mysql;MYSQL_AVCHECK
  6. Then, find:
    accept  hosts = :
  7. Below this, add:
    warn domains = +av_domains
    set acl_m1 = 1

    warn domains = +sa_domains
    set acl_m2 = 1
  8. Then, find:
  9. Below this, add:
    accept condition = ${if match{$acl_m1}{1}}
    accept condition = ${if match{$acl_m2}{1}}
  10. Login to your MySQL
  11. Add the two other columns to the Domains table:
    mysql> alter table Domains add Spam tinyint(1) default NULL;
    mysql> alter table Domains add AV tinyint(1) default NULL;
  12. To enable filtering for a specific domain, do the following:
    mysql> update Domains set Spam='1' where Hostname='';
    Replace with your chosen domain.

  13. Restart atmail:
    % /etc/init.d/atmailserver restart


Contact our support team

+61 (7) 5357 6605