procmail, cyrdeliver, mailbox names

Dan White dwhite at olp.net
Thu Mar 11 00:59:03 EST 2010


On 11/03/10 00:10 -0500, brian wrote:
>I'm trying to get procmail to send SPAM to Junk folders for virtual 
>users. I have it set up to use cyrdeliver for that. I feel like I'm 
>almost there but I haven't been able to figure out precisely how to pass 
>the mailbox name.
>
>This was giving me headaches with procmail until i realised that I could 
>have it pass the job to cyrdeliver, which I expected would know to do 
>the right thing. However, it looks like I'm not passing it the correct 
>info to do so. I keep getting "Mailbox does not exist" errors because of 
>the way that cyrdeliver expects the mailbox name.
>
>Additionally, the account login names are the complete email address.
>
>/etc/postfix/master.cf:
>
>spamassassin unix -     n       n       -       -       pipe
>         user=spamd argv=/usr/bin/spamc -f -e
>         /usr/sbin/sendmail -oi -f ${sender} ${recipient}
>procmail    unix    -    n    n    -    -    pipe
>     flags=R user=cyrus argv=/usr/bin/procmail -t
>     -m USER=${user}@${domain}
>     EXTENSION=${extension} /etc/procmailrc
>
>
>
>bally at artemis:/etc$ sudo cat procmailrc
>PATH=/usr/local/bin:/usr/bin:/bin
>SHELL = /bin/sh
>LOGFILE     = /var/log/procmail.log
>LOGABSTRACT = "all"
>VERBOSE     = "on"
>
>:0
>* ^X-Spam-Flag: YES
>| /usr/sbin/cyrdeliver -a $USER -m $USER.junk
>
>:0
>| /usr/sbin/cyrdeliver -a $USER -m $USER

Try:

/usr/sbin/cyrdeliver -m 'Junk' -a $USER $USER

-- 
Dan White


More information about the Info-cyrus mailing list