1

Topic: Launch BASH script when a particular user receive a mail

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu Server 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Nop
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

I would like to launch a BASH script when a user (let's say scriptuser@mydomain.com) receive a mail. The mail would contain some informations I have to retrieve before launching the script. Does it exists an easy way of doing this ?

Regards,
DuckProjects

----

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

2

Re: Launch BASH script when a particular user receive a mail

I guess this one works for you?
https://docs.iredmail.org/pipe.incoming … cript.html

3

Re: Launch BASH script when a particular user receive a mail

Thank you ! :-)

For information, if it can help others :
Another solution I've found is to monitor the "new" folder (incoming messages folder) of a user on the server by using INCRON. A trigger can be set each time a file is added/modified/deleted in the folder.