How to use spamassassin on a per user basis with a third party e-mail server setup?

Ken Anderson ka at PACIFIC.NET
Wed Jul 9 16:25:34 IST 2003


We have a similar relay setup. We've just implemented
whitelist/blacklist per user rules, and per user "spam action" rules
(attachment,deliver or just deliver). We have not exposed the control to
users yet though, since improper rules will cause undesired side
effects. For example, since the mailservers are configured to allow up
to x number of recipients per message and MailScanner only looks at the
TO envelope sender, rules made by one user will affect other users. 99%
of the time it's just a spam dictionary attack that is affected by this.
Anyone know of a way around this issue?

The rules are stored in mysql for easy webifying, and a perl script
generates the rule files for MailScanner if the db is changed.
A simple db with (id, rule_owner, rule_type, rule_operation, rule_value)
works for any rule type, though some fields may be left empty for some
rule types.

See CustomConfig.pm for an example (see 'ByDomain' rules). This can be
easily modified to 'ByEmail..' rules, so that whitelist/blacklist rules
are read from (for example)
"/etc/MailScanner/spam.user/whitelist/user at domain.com" files.
In MS.conf, you specify "Is Definitely Not Spam = &ByEmailWhitelist"

Spam Action rules are handled as a normal ruleset.
Spam Action = /etc/MailScanner/rules/spam.action.rules
In spam.action.rules, you have things like this:
To:     someuser at somedomain.com deliver
To:     domain.net      attachment,deliver
To:     spamdeath at nospam.net    delete

Ken
Pacific.Net


Orbitel Webmaster wrote:

> What have you found as the easiest way to enable/disable spamassassin
> for individual e-mail addresses?  Our mailscanner server is being
> utilized in a third party e-mail server enviroment (relay) therefore
> there cannot be individual user accounts and spamassassin preference
> files.
>
> I would like the ability to either disable tagging, enable tagging,
> or enable auto spam deletion on a per e-mail address basis.  I would
> like all settings to default to off.  Additionally, all users will
> receive e-mail virus scanning.
>
> Can someone point me in the right direction -- documentation or
> otherwise?  The closest I have found is spamassassin's userpref's
> file on their website.
>
> Thanks!
>
>



More information about the MailScanner mailing list