2014-09-18 20:17:10 -05:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
2014-09-20 23:35:18 -05:00
|
|
|
<title>Quarantine clean mail into SQL database</title>
|
2014-09-18 20:17:10 -05:00
|
|
|
<link href="../css/markdown.css" rel="stylesheet"></head>
|
|
|
|
</head>
|
|
|
|
<body>
|
2014-09-20 09:32:14 -05:00
|
|
|
|
|
|
|
<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>
|
2014-09-18 20:17:10 -05:00
|
|
|
<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>
|
2014-09-20 05:55:33 -05:00
|
|
|
<pre><code>$clean_quarantine_method = 'sql:';
|
2014-09-18 20:17:10 -05:00
|
|
|
$clean_quarantine_to = 'clean-quarantine';
|
2014-09-20 05:55:33 -05:00
|
|
|
</code></pre>
|
2014-09-18 20:17:10 -05:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Find policy bank 'MYUSERS', append two lines in this policy bank:</li>
|
|
|
|
</ul>
|
2014-09-20 05:55:33 -05:00
|
|
|
<pre><code>$policy_bank{'MYUSERS'} = {
|
2014-09-18 20:17:10 -05:00
|
|
|
...
|
2014-09-20 05:55:33 -05:00
|
|
|
clean_quarantine_method => 'sql:',
|
|
|
|
final_destiny_by_ccat => {CC_CLEAN, D_DISCARD},
|
2014-09-18 20:17:10 -05:00
|
|
|
}
|
2014-09-20 05:55:33 -05:00
|
|
|
</code></pre>
|
2014-09-18 20:17:10 -05:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Make sure you have '@storage_sql_dsn' enabled. For example:</li>
|
|
|
|
</ul>
|
2014-09-20 05:55:33 -05:00
|
|
|
<pre><code>@storage_sql_dsn = (
|
2014-09-18 20:17:10 -05:00
|
|
|
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'qAv9CYva0vHA1GCX0J9f23WJvqRzt7'],
|
|
|
|
);
|
2014-09-20 05:55:33 -05:00
|
|
|
</code></pre>
|
2014-09-18 20:17:10 -05:00
|
|
|
|
|
|
|
<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>
|
2014-09-20 08:19:37 -05:00
|
|
|
<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>
|