Auto Save Mime Attachments To Linux Server

I’ve been searching for a solution to save attached image files sent by email, onto a linux server, time to get something custom made.

Goal is to save MIME single email attachments to disk locally on a linux server.

Would apply to a specific email address intended for this purpose. I send email with image attached and email received on server. Attachment is removed from email and saved to a directory using email subject line (Subject: red widget) as filename.

Example: Attached file img0001.jpg saved as red-widget.jpg in… /home/public_html/images

Email gets deleted.

I’ve come across things like ripMIME (http://www.pldaniels.com/ripmime/) and a PERL script (http://tek-tips.com/faqs.cfm?fid=4138), looks like it can be done.

Has to function automatically.

Email arrives in mail folder on server > script runs removing image.jpg and saves image to file > email deleted.

Leave a Reply

Your email address will not be published. Required fields are marked *