Spamassassin via procmail: .procmailrc moves spam messages, but /etc/procmailrc doesn’t

procmailspamassassin

I am trying this example to set up spamassassin via procmail globally. It successfully adds the X-Spam headers, but it does not move messages to the spam mboxes.

However, using this example locally, at each user's .procmailrc file, does work (commenting out, as instructed, DROPPRIVS=yes).

I guess this is related to file permissions, but I'm lost about how to fix it. Any thoughts?

Thank you in advance!

EDIT: Following tripleee's suggestion, I enabled logging with the following results:

# cat /var/log/proclog 
procmail: Assigning "DROPPRIVS=yes"
procmail: Assuming identity of the recipient, VERBOSE=off
procmail: Lock failure on "spamassassin.lock"
procmail: Lock failure on "almost-certainly-spam.lock"
procmail: Error while writing to "almost-certainly-spam"
procmail: Lock failure on "probably-spam.lock"
procmail: Error while writing to "probably-spam"
From root@example.net  Sun Feb 12 06:12:44 2012
  Folder: /var/mail/user    

Best Answer

For the record I'm answering this, but the credit goes to tripleee for his suggestion. Adding the following line (or similar) in /etc/procmailrc fixes the issue:

MAILDIR=$HOME
Related Topic