nmh-workers
[Top] [All Lists]

[Nmh-workers] wrapper to repl vs. replyfilter

2013-02-14 14:44:43

I use a perl wrapper around "repl" which examines the headers to determine
which of my accounts received the mail. Based on the account name, the
wrapper sets environment variables to contain different valies for the
From, Reply-To, and Fcc headers and the signature, then calls the real
"repl".

Within my mhl reply filter, I use the environment variable "$SIGNATURE", set
within the wrapper, as in:

------------------------------
subject:nocompress,nocomponent,formatfield="%(void(getenv SIGNATURE))%(putstr)"
------------------------------

For a hack, this works pretty well.

However, now I'm also using replyfilter. That's a tremendous improvement
for MIME messages, and works fine for the header & message body except
for the signature.

The problem is that the signature also gets formatted by the replyfilter.

Can anyone suggest a better way to handle this mess?

I could hack replyfilter to append the value of $SIGNATURE (if defined).

I could hack replyfilter to pull in all the functionality of my repl wrapper.

I'd prefer using a formatter within replyfilter that will exclude the
signature block.  Does anyone know if par (or a different formatting
program) can be told:

        Do not format the block of text consisting of:
                blank line
                line consisting of only -----
                sequence of non-blank lines
                zero-or-more blank lines
                end of file

Thanks,

Mark

-----
Mark Bergman    Biker, Rock Climber, Unix mechanic, IATSE #1 Stagehand
'94 Yamaha GTS1000A^2
bergman(_at_)panix(_dot_)com

http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=bergman%40panix.com

I want a newsgroup with a infinite S/N ratio! Now taking CFV on:
rec.motorcycles.stagehands.pet-bird-owners.pinballers.unix-supporters
15+ So Far--Want to join? Check out: http://www.panix.com/~bergman 

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>