13.10.2012 08:49, [email protected] пишет:
From: Богун Дмитрий
Одно и тоже выражение по разному разворачивается в разных версиях экзима.
Само выражение довольно сложное и я путем скармливания его кусков в exim
-be нашел место, на котором что-то ломается
Это версия 4.77
$h_cc:
<[email protected]>
$h_to:
<[email protected]>
${if match_address{$item}{${addresses: $h_to:, $h_cc:}} {$value}{dummy}}
{}{dummy}}
Ну на самом деле не так. Но и не так, как вам хочется.
Это 4.76
$h_cc:
<[email protected]>
$h_to:
<[email protected]>
${if !match_address{$item}{${addresses: $h_to:, $h_cc:}} {$value}{dummy}}
Вариан в 4.76 значительно больше похож на правду, собственно там
работает и большое выражение, которое перестало работать при обновлении
на 4.77. Вопрос в том как узнать бага это или что-то поменяли в синтаксисе?
В дистрибутиве exim версий начиная с 4.77, например последнем
exim-4.80.tar.bz2, файл exim-4.80/README.UPDATING:
Exim version 4.77
-----------------
...
* The match_<type>{string1}{string2} expansion conditions no longer subject
string2 to string expansion, unless Exim was built with the new
"EXPAND_LISTMATCH_RHS" option. Too many people have inadvertently created
insecure configurations that way. If you need the functionality and turn on
that build option, please let the developers know, and know why, so we can
try to provide a safer mechanism for you.
The match{}{} expansion condition (for regular expressions) is NOT affected.
For match_<type>{s1}{s2}, all list functionality is unchanged. The only
change is that a '$' appearing in s2 will not trigger expansion, but instead
will be treated as a literal $ sign; the effect is very similar to having
wrapped s2 with \N...\N. If s2 contains a named list and the list
definition
uses $expansions then those _will_ be processed as normal. It is only the
point at which s2 is read where expansion is inhibited.
If you are trying to test if two email addresses are equal, use eqi{s1}{s2}.
If you are testing if the address in s1 occurs in the list of items given
in s2, either use the new inlisti{s1}{s2} condition (added in 4.77) or use
the pre-existing forany{s2}{eqi{$item}{s1}} condition.
виноват не прочитал changelog'и при обновлении. :_:
Кроме того, это вкратце описано в doc/NewStuff и doc/ChangeLog .
Кроме того, в документации:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch11.html
match_address {<string1>}{<string2>}
See match_local_part.
match_local_part {<string1>}{<string2>}
...
Note that <string2> is not itself subject to string expansion,
unless Exim was built with the EXPAND_LISTMATCH_RHS option.
А тут я даже вчера лизил, но обратил внимание лишь на общий синтаксис
выражения... до "note"'сов не дочитал.
Спасибо за указание на первопричину моей проблемы, буду думать как
переписывать свое условие.
--
Богун Дмитрий aka vugluskr
_______________________________________________
Exim-users mailing list
[email protected]
http://mailground.net/mailman/listinfo/exim-users