Re: Can't figure out how to "aggregate" the spam training for aliased users
Matus UHLAR - fantomas <[email protected]>
| Newsgroups | gmane.mail.spam.spamassassin.general |
|---|---|
| Message-ID | <[email protected]> |
wOn 13.03.25 09:34, Karl Denninger wrote:
>I'm sure this has come up before but I don't see a way to do it in the
>docs or Wiki.
>
>I have a number of "role" accounts that, in some cases, get email from
>more than one domain. All are considered "local" by my postfix and
>dovecot config, thus all the mail from those domains gets dumped into
>the user account related to same, with the "role" accounts in the
>/etc/aliases file.
>
>For example, I have an "editor" user that is not really a user, but is
>in the aliases file to this account, and said "editor" address is
>valid not only for denninger.net, but also for a couple of other
>domains that I run a web property for on behalf of someone else.
>
>If someone spams that "editor" user Spamassassin will use its built-in
>rules -- but it does /not /honor the Bayesian classifier training that
>my account ("karl") has, and so if I put a spam that got through in
>"Junk" while the classifier will do its job if someone spams
>"[email protected]" later with that same classified content /it won't
>look at the classifier data all for a future email that comes to
>"[email protected]."/
If you use spamd, it tries to use user (provided by spamc client) and its
home directory used for bayes database etc.
...unless you call spamd with "-u user", then it always uses that user.
You can specify "-U username" to use as default user if provided does not
exist.
spamass-milter by default passes recipient user e.g. "editor" to spamd.
Further it supports "-x" option to pass user to "sendmail -bv" which can be
used for alias expansion, but this only works with "sendmail" MTA.
Postfix' sendmail works differently, but you can provide spamass-milter with
program/script doing the same with "-S /path/to/sendmail", if you have any.
(I don't, so far)
This helps me much, the only problem currently is if there is (system) user
with the same name as recipient.
>This behavior isn't surprising because postfix consults /etc/aliases
>during local delivery -- so it would appear that I need to be able to
>tell SpamAssassin about said aliases somehow, lest it think the bayes
>classifier is unique to each of those aliased addresses and since they
>have no separate "junk" and "not junk" folders it never gets trained.
>
>I do not want to set up separate mailboxes for each of these (there
>are quite a few) and maintain all the different bayes databases for
>each -- what I want to direct Spamasssin to do is, for certain target
>users, honor the bayes database for the ultimate target. I don't mind
>setting that up explicitly (since I have to put said role accounts in
>/etc/aliases anyway) but there doesn't appear to be a way to do this,
>thus the bayes filter, which is one of the most-useful in terms of
>"learning" what you say "is" and "is not" spam over time, doesn't
>appear to have a way to be applied to said role accounts.
>
>In postfix master.cf I have the following directive which calls the
>spamassassin-provided "spamchk" script:
>
># Spam Assassin
>spamchk unix   -      n      n      -      10     pipe
>Â Â Â Â Â Â Â flags=Rq user=spamd argv=/usr/local/bin/spamchk ${user} -f
>${sender} --
>${recipient}
>
>And it is called from the smtp line in master.cf with:
>
>smtp     inet n      -      n      -      -      smtpd
>Â Â Â Â Â Â Â -o smtpd_sasl_auth_enable=no -o content_filter=spamchk:dummy
>
>There are some other comments around the web that appear to imply the
>aliases are applied /first /before this gets run but that is not what
>I'm seeing.
>
>Am I missing a directive somewhere?
--
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The only substitute for good manners is fast reflexes.