IRedMail/FAQ/Quarantining.SPAM

From iRedMail
Revision as of 10:10, 1 July 2014 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Note: This tutorial is applicable to iRedMail-0.7.0 and later releases. If you're using iRedMail-0.6.1 and earlier versions, please refer to this tutorial.

Summary

Since iRedMail-0.7.0, quarantining related settings are configured but disabled by default, you can easily enable quarantining with this tutorial.

With below steps, Virus/Spam/Banned emails will be quarantined into SQL database. You can manage quarantined emails with iRedAdmin-Pro.

Configure Amavisd to enable quarantining

  • Edit Amavisd config file, find below settings and update them. If it doesn't exist, just add them.
    • on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's /etc/amavisd.conf or /etc/amavisd/amavisd.conf.
    • on Debian/Ubuntu/Mint, it's /etc/amavis/conf.d/50-user
    • on openSUSE, it's /etc/amavisd.conf
    • on Gentoo, it's /etc/amavisd.conf
    • on FreeBSD, it's /usr/local/etc/amavisd.conf
    • on OpenBSD, it's /etc/amavisd.conf
File: amavisd.conf
# Change below two settings to D_DISCARD.
$final_virus_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;

#
# Quarantine SPAM into SQL server.
#
$spam_quarantine_to = 'spam-quarantine';    # <- Remove '#' at the beginning of line.
$spam_quarantine_method = 'sql:';           # <- Remove '#' at the beginning of line.

#
# Quarantine VIRUS into SQL server.
#
$virus_quarantine_to = 'virus-quarantine';   # <- Remove '#' at the beginning of line.
$virus_quarantine_method = 'sql:';           # <- Remove '#' at the beginning of line.

#
# Quarantine BANNED emails into SQL server.
#
$banned_quarantine_to = 'banned-quarantine';
$banned_files_quarantine_method = 'sql:';

Also, make sure you have below lines configured in same config file. (It's configured and enabled by default since iRedMail-0.7.0):

File: amavisd.conf
@storage_sql_dsn = (
    ['DBI:...],
);
  • Restart amavisd service to make it work.

Configure iRedAdmin-Pro to manage quarantined mails

  • Edit iRedAdmin-Pro config file settings.py, make sure you have correct settings for Amavisd:
    • on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's /var/www/iredadmin/settings.py
    • on Debian, Ubuntu, Mint, it's /usr/share/apache2/iredadmin/settings.py
    • on openSUSE, it's /srv/www/iredadmin/settings.py
    • on Gentoo Linux, it's /var/www/iredadmin/settings.py
    • on FreeBSD, it's /usr/local/www/iredadmin/settings.py
    • on OpenBSD, it's /var/www/iredadmin/settings.py
File: settings.py
amavisd_enable_logging = True

amavisd_db_host = '127.0.0.1'
amavisd_db_port = 3306
amavisd_db_name = 'amavisd'
amavisd_db_user = 'amavisd'
amavisd_db_password = 'password'

amavisd_enable_quarantine = True
amavisd_quarantine_port = 9998
  • Restart Apache web server to make it work.
  • You can now login to iRedAdmin-Pro, and view quarantined mails via menu "System -> Quarantined Mails". Choose action in drop-down menu list to release or delete them.

Screenshots of iRedAdmin-Pro

Personal tools