Phil Pennock <[email protected]> schrieb:
Hi, Phil
> Insufficient data to know what's happening with the schema and what
> exactly you're trying to achieve. Seeing the current configurations
> might help with that.
Attached a file with the two routers I use in this case.
Thank you
Luca Bertoncello
([email protected])
localWrite_gw:
driver = redirect
allow_filter
domains = +local_domains
user = ${lookup mysql {select case count(*) when 0 then DEFAULT_UID else case
uid when 0 then DEFAULT_UID else uid end end from aliases left outer join
account using (accountname) join (select case when main_domain is null then
domainname else main_domain end as domainname from domain where
lower(domainname) = lower('$domain') or lower(main_domain) = lower('$domain')
limit 1) dom using (domainname) where (lower(aliasname) =
lower('${quote_mysql:$local_part}') or lower(aliasname) = '<catchall>') AND
account.active = 1 order by aliasname != '<catchall>' desc, aliasname limit 1}}
group = exim
data = ${lookup mysql {select concat('# EXIM Filter\n\n', case when
extra_forward is not null then extra_forward else '' end,
replace(concat(concat(case hasAutoresponder when 0 then '' else
replace(replace('if not error_message and \$message_headers does not contain
"\\\\nX-SPAM:" and \$message_headers does not contain "\\\\nX-Infected:" then
if personal then mail text "%%TEXT%%" from "$local_part@$domain" subject
"%%SUBJ%%" extra_headers "MIME-Version: 1.0\\\\nContent-Type: text/plain;
charset=ISO-8859-15" endif endif', '%%SUBJ%%', autoresponderSubject),
'%%TEXT%%', replace(replace(autoresponderText, '\r', ''), '\n', '\\\\n')) end,
'\n\n'), case when filters is not null then concat(filters, "\n", dataHam) else
dataHam end), '%%FINALDEST%%', finaldest)) from aliases left join account using
(accountname) join (select case when main_domain is null then domainname else
main_domain end as domainname from domain where lower(domainname) =
lower('$domain') or lower(main_domain) = lower('$domain') limit 1) dom using
(domainname) where (lower(aliasname) = lower('${quote_mysql:$local_part}') or
lower(aliasname) = '<catchall>') AND account.active = 1 order by aliasname !=
'<catchall>' desc, aliasname limit 1}}
redirect_router = loopbackRouter
reply_transport = autoresponder
pipe_transport = address_pipe
file_transport = address_file
directory_transport = address_file
headers_remove = ${if def:h_X-DefSubject {Subject}}:X-DefSubject:
headers_add = ${if def:h_X-DefSubject {Subject: $h_X-DefSubject:}}
srs = forward
srs_condition = ${if match {${lookup mysql {SELECT CONCAT(dataHam, CASE WHEN
extra_forward IS NOT NULL THEN extra_forward ELSE '' END) FROM aliases join
account using (accountname) join (select case when main_domain is null then
domainname else main_domain end as domainname from domain where
lower(domainname) = lower('$domain') or lower(main_domain) = lower('$domain')
limit 1) dom using (domainname) where (lower(aliasname) =
lower('${quote_mysql:$local_part}') or lower(aliasname) = '<catchall>') AND
account.active = 1 order by aliasname != '<catchall>' desc, aliasname limit
1}}} {.*deliver.*} {yes}{no}}
no_more
loopbackRouter:
driver = manualroute
transport = loopback_smtp
route_list = * "</ ::1"
headers_remove =
X-AV-scan:X-Infected:X-SPAM:X-Spam-Score:X-SpamFolder:X-Spam-Report:X-DefSubject:
self = send
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/