procmail
[Top] [All Lists]

Comparing two values (like an if statement)

2007-01-31 03:30:52
Hi,

I want to test two values (from address and reply to address) but procmail 
doesnt accept normal if statements.

is there a way to do this?

the normal if statement would be:
if ($REPLYTO == $SENTFROM) 
        do something
  else 
do something different

I tried adding it to procmail like so:

if ($REPLYTO == $SENTFROM) 
        :0f
        * ^Subject:\/.*
       | formail -i "Subject: [REPLY ADDRESS MATCHED] $MATCH"
  else 
        :0f
        * ^Subject:\/.*
       | formail -i "Subject: [REPLY ADDRESS MISMATCH] $MATCH"
:0w
    ! -oi -f "$@"
  } 


But this didnt work :o(
any pointers would be mutch appreciated

thanks
Dave


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