On 9/7/2010 7:11 PM, William Taylor wrote:
I want to be able to only allow a certain email to be sent from one of several 
hosts.

Currently im doing something like:

blacklist_from  [email protected]
whitelist_from_rcvd [email protected] mail.foo.com
whitelist_from_rcvd [email protected] sales.foo.com

This doesn't really do what I want because the blacklist and whitelist scores 
cancel each other out.

I saw talk in the past (2002?) about adding a unblacklist_from_rcvd

what I really want is a
blacklist_from [email protected]
unblacklist_from_rcvd [email protected] mail.foo.com

OR

only_allow_from_rcvd [email protected] mail.foo.com


What are my options for to accomplish this?
SA does not have any support for this.

The unblacklist commands do exist, but will only remove an entry that they match *EXACTLY*. Their function is implemented as "if this is found, delete it", and are intended to allow a user_prefs to completely delete site-wide white/blacklist entries. They cannot be used to create a blacklist with "holes" in it.

You can negate a blacklist with a whitelist, but the scores simply offset, as you've seen.

It is possible to change the scores of the whitelist rule, to make it larger in magnitude than the blacklist rule, and thus keeping some negative score..
i.e: adding this to your local.cf:

score USER_IN_WHITELIST -120.000

Would cause any white/black overlap to result in a -20 score. However, any whitelists without overlap would now get -120 instead of -100... That may or may not be an issue for you, but it is one approach to the problem you have.


see also man Mail::SpamAssassin::Conf:

    unwhitelist_from_rcvd [email protected]
        Used to override a default whitelist_from_rcvd entry, so for example
        a distribution whitelist_from_rcvd can be overridden in a local.cf
        file, or an individual user can override a whitelist_from_rcvd entry
        in their own "user_prefs" file.

        The specified email address has to match exactly the address
        previously used in a whitelist_from_rcvd line.






Reply via email to