procmail
[Top] [All Lists]

Re: Help!

2002-04-05 10:15:55
On  4 Apr, Mike Klein wrote:
| I am trying to write a recipe that will do two things: change the name of 
| an attachment (abc.exe => abc.exe.fixed) and insert a line of text into the 
| email message to inform the user. The first part of my recipe works fine. 
| However, lines are added after the last boundary line and doesn't show up 
| as part of the message.
| 
| -----PROCMAILRC------
| 
| [...]
| 
|    :0 f
|     | cat - ; echo "=== Attachment name changed ==="
|    :0
|     ${DEFAULT}
| [...]

As TjL alluded, you're likely to encounter trouble inserting/deleting
text from multipart messages. Or more specifically, some mail client
software may be unable to grok some messages after munging.  That said,
adding a "b" flag and reversing the order of the cat and echo commands
in the filter above will put your added text at the top of the message
body. I also use the "w" flag on these kinds of filters (i.e. :0 fbw),
though I don't know if it's strictly necessary.

-- 
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.


_______________________________________________
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>
  • Help!, Mike Klein
    • Re: Help!, Timothy J. Luoma
    • Re: Help!, Don Hammond <=
      • Re: Help!, Professional Software Engineering