Can't figure out how to "aggregate" the spam training for aliased users

Karl Denninger <[email protected]>
Newsgroups gmane.mail.spam.spamassassin.general
Message-ID <[email protected]>
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]."/

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?

-- 
Karl Denninger
[email protected]
/The Market Ticker/
/[S/MIME encrypted email preferred]/
smime.p7s (application/pkcs7-signature, 4.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.