Συντάκτης: Ericb Ημερομηνία: Προς: exim-users Καινούρια Θέματα: [Exim] Exim 4 Autoreply with Mysql Αντικείμενο: [Exim] autoreply and appendfile on same message?
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hello,
I am having issues having a virtual mailbox accept AND redirect an
incoming message.
I have the latest build of exim pulling information from a mysql
database. The 'normal' mailbox is handled by driver=accept and
transport=virtual_delivery. See below.
virtual:
driver = accept
domains = ${lookup mysql {SELECT DISTINCT domain FROM auth WHERE
.....}{$value}fail}
transport = virtual_delivery
Aliased mailboxes are handled by driver=redirect:
virtual_aliases:
driver = redirect
data = ${lookup mysql {select alias from auth where ...{
$value}fail}
Vacation auto-replies are handled by driver=redirect,
reply_transport=address_reply
user_vacation:
driver = redirect
data = ${lookup mysql {SELECT DISTINCT concat("Foo <",username,'@',
domain,">") FROM auth ..."}{$value}fail}
reply_transport = address_reply
The problem is that any address that is a mailbox gets processed by
driver=accept and stored locally. Which is good. But I would like it
ALSO processed by by the drivers 'user_vacation' or 'virtual_aliases'.
Yes, I have tried moving the virtual router further down. It seems
"driver=accept" takes precedence over others.
My transports are:
virtual_delivery:
driver = appendfile
file = /var/mail/${domain}/${local_part}
user = exim
group = exim
mode = 0660
address_reply:
driver = autoreply
from = ${lookup mysql {select distinct sourceaddr from auth where
is_autoresp='yes' and domain like '${quote_mysql:$domain}' and username
like '${quote_mysql:$local_part}'}{$field}}
subject = ${lookup mysql {select distinct subject from auth where
is_autoresp='yes' and domain like '${quote_mysql:$domain}' and username
like '${quote_mysql:$local_part}'}{$field}}
text = ${lookup mysql {select distinct message from auth where
is_autoresp='yes' and domain like '${quote_mysql:$domain}' and username
like '${quote_mysql:$local_part}'}{$field}}
to = $sender_address
user = exim
group = exim
mode = 0660