procmail
[Top] [All Lists]

Re: formail on the body not the header

1999-07-30 13:54:37
John Hardin asked,

| Would:
| 
|      MESSAGE='
|  Multi-line message I like to
|  interpolate into the forwarded message
|  '
|      :0fbw
|      | echo "$MESSAGE" ; cat -
| 
| be simpler/faster/less hassle/work at all?

Simpler for the user, more complicated for the system, and less efficient.

One of the reasons for the sed command was to avoid invoking a shell, to
keep the commands down to something procmail could invoke on its own.
Procmail cannot handle certain things like successive commands (echo and
then cat), redirections, conjunction or disjunction, or globbing, so as
a rule characters that indicate those things are included in the SHELLMETAS
string variable, and if procmail sees one of them, it invokes a shell to
run the command(s) instead of trying on its own.

If the recipe will be run frequently, it may be worth the harder-to-type
code if procmail can call sed instead of calling a shell to do the two jobs
of echoing something and then running cat.

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