Hello,

i'm trying to set up a Vacation Mail Responder using postfix and special transport + PERL script.

i want to let users choose between :
case 1 : automatic vacation responding and not delivrering the original message (message is lost) case 2 : automatic vacation responding and delivrering original message in their mailbox

note : i'm using a MySQL lookup for storing users vacation parameters but i have got the same problem with standard db lookup


My configuration


transport :
autoreply.domain.tld:    autoreply


master.cf :

autoreply       unix    -       n       n       -       -       pipe
  flags=Oqu user=nobody argv=/usr/local/bin/vacation.pl $sender $recipient

main.cf :

virtual_alias_maps =
        hash:/etc/postfix/vir_vacation,
        ...
        ...
    ...

in vir_vacation i can have

case 1 :
u...@domain.tld     u...@autoreply.domain.tld

case 2:
u...@domain.tld     u...@autoreply.domain.tld,u...@domain.tld


in case 1, all is fine, original sender receives the automatic mail

but in case 2, PERL script is called twice (but the message is well delivered in user's mailbox) and so there is 2 automatic mail sent to original sender

how can avoid this "recursive" lookup in the table and sending automatic vacation message twice ?


Note : I found a solution for case 2 using another transport to deliver the original mail and sending a vacation mail :

transport :
autoreply.domain.tld:    autoreply
deli...@domain.tld:  relay:[imapserver.domain.tld]

case 2:
u...@domain.tld     u...@autoreply.domain.tld,u...@deliver.domain.tld

on the imap server i have a canonical regexp to rewrite
u...@deliver.domain.tld --> u...@domain.tld

/^(.*)@deliver.domain.tld/           $...@domain.tld


but if i could avoid this ("heavy" ?) solution....






Reply via email to