Ismael Valladolid Torres wrote:
I've googled for this with no success so I wonder if it's even
posible.
I am trying to make procmail store in a given directory all binary
attachments with given extensions in incoming mail. Let's say all .doc
and .pdf files.
Is this posible, any ideas?
For specific messages, I use uudeview to detach all attachments to a
specific directory.... once you have the attachments you can do what you
want with them.
To see if the mail even has attachments you need to look at the
Content-Type: header... if that header indicates there are attachments,
you can look in the body of the message for the individual attachments
you are interested in... I suspect this is more prone to error unless
you really make the effort to know that you are parsing the correct
Content-Type "header within the body, and not just some discussion about
Content-Type: blah blah blah
uudeview can do all the heavy lifting for you, at the expense of
possibly detaching files you don't need detached... but for the
simplicity it offers, I think it is a good trade-off.
Don Russell
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail