You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by John Rutherford <jr...@ascensionortho.com> on 2005/04/13 23:03:14 UTC
procmail and sieve working together..
I have been playing around with SA on a test server since I got it
running on friday. I have searched google and the archive for this
mailing list on gmane but have been unable to find a working solution
for my problem.
My mail server runs fetchmail which delivers pop'd mail to a postfix
2.2.2 server
my main.cf has these two lines:
mailbox_command = /usr/bin/procmail -a "$EXTENSION" "$USER"
mailbox_transport = procmail
my master.cf has this line:
procmail unix - n n - - pipe
flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user}
EXTENSION=${extension} /etc/procmailrc
So then the mail gets passed to procmail where SA runs before calling
deliver to drop the mail to a cyrus 2.2.12 server
my /etc/procmailrc is like this:
LOGFILE=/var/log/procmail
INCLUDERC=/home/procmail/$USER/.procmailrc
:0 fw
* < 256000
|/usr/bin/spamc -f
:0
* ^X-SPAM-STATUS: YES
| /usr/cyrus/bin/deliver -m user.$USER.spam -a $USER
:0
| /usr/cyrus/bin/deliver -m user.$USER -a $USER
The mail gets delivered just fine and the spam gets moved to a spam but
the sieve scripts are never run. I have a webbased email program called
squirrelmail that has a plugin so my users can create thier own sieve
scripts for things like automatically filing of mail into subfolders and
setting up vacation messages. Right now I have it set up to use
.procmailrc files for each test user for the filing butI would like
sieve to work so I don't have to maintain a separate .procmailrc file
for each of my users.
Has anyone gotten procmail to deliver to cyrus with the sieve scripts
running? If so can you see anything wrong with my config?
I apologize if this question has been answered before but google didn't
return anything helpful.
One post I found suggested using formail to change the headers before
passing to deliver like this:
:0 fw
* ENV_TO ?? .
| formail -i "X-Envelope-To: "$USER@$DOMAIN | tail +2
|/usr/cyrus/bin/deliver -m user.$USER -a $USER
but that didn't work for me. I could see the new header but nothing go
moved. I have also read about using a different program like amavisd to
insert the spam headers before passing the mail to cyrus but I really
like that procmail can move spam to everyone's spam folder with one
global config file rather than having to create sieve scripts for each
user to filter the spam to the spam folder.
Thanks,
john