exim 4.85 patch fix for headers_remove problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

exim 4.85 patch fix for headers_remove problem

gldickens3
Administrator
As discussed earlier in a separate thread, a regression was introduced in exim 4.83 that caused the headers_remove clauses in the exim configuration files to malfunction.   This regression continued in Exim 4.84 and 4.85. This regression impacts both Exim4U and Vexim users running exim 4.83, 4.84 & 4.85. Exim versions earlier than exim 4.83 are not impacted by this regression.  A partial fix was implemented in 4.85 which fixed the transports section but not the routers section.  The bug report is here:

http://bugs.exim.org/show_bug.cgi?id=1533

At the bottom of this bug report is a patch for the routers section.  Shamim Shahriar and I have both tested this patch and it appears to fix the regression altogether.  Please also note that the colon ":" in the quote_mysql statements in the headers_remove clauses must also be replaced with double colons "::" for Exim 4.85 and later Exim versions to work properly.

I patched exim 4.85 on a FreeBSD installation using the attached patch
as per bug 1533. The patch is named: patch-src_routers_rf__get__munge__headers.c.   If you want to implement the patch yourself in FreeBSD, then simply put the attached patch file in the  /usr/ports/mail/exim/files directory preserving its name exactly as is.  Then "cd /usr/ports/mail/exim" followed by "make deinstall clean" followed by "make install clean".  This will rebuild exim with the patch and everything should then work properly as long as you have substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses.  Note that the quote_mysql statements in the headers_add clauses must continue to use a single colon.  For operating systems other than FreeBSD, follow your OS's instructions on how to patch and recompile source code.  Your only other option is to wait for a later version of exim to be released for your OS in binary form and which has implemented this patch.

Users running unpatched versions of exim
4.83, 4.84 & 4.85 must comment out all of the headers_remove clauses which include quote_mysql statements altogether for exim to work properly.  This will, of course, remove features related to header removal but exim will otherwise work properly.  If you implement the attached patch to exim 4.85 then your installation will work properly as long as you have also substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses. As an example, for Exim4U, substitute double colons for the single colon in the quote_mysql statement in lines 829, 1051 and 1052 in /etc/exim/exim.conf.  Also, attached is a revised exim configuration file (/etc/exim/exim.conf) for Exim4U with the double colons already substituted.  Please note that this configuration file will only work with patched versions of exim 4.85 and/or later versions of exim that have implemented the attached patch.

FYI,

Gordon


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users

