Topic: Pipe to external script and return the folder where to store the email
==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu Server 14.04.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Not yet
- Related log if you're reporting an issue:
====
Hello,
Thanks again for your usefull tool iRedMail
I would like to pipe incoming email to my own postfix transport program, I've seen it's possible in the FAQ, but I also want to return the Maildir path where to store the email.
Is it possible ?
Before iRedMail, my script was called by the .procmailrc like that:
SWITCH=`/usr/bin/php /home/{$user}/.emails-switch/emails-switch.php`
:0 f
| formail -A "X-Emails-Switch: ${SWITCH}"
:0:
$SWITCH
Procmail doesn't seems to be installed with iRedMail, and I suppose because user account are virtual ( /var/vmail and no /home/$user/ account )
By the way, procmail was also permit me to dynamically inject new line in the headers of the email ( with "formail" tool ), I don't known if there is an alternative with iRedMail.
Any help will be appreciated
Thanks,
Regards
EDIT:
May be a solution will be to pipe my program and to add a new line in the header like that :
X-Emails-Switch: {$MAILDIR_PATH_TO_STORE}
Then to use Sieve rules to automatically moved all emails that contains this header to the value inside this header.
I've never used Sieve, so I don't known if it's possible...
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.