iredmail-doc/html/howto/quarantining.clean.mail.html

59 lines
2.3 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Quarantine clean mail into SQL database</title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<div id="navigation">
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
// <a href="../index.html">Document Index</a>
</div><h1 id="quarantine-clean-mail-into-sql-database">Quarantine clean mail into SQL database</h1>
<p>To quarantine clean mails into SQL database, please follow below steps:</p>
<h1 id="configure-amavisd-to-enable-quarantining">Configure Amavisd to enable quarantining</h1>
<ul>
<li>Edit Amavisd config file, find below settings and update them. If it doesn't exist, just add them.<ul>
<li>on Red Hat Enterprise Linux, CentOS, Scientific Linux, it's <code>/etc/amavisd/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>
</li>
</ul>
<pre><code>$clean_quarantine_method = 'sql:';
$clean_quarantine_to = 'clean-quarantine';
</code></pre>
<ul>
<li>Find policy bank 'MYUSERS', append two lines in this policy bank:</li>
</ul>
<pre><code>$policy_bank{'MYUSERS'} = {
...
clean_quarantine_method =&gt; 'sql:',
final_destiny_by_ccat =&gt; {CC_CLEAN, D_DISCARD},
}
</code></pre>
<ul>
<li>Make sure you have '@storage_sql_dsn' enabled. For example:</li>
</ul>
<pre><code>@storage_sql_dsn = (
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'qAv9CYva0vHA1GCX0J9f23WJvqRzt7'],
);
</code></pre>
<ul>
<li>Restart Amavisd service.</li>
</ul>
<p>That's all. Now all clean emails sent by your mail users will be quarantined
into SQL database. if you have iRedAdmin-Pro, you can manage (release or delete)
quarantined emails with it.</p>
<ul>
<li>Screenshot of iRedAdmin-Pro for your reference </li>
</ul>
<p>View quarantined mails
<img alt="" src="http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png" /></p>
<p>Expand quarantined mail to view mail headers and body
<img alt="" src="http://www.iredmail.org/images/iredadmin/system_maillog_quarantined_expanded.png" /> </p></body></html>