1 (edited by tuxg 2014-05-08 20:40:30)

Topic: How to ensure all the mails go through quarantine directory

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.x
- Related log if you're reporting an issue:
====

Hi,
      We would like to approve outgoing mails manually. So we are thinking of sending them to one quarantine folder. How can we see their contents through a browser and approve them manually? And, is there a better way of doing this?

Thanks

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to ensure all the mails go through quarantine directory

You can quarantine spam/virus/banned message into SQL database with Amavisd, unfortunately, i didn't see any message in mailing list mention about how to (successfully) quarantine clean message. It's better to ask in Amavisd mailing list instead:
http://www.ijs.si/software/amavisd/#support

Or, you can write your own transport program to quarantine emails.

3

Re: How to ensure all the mails go through quarantine directory

OK, found an old mailing thread i posted, here's a working setting to quarantine clean message into SQL database. Steps:

1: Add below settings in /etc/amavisd/amavisd.conf:

$clean_quarantine_method = 'sql:';
$clean_quarantine_to = 'clean-quarantine';

2: Find policy bank 'MYUSERS', append two lines in this policy bank:

$policy_bank{'MYUSERS'} = {
    ...
    clean_quarantine_method => 'sql:',
    final_destiny_by_ccat => {CC_CLEAN, D_DISCARD},
}

3: Make sure you have '@storage_sql_dsn' enabled. For example:

@storage_sql_dsn = (
    ['DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', 'qAv9CYva0vHA1GCX0J9f23WJvqRzt7'],
);

4: Restart Amavisd service.

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. Screenshot of iRedAdmin-Pro for your reference:

http://www.iredmail.org/images/iredadmin/system_maillog_quarantined.png

http://www.iredmail.org/images/iredadmin/system_maillog_quarantined_expanded.png

4

Re: How to ensure all the mails go through quarantine directory

UPDATE: This short tutorial is now a wiki article:
http://www.iredmail.org/wiki/index.php? … Clean.Mail

5

Re: How to ensure all the mails go through quarantine directory

Sorry for the delay and Thanks a lot Zhang for spending time in digging this for us.