procmail
[Top] [All Lists]

Re: procmail and deliverquota exitcode

2006-07-19 13:11:11
On Wed, Jul 19, 2006 at 06:34:49PM +0200, Lucien GENTIS wrote:

Dallman Ross a écrit :

   DELQUOTA_OUT = $?
And use DELQUOTA_OUT in the second recipe instead of EXITCODE.

That was it !

Great.

Here are my 2 recipes :

:0 w
* ^X-Envelope-To: \/([-.a-zA-Z0-9]*)@
* MATCH ?? ()\/[^(_at_)]+
|/usr/local/courier-imap/bin/deliverquota -w 90 
${HOME}/${DOMAIN}/${MATCH}/Maildir/

DELQUOTA = $?

:0
* ? test $DELQUOTA -eq 77
| (/usr/bin/formail -r ; echo "Mailbox full") | /usr/sbin/sendmail -t -oi

I would try with procmail syntax rather than resorting to test.

   * DELQUOTA ?? ^^77^^

--- I need MATCH variable in order to extract the mailbox name of
email address

Fine, but I still recommend

  * ^X-Envelope-To: \/[^(_at_)]+

instead of your current two conditions.

Thanks a lot for the time you spent and the details about
procmailrc syntax

You're welcome.  (Maybe you'll actually try my syntax suggestions now.) :-)

Dallman

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>