procmail
[Top] [All Lists]

regexp - question 1

2000-09-27 09:07:48
I am probably not going about this very well.  I will
try and break my questions down into smaller ones.
Please bear with me. Feel free to cut out most of this
when replying.  

It is sometimes the case with formail that you want to affect some 
header fields with the -I flag

formail -cz -I "From: $REALSENDER"

I think I am missing something very basic with \/

header line:    "From: bozo(_at_)bozo(_dot_)com"

* ^From:+\/.*
        { REALSENDER = $MATCH }
       
if you find one occurance of "From:" then put what
follows the match "From:" into REALSENDER  
which is " bozo(_at_)bozo(_dot_)com" If correct, do I want the 
leading space there? Aren't I getting a space between
"From:" and "bozo(_at_)bozo(_dot_)com" from

formail -cz -I "From: $REALSENDER"  

I think + here instead of * before \/ because
if there is no line starting out "From:" the
email will fail anyway (for my purposes)
In that case, should I check for "Reply-To" ??

Would

* ^From:.+\/.*
        { REALSENDER = $MATCH }

match the whole "From: bozo(_at_)bozo(_dot_)com"
and so "" would be put into REALSENDER ??

=================================================

say the subject line in the header is
"Subject: Re: MailWeb: Test A xxxxxxxxxxxxxxxxxx 99bozo(_at_)bozo(_dot_)com"

* ^Subject:.[99]*\/.*
 { ORIGINATOR = $MATCH }

would this match
"Subject: Re: MailWeb: Test A xxxxxxxxxxxxxxxxxx 99"
and put "bozo(_at_)bozo(_dot_)com" in ORIGINATOR ??
Should I have "99 " so I put " bozo(_at_)bozo(_dot_)com" in for -I ?

would 

* ^Subject:.[/*/-]*\/.*
 { ORIGINATOR = $MATCH }

work for 

"Subject: Re: MailWeb: Test A xxxxxxxxxxxxxxxxxx *-bozo(_at_)bozo(_dot_)com"



!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 Is there a limit to how long the subject line can be and
 not be chopped off??
       
 Thanks  Tom

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