[exim] Username in spam condition

Pàgina inicial
Delete this message
Reply to this message
Autor: John Hall
Data:  
A: exim-users
Assumpte: [exim] Username in spam condition
Hi,

Recently I think I've discovered that my SpamAssassin autolearning has
not been working, because exim and sa-learn have been modifiying the
bayes database as different users. This is with SA 3.1 and Exim 4.60.

The relevant stanza from my data ACL is as follows:

  # put headers in all messages (no matter if spam or not)
  warn  spam    = mail:true/defer_ok
        message = X-Scanned-By: SpamAssassin on mail.cambridgetechgroup.com\n\
                  X-Spam-Score: $spam_score\n\
                  X-Spam-Bar: $spam_bar\n


  # reject spam at high scores (> 10)
  deny  message = This message appears to be spam (score: $spam_score,
subject: \"$h_Subject:\")
        condition = ${if >{$spam_score_int}{100}{1}{0}}


I run sa-learn from a cron job like so:

su -c "sa-learn --spam --mbox <mbox >/dev/null" mail

The Bayes database is stored in mysql and it appears that sa-learn is
storing data as the user 'mail' as expected, but exim always stores
data as 'root', depsite specifying 'mail' in the spam condition.

I guess this can easily be fixed by running sa-learn as root rather
than mail, but I wanted to get to the bottom of why I exim's access to
the Bayes database is assumed to be root.

Regards,
John