progressing my test install - got lots of notes for EL based linux distros, hitting a problem with the modified example configure file that's used as a template for exim.conf.
This section of the file has not been modified at all.
the section in question is
virtual_domains:
driver = redirect
domains = +local_domains
address_data = ${lookup mysql{\
select smtp, users.sa_tag*10 AS sa_tag, users.on_spamassassin AND domains.spamassassin AS on_spamassassin, \
users.uid AS uid, users.gid AS gid, quota \
from users,domains \
where localpart = '${quote_mysql:$local_part}' \
and domain = '${quote_mysql:$domain}' \
and domains.enabled = '1' \
and users.enabled = '1' \
and users.domain_id = domains.domain_id}{$value}fail}
allow_fail
data = ${extract{smtp}{$address_data}}
headers_add = ${if and { \
{>{$spam_score_int}{${extract{sa_tag}{$address_data}}}} \
{eq{1}{${extract{on_spamassassin}{$address_data}}}} \
} {X-Spam-Flag: YES\n}{} }
# Whether to use old or new headers_remove behavior.
.ifndef OLD_HEADERS_REMOVE
headers_remove = ${if or { { <{$spam_score_int}{1} } \
{ and {{<{$spam_score_int}{${extract{sa_tag}{$address_data}}} } \
{eq {1}{${extract{on_spamassassin}{$address_data}}}} \
} \
} { eq {0}{${extract{on_spamassassin}{$address_data}}}} \
} {X-Spam-Score}}
headers_remove = ${if or { { <{$spam_score_int}{1} } \
{ and {{<{$spam_score_int}{${extract{sa_tag}{$address_data}}} } \
{eq {1}{${extract{on_spamassassin}{$address_data}}}} \
} \
} { eq {0}{${extract{on_spamassassin}{$address_data}}}} \
} {X-Spam-Report}}
.else
headers_remove = ${if or { { <{$spam_score_int}{1} } \
{ and {{<{$spam_score_int}{${extract{sa_tag}{$address_data}}} } \
{eq {1}{${extract{on_spamassassin}{$address_data}}}} \
} \
} { eq {0}{${extract{on_spamassassin}{$address_data}}}} \
} {X-Spam-Score:X-Spam-Report}}
.endif
# using local_part_suffixes enables possibility to use user-"something" localparts
# which could cause you trouble if you're creating email-adresses with dashes in between.
.ifdef VEXIM_LOCALPART_SUFFIX
local_part_suffix = VEXIM_LOCALPART_SUFFIX
local_part_suffix_optional
.endif
retry_use_local_part
file_transport = virtual_delivery
reply_transport = address_reply
pipe_transport = address_pipe
so this looks as far as I can see (I diff'd it against the configure file and got no differences as a code block).
When I create a new local domain, exim errors
2016-07-24 12:16:10 1bRHOE-0004tt-78 ==
postm...@test9.com R=virtual_domains defer (-1): virtual_domains router failed to expand "${if or { { <{$spam_score_int}{1} } { and {{<{$spam_score_int}{${extract{sa_tag}{$address_data}}} } {eq {1}{${extract{on_spamassassin}{$address_data}}}} } } { eq {0}{${extract{on_spamassassin}{$address_data}}}} } {X-Spam-Score}}:${if or { { <{$spam_score_int}{1} } { and {{<{$spam_score_int}{${extract{sa_tag}{$address_data}}} } {eq {1}{${extract{on_spamassassin}{$address_data}}}} } } { eq {0}{${extract{on_spamassassin}{$address_data}}}} } {X-Spam-Report}}": missing } at end of string inside "and{...}" condition inside "or{...}" condition
(I added
test9.com just as a random test domain) - this looks like a syntax error. I'm not aware of anyway to "lint" the exim config, I ran exim -bv and it doesn't report any syntax errors in the config.
This could be something in my setup or it could be an error in the default example - I'm not %100 sure what this is doing beyond checking the spamassassin score and headers
Input welcome of course.
thanks,
Matt