procmail
[Top] [All Lists]

Re: Using Procmail to process header changes

2001-01-08 11:07:31
Kristopher Newman asked,

| Each lead has my address in the cc: field, the original customer's address
| in the to: field and the outside lead service's name in the from field. Can
| procmail be used to take that info and rewrite the header to put the
| original customer's address in the from: field? Then the email could be
| picked up and processed automatically by our other software.

Better, I'd say, leave From: alone and put the customer's address into
Reply-To: so that the downstream software will send replies to the customer:

  :0hfw
  * ^From: regexp_identifying_the_outside_lead_service
  * $ ^Cc: *$LOGNAME
  | formail -R To: Reply-To:
   :0a
   | the_other_program

If the software you're feeding it to does something besides replying and it
absolutely needs the customer's address in From:, then

  :0hfw
  * ^From: regexp_identifying_the_outside_lead_service
  * $ ^Cc: *$LOGNAME
  * ^To:[       ]*\/[^  ].*
  | formail -i "From: $MATCH"
   :0a
   | the_other_program

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