Le 13/03/2013 15:01, Arnaud Jayet a écrit :
> Hello,
>
> I have installed an autoresponder using a perl script and special
> transport (autoreply) in master.cf

does your autoresponder obeys
    http://tools.ietf.org/html/rfc3834
?
if not, get it out.

>
> my problem is that postfix send the email to the perl script twice 

Then you did an error.

> so the perl script sends two mails to the recipient instead of one as
> i wish.

get yourself a better program that doesn't resend borkmail. old programs
maintain a cache and do not send mail all over gain.

>
> 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.

it seems you forgot to follow the recommendations in the list welcome
message.

- logs to show what you say
- output of postconf -n
- in your case, content of master.cf


cristal ball says:
- you have a content filter but you forgot to disable address mapping in
the "before the filter" service
...

>
>
> 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
>
>

Reply via email to