procmail
[Top] [All Lists]

Fwd: Passing mail delivery onto /usr/bin/deliverquota with arguments defined by procmail

2009-01-14 10:48:01
Sorry if this has been sent more than once. This is the first time I use a
mailing list and I don't think I was registered on the previous attempts!

Hello,

New to procmail, and although I grasp the basics, I am not managing to do
exactly what I need, and I can't find a relevant part in the FAQs and other
tutorials to help me.

I am using qmail on a CentOS 5 VPS powered by PLESK in case it helps. Mail
is delivered to /var/qmail/mailnames/domain/user/Maildir

What I want is to check if spamassassin flagged this mail as spam, and if so
change the delivery destination (a .Spam folder). This bit is easy... below
is the pickle:

My .qmail file was:
*
| true
| /usr/bin/deliverquota ./Maildir*

Now it's:

*| true #This comment is not in the qmail file, but just to mention that the
same thing occurs with this pipe present or removed
| preline /usr/bin/procmail -m -o .procmailrc domain user
*
And my rc file is currently:

*MAILDIR=/var/qmail/mailnames/$1/$2/Maildir
SPAMDIR=$MAILDIR/.Spam/
#Spam handler
:0
* ^X-Spam-Status: Yes.*
| /usr/bin/deliverquota "$SPAMDIR"
#All other mail
:0 E
| /usr/bin/deliverquota "$MAILDIR"*

As you can see, I run it through deliverquota. This works (spam is filtered
correctly and mail is delivered) until I go over the quota. Usually, the
message would be bounced back saying the the mailbox has exceeded it's
limit, but now I get nothing, no mail in my inbox or bounce to the sender.
The message does reach the logs, and is archived by my archiver, but seems
to go no further (it's not in the mailbox at least). Any help?

It seems to me as if procmail ignores deliverquota and delivers. Ideally,
what I want to do is literally just "pass the buck" onto deliverquota and
let it do it's thing, as if it was on the .qmail file, but instead of
"./Maildir", it may have a different value for spam.

Sorry for the long explanation, any help would be appreciated!

Thanks,
Marcus
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail