Hello,
I have installed an autoresponder using a perl script and special
transport (autoreply) in master.cf
my problem is that postfix send the email to the perl script twice so
the perl script sends two mails to the recipient instead of one as i wish.
when an user has set up its responder, i want the incoming mails for him
still be delivered to its maildir but i want also the responder send a
mail to the sender advising the user (recipient) is absent
my main.cf :
...
...
virtual_alias_maps =
proxy:mysql:/etc/postfix/vir_alias_repondeur.cf,
my master.cf :
...
...
autoreply unix - n n - 5 pipe
flags=Oqu user=nobody argv=/usr/local/bin/repondeur.pl $sender $recipient
transport map :
...
...
autoreply.univ-lille3.fr autoreply:
vir_alias_repondeur.cf :
query = SELECT autoreply FROM mail_vacation WHERE email='%s'
AND active='1'
AND (CURRENT_DATE() BETWEEN dstart AND dstop);
the 'autoreply' field from mail_vacation mysql table returns something
like this for email='u...@univ-lille3.fr'
==> u...@univ-lille3.fr,u...@autoreply.univ-lille3.fr
it seems there is some "recursion" with the alias expansion
(u...@univ-lille3.fr is on the right side of the alias for mail
delivering) explaining why email is sent twice.
when i replace the fied value from
'u...@univ-lille3.fr,u...@autoreply.univ-lille3.fr' by only
'u...@autoreply.univ-lille3.fr', the responder email is sent only once
but the orginal message is not delivered to the user maildir (it's not
want i want)
Thank you for your help to solve my problem.
Arnaud