spamd support module
Steve Freegard
steve.freegard at fsl.com
Wed Aug 13 00:23:48 IST 2008
Ken A wrote:
> Wow. Nice work Steve! spamd already allows ~/.spamassassin configs, and
> mysql backend for per user rules. How would you implement per user rules
> scores differently, or why?
Well - the current code wouldn't work with the ~/.spamassassin configs
currently as it always sends spamd whatever user is configured as
$spamd_user in the .pm file.
For this to work properly in MailScanner it needs something like the
following pseudocode:
if (number of recipients > 1) then
if (number of recipient domains > 1) then
spamd user = $spamd_user
else
spamd user = domain.com
end if
else
spamd user = user at domain.com
end if
This way - the code would send spamd a 'User:' header of the recipient
e-mail address (if a single recipient) or the e-mail domain e.g. fsl.com
if there are multiple recipients but all in a single domain otherwise it
will send a default user if there are multiple recipients in mixed domains.
For this to work you'd need to configure spamd to use virtual config
directories.
Training also becomes a bit tricky as the same process has to be run to
work out which user to send to sa-learn.
I would probably suggest that per-user configs aren't really a good idea
unless you really, really need them for a specific purpose. It's
probably best to only go down to the per-domain level by default.
The other way to do it would be to have some sort of 'rules' file to
work out which user should be sent to spamd depending on the recipient
of recipient domain etc.
Cheers,
Steve.
More information about the MailScanner
mailing list