On 2016-12-06 11:19, Olivier Coutu wrote:
However, if I run that on machine B (Ubuntu 16.04, SpamAssassin
version 3.4.1, Perl version 5.22.1) that I have recently created,
after the first call to the /get//('From', 0)/ which returns the
correct value, the following calls return the values with an added
underscore between the from_name and the from_address:
ocoutu@hostB:~$ spamassassin -D 2>&1 < bug.eml | grep "header_from ="
déc 6 09:45:28.331 [13600] dbg: ZS_HeadersCompare: get_header_from(__Z_SAME_FROM_TRIM_DOM):
header_from ="jerome.o.sim...@gmail.com" <jerome.o.sim...@gmail.com>
déc 6 09:45:28.332 [13600] dbg: ZS_HeadersCompare: get_header_from(__Z_SAME_FROM_SLD):
header_from ="jerome.o.sim...@gmail.com"_<jerome.o.sim...@gmail.com>
déc 6 09:45:28.334 [13600] dbg: ZS_HeadersCompare:
get_header_from(__Z_REPLY_TO_IS_FROM_TRIM_DOM): header_from
="jerome.o.sim...@gmail.com"_<jerome.o.sim...@gmail.com>
[...]
After some investigation, the perl version appears to be the issue.
The latest version of perl that I found that does not create this issue
is perl-5.18.4 and all versions from perl-5.20.3 to perl-5.25.7 create
the issue.
Has anyone else encountered this problem with the recent perl versions?
This can also be illustrated with the /__FROM_RUNION/ rule, which I
have not modified in any way:
déc 6 10:59:36.149 [24034] dbg: rules: ran header rule __FROM_RUNON ======> got hit:
""jerome.o.sim...@gmail.com"_<jerome"
Since this rule is called by the built-in config files with /From =~
/\S+<\w+//, it appears like the problem is not just with the way I am
calling it.
If I disable my plugin completely the problem goes away and __FROM_RUNON
works as expected again.
I realize that using /From:addr/ instead of /From/ would work but the
documentation indicates that only the first address is kept, which works
most of the time for /From/ but gives very different results for /To/
when there are multiple recipients. Any workaround would be appreciated.