2014-09-18 20:17:10 -05:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2014-09-20 05:50:50 -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 05:50:50 -05:00
< 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 >
< pre >
$clean_quarantine_method = 'sql:';
$clean_quarantine_to = 'clean-quarantine';
< / pre >
< ul >
< li > Find policy bank 'MYUSERS', append two lines in this policy bank:< / li >
< / ul >
< pre >
$policy_bank{'MYUSERS'} = {
...
clean_quarantine_method => 'sql:',
final_destiny_by_ccat => {CC_CLEAN, D_DISCARD},
}
< / pre >
< ul >
< li > Make sure you have '@storage_sql_dsn' enabled. For example:< / li >
< / ul >
< pre >
@storage_sql_dsn = (
['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'qAv9CYva0vHA1GCX0J9f23WJvqRzt7'],
);
< / 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 >
< p > Screenshot of iRedAdmin-Pro for your reference < / p >
< / li >
< li >
< p > < a href = "http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png" > View quarantined mails< / a > < / p >
< / li >
< li > < a href = "http://www.iredmail.org/images/iredadmin/system_maillog_quarantined_expanded.png" > Expand quarantined mail to view mail headers and body< / a > < / li >
< / ul > < / body > < / html >