Update quarantining.html.

This commit is contained in:
Zhang Huangbin 2014-09-26 23:31:30 +08:00
parent baa1ef1ee9
commit 3e41cf4d15
3 changed files with 180 additions and 30 deletions

View File

@ -1,11 +1,12 @@
# Quarantining
[TOC]
## Summary
Since iRedMail-`0.7.0`, quarantining related settings in Amavisd are configured
by iRedMail but disabled by default, you can easily enable quarantining with
this tutorial.
## Summary
With below steps, Virus/Spam/Banned emails will be quarantined into SQL database.
You can then manage quarantined emails with iRedAdmin-Pro.
@ -13,6 +14,7 @@ You can then manage quarantined emails with iRedAdmin-Pro.
Edit Amavisd config file, find below settings and update them. If it doesn't
exist, please add them.
* on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's `/etc/amavisd/amavisd.conf`
or `/etc/amavisd.conf`.
* on Debian/Ubuntu, it's `/etc/amavis/conf.d/50-user`.
@ -22,7 +24,7 @@ or `/etc/amavisd.conf`.
```
# File: amavisd.conf
# Change below two settings to D_DISCARD.
# Change below 3 parameters to D_DISCARD.
$final_virus_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
@ -42,15 +44,15 @@ $banned_files_quarantine_method = 'sql:';
Also, make sure you have below lines configured in same config file:
```
```perl
# For MySQL
@storage_sql_dsn = (
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'password-vHA1GCX0J9f23WJvqRzt7'],
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'password'],
);
# For PostgreSQL
#@storage_sql_dsn = (
# ['DBI:Pg:database=amavisd;host=127.0.0.1;port=5432', 'amavisd', 'password-vHA1GCX0J9f23WJvqRzt7'],
# ['DBI:Pg:database=amavisd;host=127.0.0.1;port=5432', 'amavisd', 'password'],
#);
```
@ -59,6 +61,7 @@ Restart amavisd service to make it work.
## Configure iRedAdmin-Pro to manage quarantined mails
Update iRedAdmin-Pro config file, 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, it's `/usr/share/apache2/iredadmin/settings.py`.
* on FreeBSD, it's `/usr/local/www/iredadmin/settings.py`.
@ -123,7 +126,8 @@ database.
## Screenshots
* View quarantined mails:
![]http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png)
![](http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png)
* Expand quarantined mail to view mail body and headers.

View File

