[LUNI] Procmail setup question

Ramin K ramin-list at badapple.net
Mon Nov 22 13:28:01 CST 2010


On 11/22/2010 9:29 AM, Richard Reina wrote:
> I am wanting to set up a specific email address (like
> inbound at mydomain.com <mailto:inbound at mydomain.com>) to receive email
> containing attachments on one specific machine in my office. I want to
> automatically filter these incoming messages so that the email will be
> rejected if the attached documents are not tiffs or pdfs.  Would the
> best way to do this be to set up procmail on the machine that receives
> the messages (from my ISP) and have it running 24/7 and do the filtering.
>

	Assuming you don't have access to your mail server, I'd use getmail, 
http://pyropus.ca/software/getmail/faq.html , which is similar to 
fetchmail to pull mail down from the account and then process it. You 
can then send it to the external MDA of your choice, procmail, maildrop, 
etc. from there.

	If you're trying to automatically process these, you can use ripmime to 
pull the attachments out, archive, then process. I did something similar 
with a video encoding site years back.

	One other thing we did was use username+pin at upload.domain.com which 
allowed us to query the backend to make sure the email was allowed 
before processing. In our case we piped directly into Postfix (2.3 or 
better) and let it do the query against the db directly before 
attempting to deliver.

Ramin


More information about the LUNI mailing list