After upgrading from releng/10.3 to releng/11.1, the sid-milter is still working, until I rebuild it for the new ABI: after that, all email messages start to be rejected because the filter seems unable to get the right SMTP FROM headers (both from envelope and body). Here is what I find in /var/log/maillog: Milter insert (1): header: Authentication-Results: myserver; sender-id=fail (MalformedDomain) header.from="Someuser" <someuser@somedomain.com>; spf=fail (MalformedDomain) smtp.mfrom=<someuser@somedomain.com> Milter: data, reject=550 5.7.1 Rejected due to SPF policy for sender <someuser@somedomain.com> If I only rebuild mail/sid-milter, leaving all other ports untouched (old ABI), and I get the error. If I rebuild all ports for the new ABI except mail/sid-milter, I get the right behaviour (see an example here after): Milter insert (1): header: Authentication-Results: myserver; sender-id=pass header.from=someuser@somedomain.com; spf=pass smtp.mfrom=someuser@somedomain.com Here is the full list of ports I'm running on the server (jailed): arc-5.21p arj-3.10.22_5 autoconf-2.69_1 autoconf-wrapper-20131203 ca_root_nss-3.32.1 clamav-milter-0.99.2_5 compat10x-amd64-10.3.1003000.20170608 curl-7.56.1 dialog4ports-0.1.6 gettext-runtime-0.19.8.1_1 gmake-4.2.1_1 help2man-1.47.5 indexinfo-0.3 json-c-0.12.1 lha-1.14i_7 libcheck-0.10.0 libedit-3.1.20170329_2,1 libiconv-1.14_11 libltdl-2.4.6 libmilter-8.15.2 libtool-2.4.6 libxml2-2.9.4 m4-1.4.18,1 milter-greylist-4.6.2_1 openssl-1.0.2l,1 p5-Locale-gettext-1.07 pcre-8.40_1 perl5-5.24.3 pkg-1.10.1 pkgconf-1.3.10,1 portmaster-3.17.10 screen-4.6.2 sendmail+tls-8.15.2_3 sid-milter-1.0.0_2 unzip-6.0_7 unzoo-4.4_2
I could reproduce the regression with clang from FreeBSD11-1
A commit references this bug: Author: dinoex Date: Thu Nov 16 20:16:10 UTC 2017 New revision: 454334 URL: https://svnweb.freebsd.org/changeset/ports/454334 Log: - fix regression with clang 4.0.0 PR: 223702 - fix homepage - add pkg-message Changes: head/mail/sid-milter/Makefile head/mail/sid-milter/pkg-descr head/mail/sid-milter/pkg-message
Created attachment 188058 [details] sid-milter-1.0.0_3 make build output
Thank you so much for the fix, but it seems that it does not solve the issue for me. I attached the output of the command "make build", if it can be useful for you to guess the cause.
log looks fine. With -std=gnu89 set, I don't see MalformedDomain anymore. Please make sure you install and run the new binary. you should add more details by starting with: miltersid_flags="-L 8"
(In reply to Dirk Meyer from comment #5) Hi Dirk, thank for your reply. I obviously checked to run the right binary before disturbing again. This time I run both old and new packages with the debug flag. Here is the output of the binary compiled on FreeBSD 11.1: Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 check_host ip=1.1.1.117 domain=customer.com> sender=Test <test@customer.com> Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 >>> check-host ip=1.1.1.117 domain=customer.com> sender=Test <test@customer.com> Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 *** domain segment contains '>', which is not a letter, digit, or - *** Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 <<< check_host ip=1.1.1.117 domain=customer.com> sender=Test <test@customer.com>: Fail MalformedDomain Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 < no more requests Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 check_host: Fail MalformedDomain Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 check_host ip=1.1.1.117 domain=customer.com> sender=<test@customer.com> Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 >>> check-host ip=1.1.1.117 domain=customer.com> sender=<test@customer.com> Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 *** domain segment contains '>', which is not a letter, digit, or - *** Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 <<< check_host ip=1.1.1.117 domain=customer.com> sender=<test@customer.com>: Fail MalformedDomain Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 < no more requests Nov 20 14:51:36 mailb sid-filter[48090]: vAKDpVqX048261 check_host: Fail MalformedDomain Here is the same sending, with the old package, built on FreeBSD 10.3: Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 check_host ip=1.1.1.117 domain=customer.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 >>> check-host ip=1.1.1.117 domain=customer.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < marid customer.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > v=spf1 include:provider.com -all Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 >>> check-host ip=1.1.1.117 domain=provider.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < marid provider.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > v=spf1 mx ip4:1.1.1.96/27 a:ucs2.provider.com -all Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < mx provider.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > 3 records Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 <<< check_host ip=1.1.1.117 domain=provider.com sender=test@customer.com: Pass Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 <<< check_host ip=1.1.1.117 domain=customer.com sender=test@customer.com: Pass Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < no more requests Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 check_host: Pass Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 check_host ip=1.1.1.117 domain=customer.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 >>> check-host ip=1.1.1.117 domain=customer.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < marid customer.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > v=spf1 include:provider.com -all Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 >>> check-host ip=1.1.1.117 domain=provider.com sender=test@customer.com Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < marid provider.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > v=spf1 mx ip4:1.1.1.96/27 a:ucs2.provider.com -all Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < mx provider.com? Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 > 3 records Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 <<< check_host ip=1.1.1.117 domain=provider.com sender=test@customer.com: Pass Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 <<< check_host ip=1.1.1.117 domain=customer.com sender=test@customer.com: Pass Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 < no more requests Nov 20 14:54:30 mailb sid-filter[48359]: vAKDsP1F048362 check_host: Pass
A commit references this bug: Author: dinoex Date: Sun Nov 26 17:52:22 UTC 2017 New revision: 454913 URL: https://svnweb.freebsd.org/changeset/ports/454913 Log: - fix regression with clang 4.0.0 PR: 223702 Changes: head/mail/sid-milter/Makefile
After some more deep testing, -O2 in cflags causes the issue. When -O2 is disabled, the milter parses the mails successful.
(In reply to Dirk Meyer from comment #8) Great! In fact I confirm that the latest PORTREVISION is building and working fine on FreeBSD 11.1 now. Thank you so much for the fix.