Hi Jason,
On Friday 16 May 2008, Jason Fesler wrote:
I'm looking for a way to strip attachments from incoming mails on the server.
works in line with procmail or similiar. It is not a standalone server; but instead acts as a filter. I use it in front of my mailing lists, so that attachements are not sent out.
Thank you very much for your suggestion. I gave 'detach' a try, and saw that you contributed to it :)
It does exactly what I need. I set it up as a transport for postfix. The script that gets called by postfix also takes care about delivery (pipe through dovecot's 'deliver' after the detaching is finished, or, in case of an error during the detachment process, pipe the original message (including attachments) through 'deliver'. I didn't want to install procmail, because I need dovecot's sieve plugin for all other filtering needs...
I've got one problem though (which I reported to Ryan Hamilton): detach doesn't handle attachments with filenames that contain non-ASCII characters well. I don't know anything about perl, so I didn't dig deeper yet... Would you perhaps be interested in looking into the issue?
I couple this with "demime" to further reduce the remaining text to plain text ( http://scifi.squawk.com/demime.html - uh oh, host not responding.. and I don't see an alternate location for it).
For me it's just about getting those attachments to some SAMBA share - the rest of the mail should stay as it was.
Thanks again for that hint, Patrick.
-- STAR Software (Shanghai) Co., Ltd. http://www.star-group.net/ Phone: +86 (21) 5427 7799 x 826 Fax: +86 (21) 6485 0071
PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005