3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] auto-saving certain t...
FromSent OnAttachments
Kurt LieberJan 28, 2006 6:45 pm 
Sam VarshavchikJan 28, 2006 7:40 pm 
Ajay SharmaMar 9, 2006 12:06 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] auto-saving certain types of attachments from certain email addressesActions...
From:Ajay Sharma (ssha@revsharecorp.com)
Date:Mar 9, 2006 12:06:37 pm
List:net.sourceforge.lists.courier-maildrop

Kurt Lieber wrote:

I'd like to be able to auto-save certain types of attachments from certain addresses. I believe reformime will do what I want, but I can't find any examples on how to use it. Specifically, I can't figure out how to only save certain types of attachments (such as gifs, jpegs and pngs)

In psuedo-code, what I'm looking for is something that will do:

"if from: fo@bar.com and has attachment of type (gif|jpeg|png) then save attachment to /tmp/mail/$date/"

Is this even possible w/ maildrop?

--kurt

You've probably figured out a solution by now but I'm just going through my maildrop archives and this topic caught my eye since I wanted to do the same thing.

I solved the problem by using maildrop to send the email to a php script. Using the mailparse PECL extension I was able to extract the contents of the email and extract the parts that I needed.

http://pecl.php.net/package/mailparse http://www.php.net/manual/en/ref.mailparse.php

Obviously you can use any language, but php is what i know best so that's what I decided to use.

--Ajay