procmail
[Top] [All Lists]

Re: exporting header variables

2000-11-07 16:36:40
Joel Dudley wrote:
Here is what I have for my .procmailrc and my script is still not getting
the variables

Joel, Sorry about the bounce; my .procmailrc says EXITCODE=EX_NOUSER
if mail is sent to my employer's mail gateway from an unresolvable or
dialup address.

I modified your script slightly, put in a file 'x', and fed your
message into it...

    $ cat x
    LOGFILE=/dev/tty
    SHELL=/bin/sh

    :0
    * ^Subject:.*\/[^       ].*
    { SUBJECT=$MATCH }

    :0
    * ^To:.*\/[^    ].*
    { TO=$MATCH }

    :0
    | /home/collin/yy

The file "yy" looks like this:

    $ cat yy
    #!/bin/sh
    env > /dev/tty

And when I feed your message through procmail using my 'x' file...

    $ procmail x < Mail/backup/24826
    <snip>
    MATCH="'Collin Park'" <collin(_at_)cup(_dot_)hp(_dot_)com>
    SUBJECT=RE: exporting header variables
    <snip>
    TO="'Collin Park'" <collin(_at_)cup(_dot_)hp(_dot_)com>
    <snip>
    $ 

So... this script gets the variables in its environment.  How are you
determining that the variables aren't getting into your script?

If you replace your script by what I have in my 'yy' file above, does
SUBJECT= not show up?  TO=?

-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.  Sorry.
Collin Park                         Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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