procmail
[Top] [All Lists]

Re: Procmail and attachments

1996-11-07 09:34:09

Thanks for replying Doc and I really appreciate the help. But I think my 
situation is slightly different. [read on]

On Thu, 7 Nov 1996, The Doctor {Who?} wrote:

I would like to know if Procmail is capable of saving out attachments of 
a file to allow me to perform further operations on the files? If not if 
there is away of doing it.

It's basically capable of anything, providing one can script it with
available tools...

If you were speaking of MIME/base 64, I have a recipe like this:

:0 HBw
* ^Content-Transfer-Encoding:.*base64
{
      :0 cw
      | munpack

      :0 Hhw
      | formail -zcI"Status: O" -I"X-Unpacked: to Mail" >>$DEFAULT
}

How would you do the same for a textual attachment with, for example, a 
mime header like this..

Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: 
<Pine(_dot_)SUN(_dot_)3(_dot_)91(_dot_)961106090145(_dot_)8336D(_at_)cumin(_dot_)compnews(_dot_)co(_dot_)uk>



The latter recipe gives me a copy of the headers ONLY (love to script one to
keep the DESCRIPTION part, but have not had the time and patience to work on
such yet) in my mailbox with the note that it's been unpacked into my mail
dir.

(Heaven forbid someone or two someones send different files with the same
name!  -It'll simply over-write the former if this happens.)

This problem is OK. It'd be better if it did this in my situation.


  _   _
 |_) |_|      Listings Ltd    \   Jason Tang   /        (01430) 488356  Phone
 |   | |  Bishop's Manor Howden \            /   
jasont(_at_)padd(_dot_)press(_dot_)net  Email
--------------< ISPS (Information Systems Production Software) >--------------

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