0

I tried following the tutorial at: http://www.phpshare.org/articles/Piping-Incoming-Mail-with-PHP.html to pipe incoming mail to a PHP script for a virtual host with Exim. I can't seem to get it working. Any ideas?

Here's my exim.conf setup:

http://www.ysend.com/exim.txt

I have created the directory:

/etc/exim/vhosts

And created a file: ysend.com in it, with:

catch-all: |php -q /home/ysend/public_html/handler.php

I also tried:

*: |php -q /home/ysend/public_html/handler.php

As well as:

catch-all: [email protected]

and

*: [email protected]

1 Answer 1

1

try a

exim -bt [email protected]

Exim is quite talky about what it is doing.

You may add the following line to your exim.conf main section

trusted_users = yourapacheuser

(apacheuser may be www-data on debian/ubuntu, httpd on redhat/fedora)

and most importantly: move your vhost_alias from routers to directors. routers are for mails sent offsite, directors on how to handle local mails.

3
  • For the command: [root@server ~]# exim -bt [email protected] [email protected] <-- [email protected] router = dnslookup, transport = remote_smtp host gmail-smtp-in.l.google.com [209.85.217.71] MX=5 host alt1.gmail-smtp-in.l.google.com [209.85.210.21] MX=10 host alt2.gmail-smtp-in.l.google.com [209.85.201.114] MX=20 host alt3.gmail-smtp-in.l.google.com [209.85.133.114] MX=30 host alt4.gmail-smtp-in.l.google.com [209.85.218.27] MX=40 And trusted_users = apache is already there :) Where is the directors section? Do I have to create it?
    – John
    Jun 26, 2009 at 20:11
  • When I change the /etc/exim/vhosts/ysend.com file so that it says: catch-all: |php -q /home/ysend/public_html/handler.php and I run the exim -bt [email protected] command, it says: Unrouteable address
    – John
    Jun 26, 2009 at 20:22
  • I switched it from catchall to *, and now I get: [root@server ~]# exim -bt [email protected] [email protected] -> |php -q /home/ysend/public_html/handler.php transport = address_pipe
    – John
    Jun 26, 2009 at 20:31

You must log in to answer this question.