@ -845,3 +845,135 @@
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantining](quarantining.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [Migrate iRedAdmin open source edition to iRedAdmin-Pro](migrate.or.upgrade.iredadmin.md)
* [Migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantining](quarantining.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [Migrate iRedAdmin open source edition to iRedAdmin-Pro](migrate.or.upgrade.iredadmin.md)
* [Migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantining](quarantining.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [Migrate iRedAdmin open source edition to iRedAdmin-Pro](migrate.or.upgrade.iredadmin.md)
* [Migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantining](quarantining.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [Migrate iRedAdmin open source edition to iRedAdmin-Pro](migrate.or.upgrade.iredadmin.md)
* [Migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)

View File

@ -11,23 +11,37 @@
// <a href="./index.html">Document Index</a>
</div><h1 id="quarantining">Quarantining</h1>
<div class="toc">
<ul>
<li><a href="#quarantining">Quarantining</a><ul>
<li><a href="#summary">Summary</a></li>
<li><a href="#update-amavisd-config-file-to-enable-normal-quarantining">Update Amavisd config file to enable normal quarantining</a></li>
<li><a href="#configure-iredadmin-pro-to-manage-quarantined-mails">Configure iRedAdmin-Pro to manage quarantined mails</a></li>
<li><a href="#quarantine-clean-emails">Quarantine clean emails</a></li>
<li><a href="#screenshots">Screenshots</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="summary">Summary</h2>
<p>Since iRedMail-<code>0.7.0</code>, quarantining related settings in Amavisd are configured
by iRedMail but disabled by default, you can easily enable quarantining with
this tutorial.</p>
<h2 id="summary">Summary</h2>
<p>With below steps, Virus/Spam/Banned emails will be quarantined into SQL database.
You can then manage quarantined emails with iRedAdmin-Pro.</p>
<h2 id="update-amavisd-config-file-to-enable-normal-quarantining">Update Amavisd config file to enable normal quarantining</h2>
<p>Edit Amavisd config file, find below settings and update them. If it doesn't
exist, please add them.
<em> on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's <code>/etc/amavisd/amavisd.conf</code>
or <code>/etc/amavisd.conf</code>.
</em> on Debian/Ubuntu, it's <code>/etc/amavis/conf.d/50-user</code>.
<em> on FreeBSD, it's <code>/usr/local/etc/amavisd.conf</code>.
</em> on OpenBSD, it's <code>/etc/amavisd.conf</code>.</p>
exist, please add them.</p>
<ul>
<li>on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's <code>/etc/amavisd/amavisd.conf</code>
or <code>/etc/amavisd.conf</code>.</li>
<li>on Debian/Ubuntu, it's <code>/etc/amavis/conf.d/50-user</code>.</li>
<li>on FreeBSD, it's <code>/usr/local/etc/amavisd.conf</code>.</li>
<li>on OpenBSD, it's <code>/etc/amavisd.conf</code>.</li>
</ul>
<pre><code># File: amavisd.conf
# Change below two settings to D_DISCARD.
# Change below 3 parameters to D_DISCARD.
$final_virus_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
@ -46,24 +60,26 @@ $banned_files_quarantine_method = 'sql:';
</code></pre>
<p>Also, make sure you have below lines configured in same config file:</p>
<pre><code># For MySQL
<pre><code class="perl"># For MySQL
@storage_sql_dsn = (
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'password-vHA1GCX0J9f23WJvqRzt7'],
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'password'],
);
# For PostgreSQL
#@storage_sql_dsn = (
# ['DBI:Pg:database=amavisd;host=127.0.0.1;port=5432', 'amavisd', 'password-vHA1GCX0J9f23WJvqRzt7'],
# ['DBI:Pg:database=amavisd;host=127.0.0.1;port=5432', 'amavisd', 'password'],
#);
</code></pre>
<p>Restart amavisd service to make it work.</p>
<h2 id="configure-iredadmin-pro-to-manage-quarantined-mails">Configure iRedAdmin-Pro to manage quarantined mails</h2>
<p>Update iRedAdmin-Pro config file, make sure you have correct settings for Amavisd:
<em> on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's <code>/var/www/iredadmin/settings.py</code>.
</em> on Debian, Ubuntu, it's <code>/usr/share/apache2/iredadmin/settings.py</code>.
<em> on FreeBSD, it's <code>/usr/local/www/iredadmin/settings.py</code>.
</em> on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</p>
<p>Update iRedAdmin-Pro config file, make sure you have correct settings for Amavisd:</p>
<ul>
<li>on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's <code>/var/www/iredadmin/settings.py</code>.</li>
<li>on Debian, Ubuntu, it's <code>/usr/share/apache2/iredadmin/settings.py</code>.</li>
<li>on FreeBSD, it's <code>/usr/local/www/iredadmin/settings.py</code>.</li>
<li>on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</li>
</ul>
<pre><code class="python"># File: settings.py
amavisd_db_host = '127.0.0.1'
@ -115,12 +131,10 @@ $clean_quarantine_to = 'clean-quarantine';
database.</p>
<h2 id="screenshots">Screenshots</h2>
<ul>
<li>
<p>View quarantined mails:
![]http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png)</p>
</li>
<li>
<p>Expand quarantined mail to view mail body and headers.</p>
</li>
<li>View quarantined mails:</li>
</ul>
<p><img alt="" src="http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png" /></p>
<ul>
<li>Expand quarantined mail to view mail body and headers.</li>
</ul>
<p><img alt="" src="http://www.iredmail.org/images/iredadmin/system_maillog_quarantined_expanded.png" /></p><br /><p>If you found something wrong in this document, please do <a href="http://www.iredmail.org/contact.html">conect us</a> to fix it.</p></body></html>