Auteur: Julien Balmont Date: À: exim-users Sujet: [exim] Save a mail and then execute a script
Hi all, thanks for helping me.
I'm not an expert in Exim, but I now understand how it works, and i'm trying
to do the following:
an email arrives, it is saved to a file, then an external PHP script is
called.
I've already made two routers and two transports (see below).
My issue with what I made:
The mail goes through router my_file, then to transport local_copy_incoming
but never goes to router my_script.
Is there a way to do what I want to do? Please help, i'm searching for a
long time ago now.
//TRANSPORTS
local_copy_incoming:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
group = web
user = web
mode = 0755
file = /var/www/mailspool/$message_exim_id
to_my_script:
driver = pipe
command = /usr/bin/php5 -f /var/www/dev/script.php $message_exim_id
$local_part $domain $h_subject
home_directory = /tmp
current_directory = /tmp
user = web
group = web
log_output = true
return_fail_output = true
return_path_add = false