1

Topic: Mails Whitelist are still Quarantined

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: Ubuntu 10.04 LTS
- iRedMail version and backend (LDAP/MySQL): iRedAdmin-Pro     v1.3.1 (MySQL), iRedMail 0.7.4
- Any related log? Log is helpful for troubleshooting.
====

Hello, I enabled policyd with this manual
http://www.iredmail.org/wiki/index.php? … ian.Ubuntu
everything else is default, nothing changed.
But there are several heavy senders who's letters always end up in Quarantine, but they are also in Whitelist.

Why mails are still Quarantined?

----

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

2

Re: Mails Whitelist are still Quarantined

Please add these senders in /etc/mail/spamassassin/local.cf also. For example:

whitelist_from user@domain.ltd

3

Re: Mails Whitelist are still Quarantined

ZhangHuangbin wrote:

Please add these senders in /etc/mail/spamassassin/local.cf also. For example:

whitelist_from user@domain.ltd

Thanks, I think it worked. What is Whitelist for if not spam?

4

Re: Mails Whitelist are still Quarantined

redbaron wrote:

Thanks, I think it worked. What is Whitelist for if not spam?

I think we need to do some more to avoid managing whitelists in two places:

1) Policyd database. This is the records you managed with iRedAdmin-Pro.
2) SpamAssassin whitelist. This is the one you added in /etc/mail/spamassassin/local.cf.

First one is used to bypass clients, so that emails will enter your mail server.
Second one is used to whitelist senders, so that emails won't be marked as spam.

The quick solution is, creating a cron job, dump all whitelists from Policyd database, then import it in SpamAssassin config file. For example:

1) Create script to dump whitelists from Policyd database to a plain text file. For example, /etc/mail/spamassassin/whitelists_from_policyd.cf. Format must be:

whitelist_from xxx

2) Add one line in /etc/mail/spamassassin/local.cf:

include whitelists_from_policyd.cf

That's all.

5

Re: Mails Whitelist are still Quarantined

I made script, maybe anyone else is interested.

#!/bin/bash
mysql -uuser -ppassword -Dpostfixpolicyd -sN -e 'select _whitelist  from whitelist_sender'|sed 's|^|whitelist_from |'>/etc/mail/spamassassin/whitelist_from_policyd.cf

One question, do I need to reload amavis or anything else? Or Changes are applied in realtime?

6

Re: Mails Whitelist are still Quarantined

redbaron wrote:

I made script, maybe anyone else is interested.

Thanks for your sharing. smile

redbaron wrote:

One question, do I need to reload amavis or anything else? Or Changes are applied in realtime?

As i can remember, restarting Amavisd is not required. But could you help make some testing to verify it?

7

Re: Mails Whitelist are still Quarantined

ZhangHuangbin wrote:
redbaron wrote:

I made script, maybe anyone else is interested.

Thanks for your sharing. smile

redbaron wrote:

One question, do I need to reload amavis or anything else? Or Changes are applied in realtime?

As i can remember, restarting Amavisd is not required. But could you help make some testing to verify it?

Yes, amavisd needs to be restarted. I've just tested it...