On Sat, Oct 02, 2004 at 12:23:01PM -0300, Eriberto wrote:
I have a rule to add a footnote in ingoing mail messages. The rule is:
:0 Wfb
* ! To:.*mynet.com
|cat - ; echo -e `cat /etc/adm/footnote.txt`
However, if the message to contain a attach, the footnote is inserted
after the attach and we don't see this footnote. How to insert the
footnote before attach?
This is a very difficult thing to do without some special tools or
a modular approach.
I tried the following, which could be a workable approach, except that
the sed barfs.
DQ='"'
OLDSHELLMETAS = $SHELLMETAS
SHELLMETAS
:0
* $ ^Content-Type:.*multipart.*;[ ]*boundary=$DQ?\/[^$DQ]+
{
BOUNDARY = $\MATCH
:0 fw b
* $ B ?? ()\/^--$BOUNDARY^Content-Type:.*a(ppli|ttach)
| sed "s/^$MATCH/`cat mytext`&/"
}
SHELLMETAS = $OLDSHELLMETAS
--
dman
____________________________________________________________
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