procmail
[Top] [All Lists]

Re: formail -k

1997-07-17 13:09:00
Chuq von Rospach asked,

| is there any way to tweak formail so that includes the body of the
| message sent,
| but does so at the *end* of the message? formail -k includes it, but in
| front of my included return message, and I want the message I'm
| responding to at the end.

I gather that Chuq wants something like this:

  incoming head
  his own canned text
  incoming body

It's easy enough inside a procmailrc:

   :0fh
   * conditions if any
   | cat - canned.message

That will replace the existing head with itself plus the canned message and
(like any other head filtering recipe) reattach the existing body afterward.

When procmail proceeds from there, it will see the original blank line from
the neck, now separating the original head from the canned message, and treat
the canned message as part of the body.  (If you want another blank line be-
tween the canned message and the original body, include it explicitly in the
canned.message file.)

If you're using this in conjunction with formail -r or -rt to prepare a
letter to mail back, then

  :0fh
  * conditions if any
  | formail -r [other options] ; cat canned.message

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