[CentOS] Postfix mime_header_check or content_filter script

Sat Nov 14 19:11:37 UTC 2009
John R Pierce <pierce at hogranch.com>

Joseph L. Casale wrote:
>>> Anyone have a script that can check for an attachment and extract it
>>> to a directory?
>>>       
>> Why? You can use uudeview or similar to extract mime archive.
>>     
>
> Because when a mail is directed to a smtp instance on a particular server,
> I need the attachment extracted upon receipt and processed..

Do you want this done at the MTA [1] or MDA [2] layer ?  
Do you want it done for all accounts on this server, or just specific ones?

Doing this in the MTA (eg, Postfix) would tend to catch all inbound, 
outbound, and relayed mail.   Doing it in the MDA (eg, procmail) would 
catch just mail delivered to accounts on this system.


[1] MTA == Message Transfer Agent, see 
http://en.wikipedia.org/wiki/Message_transfer_agent

[2] MDA == Message Delivery Agent, see 
http://en.wikipedia.org/wiki/Message_delivery_agent