IRedMail/FAQ/Quarantining.SPAM
From iRedMail
(Difference between revisions)
(→Configure Amavisd to enable quarantining) |
|||
| Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
| - | Note: This tutorial is appliable | + | Note: This tutorial is appliable to iRedMail-0.7.0 and later versions. If you're using iRedMail-0.6.1 and earlier versions, please refer to [[IRedMail/FAQ/Quarantining.Messages |this tutorial]]. |
= Summary = | = Summary = | ||
| Line 15: | Line 15: | ||
$final_spam_destiny = D_DISCARD; # <- Change it to D_DISCARD | $final_spam_destiny = D_DISCARD; # <- Change it to D_DISCARD | ||
| + | # | ||
| + | # Quarantine SPAM into MySQL. | ||
| + | # | ||
$spam_quarantine_to = 'spam-quarantine'; # <- Remove '#' at the beginning of line. | $spam_quarantine_to = 'spam-quarantine'; # <- Remove '#' at the beginning of line. | ||
$spam_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. | $spam_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. | ||
| + | # | ||
| + | # Quarantine VIRUS into MySQL. | ||
| + | # | ||
$virus_quarantine_to = 'virus-quarantine'; # <- Remove '#' at the beginning of line. | $virus_quarantine_to = 'virus-quarantine'; # <- Remove '#' at the beginning of line. | ||
$virus_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. | $virus_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. | ||
| Line 57: | Line 63: | ||
* [http://screenshots.iredmail.googlecode.com/hg/iredadmin/system_maillog_quarantined.png View quarantined mails] | * [http://screenshots.iredmail.googlecode.com/hg/iredadmin/system_maillog_quarantined.png View quarantined mails] | ||
* [http://screenshots.iredmail.googlecode.com/hg/iredadmin/system_maillog_quarantined_expanded.png Expand quarantined mail to view mail headers and body] | * [http://screenshots.iredmail.googlecode.com/hg/iredadmin/system_maillog_quarantined_expanded.png Expand quarantined mail to view mail headers and body] | ||
| + | |||
| + | = ChangeLog = | ||
| + | * 2011-04-12: Add '''"$virus_quarantine_to ="''' and '''$virus_quarantine_method ="''', used to quarantine VIRUS into MySQL database. | ||
Revision as of 14:31, 12 April 2011
Contents |
Note: This tutorial is appliable to iRedMail-0.7.0 and later versions. If you're using iRedMail-0.6.1 and earlier versions, please refer to this tutorial.
Summary
iRedMail-0.7.0 has quarantining related settings pre-configured, but users can't manage quarantined mails, so quarantining is disabled by default.
Since iRedAdmin-Pro supports releasing and deleting quarantined mails, you can easily enable quarantining with this tutorial.
Configure Amavisd to enable quarantining
- Edit Amavisd config file "/etc/amavisd.conf" (RHEL/CentOS/openSUSE) or "/etc/amavis/conf.d/50-users" (Debian/Ubuntu) or "/usr/local/etc/amavisd.conf" (FreeBSD), find below settings and change them:
| File: amavisd.conf |
$final_spam_destiny = D_DISCARD; # <- Change it to D_DISCARD # # Quarantine SPAM into MySQL. # $spam_quarantine_to = 'spam-quarantine'; # <- Remove '#' at the beginning of line. $spam_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. # # Quarantine VIRUS into MySQL. # $virus_quarantine_to = 'virus-quarantine'; # <- Remove '#' at the beginning of line. $virus_quarantine_method = 'sql:'; # <- Remove '#' at the beginning of line. |
Also, make sure you have below lines configured in same config file (It's configured by default in iRedMail-0.7.0):
| File: amavisd.conf |
$sql_allow_8bit_address = 1;
$timestamp_fmt_mysql = 1;
@storage_sql_dsn = (
['DBI:mysql:database=...],
);
|
- Restart amavisd service to make it work.
Configure iRedAdmin-Pro to manage quarantined mails
- Edit iRedAdmin-Pro config file "/var/www/iredadmin/settings.ini" (RHEL/CentOS) or "/usr/share/apache2/iredadmin/settings.ini" (Debian/Ubuntu) or "/srv/www/iredadmin/settings.ini" (openSUSE) or "/usr/local/www/iredadmin/settings.ini" (FreeBSD), make sure you have correct settings in "[amavisd]" section like below:
| File: settings.ini |
[amavisd] quarantine = True # <- Set to True to enable quaranting management. server = 127.0.0.1 quarantine_port = 9998 logging_into_sql = True # <- Set to True to view log of sent/received mails. host = 127.0.0.1 port = 3306 db = amavisd user = amavisd passwd = [passwd_of_mysql_user_amavisd] |
- Restart Apache web server to make it work.
- You can now login to iRedAdmin-Pro, and view quarantined mails via menu "System -> Quarantined Mails". Use drop-down menu list to release or delete them.
Screenshots:
ChangeLog
- 2011-04-12: Add "$virus_quarantine_to =" and $virus_quarantine_method =", used to quarantine VIRUS into MySQL database.