patch-src_routers_rf__get__munge__headers.c (481 bytes) Download Attachment
exim.conf (64K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exim 4.85 patch fix for headers_remove problem

Odhiambo Washington
Thanks Gordon.

I will apply the patch to my manual compile and test tomorrow.

Is there a plan for 4.85.1 though?


On 16 February 2015 at 21:55, Gordon Dickens <[hidden email]> wrote:
As discussed earlier in a separate thread, a regression was introduced in exim 4.83 that caused the headers_remove clauses in the exim configuration files to malfunction.   This regression continued in Exim 4.84 and 4.85. This regression impacts both Exim4U and Vexim users running exim 4.83, 4.84 & 4.85. Exim versions earlier than exim 4.83 are not impacted by this regression.  A partial fix was implemented in 4.85 which fixed the transports section but not the routers section.  The bug report is here:

http://bugs.exim.org/show_bug.cgi?id=1533

At the bottom of this bug report is a patch for the routers section.  Shamim Shahriar and I have both tested this patch and it appears to fix the regression altogether.  Please also note that the colon ":" in the quote_mysql statements in the headers_remove clauses must also be replaced with double colons "::" for Exim 4.85 and later Exim versions to work properly.

I patched exim 4.85 on a FreeBSD installation using the attached patch
as per bug 1533. The patch is named: patch-src_routers_rf__get__munge__headers.c.   If you want to implement the patch yourself in FreeBSD, then simply put the attached patch file in the  /usr/ports/mail/exim/files directory preserving its name exactly as is.  Then "cd /usr/ports/mail/exim" followed by "make deinstall clean" followed by "make install clean".  This will rebuild exim with the patch and everything should then work properly as long as you have substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses.  Note that the quote_mysql statements in the headers_add clauses must continue to use a single colon.  For operating systems other than FreeBSD, follow your OS's instructions on how to patch and recompile source code.  Your only other option is to wait for a later version of exim to be released for your OS in binary form and which has implemented this patch.

Users running unpatched versions of exim
4.83, 4.84 & 4.85 must comment out all of the headers_remove clauses which include quote_mysql statements altogether for exim to work properly.  This will, of course, remove features related to header removal but exim will otherwise work properly.  If you implement the attached patch to exim 4.85 then your installation will work properly as long as you have also substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses. As an example, for Exim4U, substitute double colons for the single colon in the quote_mysql statement in lines 829, 1051 and 1052 in /etc/exim/exim.conf.  Also, attached is a revised exim configuration file (/etc/exim/exim.conf) for Exim4U with the double colons already substituted.  Please note that this configuration file will only work with patched versions of exim 4.85 and/or later versions of exim that have implemented the attached patch.

FYI,

Gordon


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users




--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
"I can't hear you -- I'm using the scrambler."

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: exim 4.85 patch fix for headers_remove problem

gldickens3
Administrator
On 02/16/2015 02:49 PM, Odhiambo Washington wrote:
> Thanks Gordon.
>
> I will apply the patch to my manual compile and test tomorrow.
>
> Is there a plan for 4.85.1 though?

Hi Odhiambo,

I am not sure what the official exim release plan and schedule is for
this fix.  I am aware that Jeremy and the developers are also working on
a way for the users to specify an alternate list separator which would,
for example, provide a means to avoid having to double up the colons.

Thanks!

Gordon

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: exim 4.85 patch fix for headers_remove problem

Odhiambo Washington
In reply to this post by gldickens3


On 16 February 2015 at 21:55, Gordon Dickens <[hidden email]> wrote:
As discussed earlier in a separate thread, a regression was introduced in exim 4.83 that caused the headers_remove clauses in the exim configuration files to malfunction.   This regression continued in Exim 4.84 and 4.85. This regression impacts both Exim4U and Vexim users running exim 4.83, 4.84 & 4.85. Exim versions earlier than exim 4.83 are not impacted by this regression.  A partial fix was implemented in 4.85 which fixed the transports section but not the routers section.  The bug report is here:

http://bugs.exim.org/show_bug.cgi?id=1533

At the bottom of this bug report is a patch for the routers section.  Shamim Shahriar and I have both tested this patch and it appears to fix the regression altogether.  Please also note that the colon ":" in the quote_mysql statements in the headers_remove clauses must also be replaced with double colons "::" for Exim 4.85 and later Exim versions to work properly.

I patched exim 4.85 on a FreeBSD installation using the attached patch
as per bug 1533. The patch is named: patch-src_routers_rf__get__munge__headers.c.   If you want to implement the patch yourself in FreeBSD, then simply put the attached patch file in the  /usr/ports/mail/exim/files directory preserving its name exactly as is.  Then "cd /usr/ports/mail/exim" followed by "make deinstall clean" followed by "make install clean".  This will rebuild exim with the patch and everything should then work properly as long as you have substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses.  Note that the quote_mysql statements in the headers_add clauses must continue to use a single colon.  For operating systems other than FreeBSD, follow your OS's instructions on how to patch and recompile source code.  Your only other option is to wait for a later version of exim to be released for your OS in binary form and which has implemented this patch.

Users running unpatched versions of exim
4.83, 4.84 & 4.85 must comment out all of the headers_remove clauses which include quote_mysql statements altogether for exim to work properly.  This will, of course, remove features related to header removal but exim will otherwise work properly.  If you implement the attached patch to exim 4.85 then your installation will work properly as long as you have also substituted double colons for the single colon in the quote_mysql statements within the headers_remove clauses. As an example, for Exim4U, substitute double colons for the single colon in the quote_mysql statement in lines 829, 1051 and 1052 in /etc/exim/exim.conf.  Also, attached is a revised exim configuration file (/etc/exim/exim.conf) for Exim4U with the double colons already substituted.  Please note that this configuration file will only work with patched versions of exim 4.85 and/or later versions of exim that have implemented the attached patch.

FYI,

Gordon


Gordon,
 

Applied the patch to my Exim (compiled manually) and made the changes to the headers_remove.

In the morning I saw the following on my server, which runs a couple of lists on Mailman:

2015-02-18 04:07:34 SMTP connection from [74.125.82.169] I=[64.8.165.102]:25 (TCP/IP connection count = 1)
2015-02-18 04:07:44 H=mail-we0-f169.google.com [74.125.82.169] I=[64.8.165.102]:25 X=TLSv1.2:AES128-GCM-SHA256:128 F=<CENSORED> temporarily rejected RCPT <[hidden email]>: mailman_router router failed to expand "${if eq{${lookup{SpamHeaderType}lsearch{/etc/exim/exim4u_global_spam_virus}}}{0}{X-Spam-Score:X-Spam-Report:X-Spam-Flag:X-Spam-Score-Integer}}": missing } at end of string

And I made the following change to my mailman_router:

headers_remove = ${if eq{SPAMHEADERTYPE}{0}{X-Spam-Score::X-Spam-Report::X-Spam-Flag::X-Spam-Score-Integer}}

Please confirm that this is correct, because AFAIC, it solved my problem.





--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
"I can't hear you -- I'm using the scrambler."

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: exim 4.85 patch fix for headers_remove problem

gldickens3
Administrator
On 02/18/2015 11:07 AM, Odhiambo Washington wrote:

Applied the patch to my Exim (compiled manually) and made the changes to the headers_remove.

In the morning I saw the following on my server, which runs a couple of lists on Mailman:

2015-02-18 04:07:34 SMTP connection from [74.125.82.169] I=[64.8.165.102]:25 (TCP/IP connection count = 1)
2015-02-18 04:07:44 H=mail-we0-f169.google.com [74.125.82.169] I=[64.8.165.102]:25 X=TLSv1.2:AES128-GCM-SHA256:128 F=<CENSORED> temporarily rejected RCPT <[hidden email]>: mailman_router router failed to expand "${if eq{${lookup{SpamHeaderType}lsearch{/etc/exim/exim4u_global_spam_virus}}}{0}{X-Spam-Score:X-Spam-Report:X-Spam-Flag:X-Spam-Score-Integer}}": missing } at end of string

And I made the following change to my mailman_router:

headers_remove = ${if eq{SPAMHEADERTYPE}{0}{X-Spam-Score::X-Spam-Report::X-Spam-Flag::X-Spam-Score-Integer}}

Please confirm that this is correct, because AFAIC, it solved my problem.

Hi Odhiambo,

I believe that you have fixed the mailman router correctly. This is from the current exim specification document:
Because the list is split before expansion, any colons in expansion items must be doubled, or the facility for using a different list separator must be used.

I have attached to this email an updated exim configuration file (/etc/exim/exim.conf) for Exim4U which includes your mailman router fix.

Thanks!

Gordon


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users

exim.conf (64K) Download Attachment