procmail
[Top] [All Lists]

Removing Message Body and Inserting Text

2002-12-31 14:12:28
Please don't flame, my first post to this list.....

Based on the Procmail FAQ this seems like this should work but it
doesn't. I get the message but it doesn't remove the attachment or
append the text.  I am just trying to remove any attachment with an
extension of .foo or .dog.  And replace it with a short narrative in the
body of the message.  I do however want to keep the headers intact so I
know who sent the original message. I would appreciate any suggestions. 


-------------------SNIP--------------------
:0 B
* ^Content-Type.*(\.foo|\.dog)
     {
       :0 fb
       | cat - ; echo "This attachment is bad." ;

       :0 w
       ! -f "$@"
     }  

----------------SNIP---------------------


Thanks,

Nick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nick Mitchell
Network Engineer
Delaware.Net, Inc.
Mail: nick(_at_)delaware(_dot_)net
Voice:302.736.5515 x17
Web: http://www.delaware.net
ICQ: 31676269
Artificial Intelligence: The Final Frontier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


_______________________________________________
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>
  • Removing Message Body and Inserting Text, Nick Mitchell <=