1 (edited by bryanchapman9999 2013-08-12 23:26:20)

Topic: Strip an attachment out

Hi everyone,

I know its possible to reject a message with an attachment, but is it possible to strip the attachment out and send the rest of the message to the recipient??

Many thanks
Bryan

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Linux/BSD distribution name and version: CentOS6.4
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Strip an attachment out

Unfortunately, all components used by iRedMail doesn't support this feature.
You can try to search this tool with Google, or write a custom program to achieve it.

Tips if you want to write a custom program:

*) It's used as a Postfix transport program, just like others defined in /etc/postfix/master.cf.
*) You can try to detect attachment with Postfix body_checks(5) or other method, then send this email to your custom program with 'FILTER' action. Reference: http://www.postfix.org/header_checks.5.html

Many programming languages has built-in email parser modules. For example, Python module 'email'.

3

Re: Strip an attachment out

OK, many thanks.

ZhangHuangbin wrote:

Unfortunately, all components used by iRedMail doesn't support this feature.
You can try to search this tool with Google, or write a custom program to achieve it.

Tips if you want to write a custom program:

*) It's used as a Postfix transport program, just like others defined in /etc/postfix/master.cf.
*) You can try to detect attachment with Postfix body_checks(5) or other method, then send this email to your custom program with 'FILTER' action. Reference: http://www.postfix.org/header_checks.5.html

Many programming languages has built-in email parser modules. For example, Python module 'email'.