[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stripping email attachments ???



On Tue, May 20, 2003 at 04:33:08PM -0500, Michael D. Schleif wrote:
>I have an automated phone system that sends an email to me when people
>call.  When I get a voice message the email contains a realaudio (*.ra)
>attachment; and when I get a fax the email contains a *.tiff attachment.
>
>My email system uses fetchmail to retrieve emails from various sources,
>processes them through procmail for delivery to appropriate directories,
>and I use mutt for email reading and sending.
>
>I want to be able to _strip_ a copy of these attachments and place the
>attachments under a web server directory, where I can retrieve and
>see/listen to them from just about any computer in front of which I find
>myself ;>
>
>Stripping the attachment is where I am stuck.  Once stripped, I want it
>in native format (ra, tiff) instead of mime.  I am good with perl; so,
>if the tools I'm already using (e.g., procmail) cannot do this alone, I
>have options . . .
>
>What do you think?
>
I use this procmail recipe to drop attachments to an accessible
directory:

# save attachments to public web directory
:0 ci
* ^Content-type:.*multipart/mixed
* B ?? Content-transfer-encoding:.*(x-uuencode|base64)
| munpack -q -C ~/public_html/attach/


-- 
Peter Hicks
GnuPG public key: http://jah.net/~petong/public_key.txt
Key Fingerprint: 4E24 3C78 A165 537C 729C  8D25 3547 3CE9 9E7D 42B6
Truth suffers from too much analysis.



Reply to: