[exim] mysql out of office - avoiding the horror loop

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Brian Austin
Datum:  
To: exim-users
Betreff: [exim] mysql out of office - avoiding the horror loop
Hi,

I have set up virtual domains as per
http://www.tty1.net/virtual_domains_en.html

but this broke the out of office function, as the .forward file in a
home directory no longer is valid.

I've added a table called forward, and adjusted exim config such that I
can do out of office with the sql table. But the problem is that it
replies to every email.
obviously this can lead to a horrific out of office loop.

how do I write an acl that

checks if a sender/recipient email address combination exists in a
particular table
then if it doesnt exist, adds the sender email address
I think it should be in the vacation_director - below

something like
vacation_director:
driver = accept
condition = ${lookup mysql{SELECT already_replied from reply_list
where (match sender and receiver)
condition = ${lookup mysql{insert into reply_list values (matched
sender and receiver)
domains = ${lookup mysql{SELECT domain FROM forward where
domain='${quote_mysql:$domain}' AND user='${quote_mysql:$local_part}'}}
transport = vacation_autoreply
unseen

current exim4 conf snippets are


vacation_director:
driver = accept
domains = ${lookup mysql{SELECT domain FROM forward where
domain='${quote_mysql:$domain}' AND user='${quote_mysql:$local_part}'}}
transport = vacation_autoreply
unseen

and the transport

vacation_autoreply:
driver = autoreply
to = ${sender_address}
from = "${local_part}@${domain}"
subject = "I am not in the office "
text = ${lookup mysql{SELECT message FROM forward where
domain='${quote_mysql:$domain}' AND user='${quote_mysql:$local_part}'}}

thanks

Brian