1

Topic: Pipe to external script

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

Trying to pipe an email to a php script on an external server.  Had this working at one time and then moved both web and mail to new server.  I have followed the instructions on the documents page.  I have this as the last line in my master.cf

external-pipe   unix    -       n       n       -       -       pipe
        flags=  user=vmail:vmail argv=http://192.168.1.***/retail/receive_mail.php

I get the following error in the mail log
fatal: pipe_command: execvp http://192.168.1.217/retail/receive_mail.php: No such file or directory.

I can browse to that file from any web browser.
Help appreciated.

----

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

2

Re: Pipe to external script

brent.defranco wrote:

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

Trying to pipe an email to a php script on an external server.  Had this working at one time and then moved both web and mail to new server.  I have followed the instructions on the documents page.  I have this as the last line in my master.cf

external-pipe   unix    -       n       n       -       -       pipe
        flags=  user=vmail:vmail argv=http://192.168.1.***/retail/receive_mail.php

I get the following error in the mail log
fatal: pipe_command: execvp http://192.168.1.217/retail/receive_mail.php: No such file or directory.

I can browse to that file from any web browser.
Help appreciated.

If i try this with SSH ... argv=ssh administrator@192.168.1.*** /var/www/html/retail/receive_mail.php
I get this error.. fatal: pipe_command: execvp {ssh: No such file or directory

3

Re: Pipe to external script

The external script must be a local file, not http/ssh/... etc.
You can do http/ssh in the script instead.

4

Re: Pipe to external script

Thank you. I did it in the script and it works now.