procmail
[Top] [All Lists]

Re: [Mime] mail messages as mime attachements

1998-08-10 10:46:52
1998-08-10-10:32:54 Chris Oxenreider:
[ gets big wads of messages as MIME attachments to a single email, wants to
 process them individually with procmail ]

[disclaimer: I only just signed up to the procmail list, and haven't been
 doing procmail all that long]

I get the impression from what I've seen in examples and so-on that it's
generally cool to use external helper programs for complex jobs, rather than
trying to cook up complex (and hence hard to debug and update) procmail
recipes. The natural candidate helper here would be metamail, the
command-line-based MIME support package.

I'd probably approach the problem by having my .procmailrc recognize the
incoming batches and shove 'em into a helper script that uses metamail to
split out the attached contents into separate files in a tmp directory, then
shoves each of them individually back through procmail.

Or the splitting could also be done with ease using perl with the MIME-Tools
module; you could then process the messages right there if perl grooves you,
or shove 'em back into procmail for another go.

-Bennett

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