procmail
[Top] [All Lists]

How do I extract subject?

2000-03-12 06:27:50
Hi,

I receive certain files which are encoded using mmencode through
email. In the email, the subject line gives the name of the file.
So I want to make a procmail recipe to automatically decode the file
and save it in that filename. But I don't know how to extract the
subject from the message and use it in the recipe itself.

My recipe looks like this:

:0
* (some conditions)
| formail -I "" | mmencode -u > filename

This extracts the body, passes it through mmencode -u, and saves it in
filename. Now I want filename to be taken from the subject of the same
message. Is there any way to do this?

-- 
Mrinal Kalakrishnan <mrinal(_at_)india(_dot_)com> (PGP:B1E86F5B) 
http://listen.to/mrinal
- - - - = ( Redhat Linux 6.1 ) = - - - - = ( Kernel 2.2.12-20 ) = - - - -
PROCRASTINATORS will do it tomorrow

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