[Exim] user= in autoreply with database

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Ed Symanzik
Data:  
Para: exim-users
Asunto: [Exim] user= in autoreply with database
I am trying to set up a vacation autoreply where
the Received: header shows the user rather than
nobody. My usernames and uids are all in mysql.

If I set user=${LOOKUP_USERNAME} exim complains
the user is not in the password file. If I
set user=${LOOKUP_UID} exim complains that it
cannot find a name for this uid.

MYSQL_USER = SELECT DISTINCT username FROM account \
             WHERE username = '${quote_mysql:$local_part}'


MYSQL_VACATION = SELECT uid,vacation FROM account 
                 WHERE username = '${quote_mysql:$local_part}'
                   AND vacation IS NOT NULL


vacation_transport:
driver = autoreply
to = ${sender_address}
from = $local_part
# how do I get the recipient to be the user?
# user = ${extract{uid}{${lookup mysql {MYSQL_VACATION}{$value}}}}
# user = ${lookup mysql {MYSQL_USER}{$value}}
# user = $local_part
user = nobody
group = mail
subject = "${if def:h_Subject: {Autoreply: $h_Subject:} {I am on
vacation}}"
text = ${extract{vacation}{${lookup mysql {MYSQL_VACATION}{$value}}}}