Blacklist all + allow some?
Rich West
Rich.West at wesmo.com
Sun Jun 1 04:00:29 IST 2008
Glenn Steen wrote:
> I suppose you're asking what
> syntax you need use for a ruleset "blacklisting" everything, and then
> whitelisting some mails passing through MailScanner... In which case
> you can do this with a normal ruleset ... The syntax is described in
> numerous places (the EXAMPLES file in the rules subdirectory, the
> wiki, the book...) ... So all you really need do is decide on what
> setting (in MailScanner.conf) you should apply the ruleset, since this
> will
> a) decide what the rightmost value should be (it need make sense to
> the setting applied to), and
> b) affect what will actually happen.
>
> I'd think the "Is Definitely Spam"/"Is Definitely Not Spam" and
> perhaps "Definite Spam Is Highscoring" settings could be used for
> this, along with a "store" only "High Scoring Spam Actions" setting,
> or similar ... (or perhaps use a SA "rule" to tag the messages and
> selectively act on them with the new SA-rules actions... Seems a bit
> backward, but might be more manageable for you).
>
> Note that for this to really work on a "per intern basis", you need
> split your incoming mails into one/recipient, else MailScanner will
> just use the rules applicable for the first recipient.
>
> Links that apply to all this:
> http://www.mailscanner.info/MailScanner.conf.index.html#Is%20Definitely%20Spam
> http://www.mailscanner.info/MailScanner.conf.index.html#Is%20Definitely%20Not%20Spam
> http://www.mailscanner.info/MailScanner.conf.index.html#Definite%20Spam%20Is%20High%20Scoring
> http://www.mailscanner.info/MailScanner.conf.index.html#High%20Scoring%20Spam%20Actions
> http://wiki.mailscanner.info/doku.php?id=&idx=documentation:configuration:rulesets
> http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta:postfix:how_to:split_mails_per_recipient
> http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta:exim:how_to:split_mails_per_recipient
> http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta:sendmail:how_to:split_mails_per_recipient
> (watch out for line wrapping in the above:-)
>
> HtH
> Cheers
>
Ahh.. thanks. For what it is worth, I did check out a few of those
(some within the wiki lead to blank pages, and others are examples that
didn't really cover what I was looking for). I really thought that
there might have been some special syntax I was missing for the per-user
blacklist rule where you'd have one master blacklist rule for that user
which says "block everything" and the whitelist rules allowing email
from certain individuals (whitelists win).
Thankfully, I already split the emails to one per recipient.
Perhaps you are right.. an "Is Definitely Spam" ruleset might do the
trick. With entries like "To: user at mydomain.com yes"...
Hrmm.. I will have to test that.
Of course, after the first request at work to block inbound to a single
user, I now have a list of 22 interns I need to block.. Ugh.
-Rich
More information about the MailScanner
mailing list