procmail
[Top] [All Lists]

Re: sending just the header to a file

2001-03-06 12:28:24
On Tue, Mar 06, 2001 at 11:56:40AM -0600, Philip Guenther wrote:
Joe Altman <ja(_at_)panix(_dot_)com> writes:
On Tue, Mar 06, 2001 at 09:13:42AM -0500, Eric Krichbaum wrote:
I've got a pretty good recipe for the flavors of the Snow 
White/haha(_at_)sexyfun(_dot_)net/hybris.gen virus but I'd like to log the 
header to a 
file instead of sending the whole email to the file.   Is there a simple 
way to dump just the header portion out?
...
You mean like this:

:0hc:${HOME}/.mailspool/Procmail.head.lock
| cat >> ${HOME}/headers.cut

Taken from Timo's page, question 6, at

http://www.uwasa.fi/~ts/info/proctips.html

That's an odd name for the lockfile.  Why not $HOME/headers.cut.$LOCKEXT?
Or even better let procmail choose the lockfile name based on the file
being appended to:

      :0 hc:
      | cat >> ${HOME}/headers.cut

However, since appending to a file is the result of a normal mailbox
delivery, that can be more efficiently written as simply:

      :0 hc:
      $HOME/headers.cut

That, of course, does make more sense. I'll try it, thanks.

ja


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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