[exim] Deliver mail to a php script

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: adam.benayoun
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] Deliver mail to a php script

Hey guys,

I'd like to setup that every mail sent to some.domain.com will be sent to a
php script to be manipulated in some way (write it into a database or
anything else).

I configured a router and a transport in exim.conf as the following:

#
# Dispatch router
#

 dispatch_router:
     driver = accept
     domains = some.domain.com
     transport = dispatch_mail




#
#Dispatch Transport
#

dispatch_mail:
driver = pipe
command = php -f path/to/script.php
user = someuser
group = somegroup


Thing is when I do that and use after the script.php the expansion
$message_body - it only pass a part of the body while i'd like to pass the
entire mail or at least know how to pass it as an object.
I could write it in a file and then call a script to read that file but I am
trying to NOT write/read files, what I am trying to do is manipuate the mail
on the fly.

Anyway, I will be happy to receive some information regarding that.
Thanks
--
View this message in context: http://www.nabble.com/Deliver-mail-to-a-php-script-tp17833994p17833994.html
Sent from the Exim Users mailing list archive at Nabble.com.