procmail
[Top] [All Lists]

Re: matching the "-a" argument?

2005-12-24 11:55:25
On Sat, Dec 24, 2005 at 12:50:56PM -0600, David W. Tamkin wrote:
Louis-David Mitterrand wrote:

In my postfix config I deliver to procmail with -a
    mailbox_command = /usr/bin/procmail -a "$EXTENSION"
How can I then match that $EXTENSION variable in my ~/.procmailrc?
I tried:
    :0
    *$ 1 ?? extension
    .junk-extension/
after reading that the -a arguments are numbered from $1, etc. but it
doesn't match.
How should I do it?

Special variables, other than H and B, don't work with ??.  You need to save 
it 
in a regular variable first:

 EXTENSION=$1

 :0
 * EXTENSION ?? extension
 .junk-extension/

Thanks!

I also finally found it by perusing pm-tips. Maybe this should be in one
of the procmail man pages?

-- 
   "God is a mathematician of very high order, and he used very
   advanced mathematics in constructing the universe."  (Dirac)

____________________________________________________________
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>