1

Topic: Email address that receives and auto saves attachments to a dir?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5
- Linux/BSD distribution name and version: CentOS7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

I have a need to create an email address that receives emails and autosaves attachments to a directory. It is for asking members of a non-profit to email photos that they have to a central place.

Is it possible with iRedmail or any of its component packages (postfix, etc) to set up an email address so that any email sent to that email address is processed on receive and any attachments are extracted and saved to a specified directory on the iRedmail server?

I know there is an inherent security risk in doing this but the group of people that will be notified of this address is not large.

In the end I want to find attachments from all received emails to that address saved in a directory.

Possible?

----

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

2

Re: Email address that receives and auto saves attachments to a dir?

It's not hard to implement, here's one of possible solutions (and it works because i implemented it years ago):

*) Create a mail user. e.g. test@
*) Follow this tutorial to pipe all emails received by this user to an external script:
http://www.iredmail.org/docs/pipe.incom … cript.html

You can use any programming language to write this script. The point is: full email message is piped to the script as stdin. just like command "cat < /path/to/email.eml"

*) Your script gets the full email message, you can parse it and extract attachments and save to a directory.