procmail
[Top] [All Lists]

Re: Adding to the body of an email

2008-12-07 00:14:34
LuKreme wrote:

I'd like to add a single line footer to the message body of some
messages.  I know this will either break, or at least screw up, html
messages or messages with attachments and I don't care, I want to add
the footer anyway (none of these messages will be html or attachments,
just plain text, and if they're not, big deal, they are only copies
sent to another account).

So, how would I add "foo.bar" to the end of a message most efficiently?

Here's how I'd do it:

 :0bwf
 * conditions
 | sed "$ a\\
foo.bar"

This might be easier to read but it would invoke a shell:

 :0bwf
 * conditions
 | cat - ; echo foo.bar

As long as you don't use the 'r' flag, procmail should automatically add another blank line at the bottom.
____________________________________________________________
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>