Mailing List Archive

SPF not working in Exim 4.91 ?
I have been using Exim-4 built from source with SPF from libspf2:

    https://github.com/Exim/exim/wiki/SPF

for several years and when a new version is issued I grab the tarball,
copy over Local/Makefile from the previous release and:

    make configure
    make
    make install

and all is usually well, however in attempting to go from Exim 4.89 to
4.91 I can see there have been some changes:

https://fossies.org/diffs/exim/4.90.1_vs_4.91/src/spf.c-diff.html

So I've altered my Local/Makefile

#------------------------------------------------------------------------------
# Compiling Exim with experimental features. These are documented in
# experimental-spec.txt. "Experimental" means that the way these
features are
# implemented may still change. Backward compatibility is not guaranteed.

# Uncomment the following lines to add SPF support. You need to have libspf2
# installed on your system (www.libspf2.org). Depending on where it is
installed
# you may have to edit the CFLAGS and LDFLAGS lines.

#EXPERIMENTAL_SPF=yes
SUPPORT_SPF=yes
#CFLAGS  += -I/usr/local/include
LDFLAGS += -lspf2

# Uncomment the following lines to add SRS (Sender rewriting scheme)
support.
# You need to have libsrs_alt installed on your system (srs.mirtol.com).
# Depending on where it is installed you may have to edit the CFLAGS and
# LDFLAGS lines.

EXPERIMENTAL_SRS=yes
CFLAGS  += -I/usr/local/include
LDFLAGS += -lsrs_alt
#LDFLAGS += -lsrs2

and it compiles and links without error, however the SPF ACLs in my
exim.conf are not recognised and it throws errors:


2019-01-12 10:59:55 Exim configuration error in line 715 of
/etc/exim/exim.conf:
  error in ACL: unknown ACL condition/modifier in "warn spf = !none"
2019-01-12 11:02:01 Exim configuration error in line 843 of
/etc/exim/exim.conf:
  error in ACL: unknown ACL condition/modifier in "spf = pass"
2019-01-12 11:02:19 Exim configuration error in line 846 of
/etc/exim/exim.conf:
  error in ACL: unknown ACL condition/modifier in "deny spf = fail"
2019-01-12 11:11:33 Exim configuration error in line 715 of
/etc/exim/exim.conf:
  error in ACL: unknown ACL condition/modifier in "warn spf = !none"
2019-01-12 11:13:39 Exim configuration error in line 715 of
/etc/exim/exim.conf:
  error in ACL: unknown ACL condition/modifier in "warn spf = !none"


Can someone point me in the right direction?


Mike



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On 15/01/2019 09:54, Mike Tubby via Exim-users wrote:
> Can someone point me in the right direction?

Presumably your build didn't actually include SPF. Check
the "Support for" line from "exim -bV". If it's not there,
check you have a consistent set of source files and that
you didn't try and build on top of some previous version.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On Tue, 15 Jan 2019 at 13:04, Mike Tubby via Exim-users <exim-users@exim.org>
wrote:

>
> I have been using Exim-4 built from source with SPF from libspf2:
>
> https://github.com/Exim/exim/wiki/SPF
>
> for several years and when a new version is issued I grab the tarball,
> copy over Local/Makefile from the previous release and:
>
> make configure
> make
> make install
>
> and all is usually well, however in attempting to go from Exim 4.89 to
> 4.91 I can see there have been some changes:
>
> https://fossies.org/diffs/exim/4.90.1_vs_4.91/src/spf.c-diff.html
>
> So I've altered my Local/Makefile
>
>
> #------------------------------------------------------------------------------
> # Compiling Exim with experimental features. These are documented in
> # experimental-spec.txt. "Experimental" means that the way these
> features are
> # implemented may still change. Backward compatibility is not guaranteed.
>
> # Uncomment the following lines to add SPF support. You need to have
> libspf2
> # installed on your system (www.libspf2.org). Depending on where it is
> installed
> # you may have to edit the CFLAGS and LDFLAGS lines.
>
> #EXPERIMENTAL_SPF=yes
> SUPPORT_SPF=yes
> #CFLAGS += -I/usr/local/include
> LDFLAGS += -lspf2
>
> # Uncomment the following lines to add SRS (Sender rewriting scheme)
> support.
> # You need to have libsrs_alt installed on your system (srs.mirtol.com).
> # Depending on where it is installed you may have to edit the CFLAGS and
> # LDFLAGS lines.
>
> EXPERIMENTAL_SRS=yes
> CFLAGS += -I/usr/local/include
> LDFLAGS += -lsrs_alt
> #LDFLAGS += -lsrs2
>
> and it compiles and links without error, however the SPF ACLs in my
> exim.conf are not recognised and it throws errors:
>
>
> 2019-01-12 10:59:55 Exim configuration error in line 715 of
> /etc/exim/exim.conf:
> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
> 2019-01-12 11:02:01 Exim configuration error in line 843 of
> /etc/exim/exim.conf:
> error in ACL: unknown ACL condition/modifier in "spf = pass"
> 2019-01-12 11:02:19 Exim configuration error in line 846 of
> /etc/exim/exim.conf:
> error in ACL: unknown ACL condition/modifier in "deny spf = fail"
> 2019-01-12 11:11:33 Exim configuration error in line 715 of
> /etc/exim/exim.conf:
> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
> 2019-01-12 11:13:39 Exim configuration error in line 715 of
> /etc/exim/exim.conf:
> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
>
>
> Can someone point me in the right direction?
>
>
What's your OS?


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
Ubuntu 16.04.5 LTS

On 15/01/2019 12:20, Odhiambo Washington via Exim-users wrote:
> On Tue, 15 Jan 2019 at 13:04, Mike Tubby via Exim-users <exim-users@exim.org>
> wrote:
>
>> I have been using Exim-4 built from source with SPF from libspf2:
>>
>> https://github.com/Exim/exim/wiki/SPF
>>
>> for several years and when a new version is issued I grab the tarball,
>> copy over Local/Makefile from the previous release and:
>>
>> make configure
>> make
>> make install
>>
>> and all is usually well, however in attempting to go from Exim 4.89 to
>> 4.91 I can see there have been some changes:
>>
>> https://fossies.org/diffs/exim/4.90.1_vs_4.91/src/spf.c-diff.html
>>
>> So I've altered my Local/Makefile
>>
>>
>> #------------------------------------------------------------------------------
>> # Compiling Exim with experimental features. These are documented in
>> # experimental-spec.txt. "Experimental" means that the way these
>> features are
>> # implemented may still change. Backward compatibility is not guaranteed.
>>
>> # Uncomment the following lines to add SPF support. You need to have
>> libspf2
>> # installed on your system (www.libspf2.org). Depending on where it is
>> installed
>> # you may have to edit the CFLAGS and LDFLAGS lines.
>>
>> #EXPERIMENTAL_SPF=yes
>> SUPPORT_SPF=yes
>> #CFLAGS += -I/usr/local/include
>> LDFLAGS += -lspf2
>>
>> # Uncomment the following lines to add SRS (Sender rewriting scheme)
>> support.
>> # You need to have libsrs_alt installed on your system (srs.mirtol.com).
>> # Depending on where it is installed you may have to edit the CFLAGS and
>> # LDFLAGS lines.
>>
>> EXPERIMENTAL_SRS=yes
>> CFLAGS += -I/usr/local/include
>> LDFLAGS += -lsrs_alt
>> #LDFLAGS += -lsrs2
>>
>> and it compiles and links without error, however the SPF ACLs in my
>> exim.conf are not recognised and it throws errors:
>>
>>
>> 2019-01-12 10:59:55 Exim configuration error in line 715 of
>> /etc/exim/exim.conf:
>> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
>> 2019-01-12 11:02:01 Exim configuration error in line 843 of
>> /etc/exim/exim.conf:
>> error in ACL: unknown ACL condition/modifier in "spf = pass"
>> 2019-01-12 11:02:19 Exim configuration error in line 846 of
>> /etc/exim/exim.conf:
>> error in ACL: unknown ACL condition/modifier in "deny spf = fail"
>> 2019-01-12 11:11:33 Exim configuration error in line 715 of
>> /etc/exim/exim.conf:
>> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
>> 2019-01-12 11:13:39 Exim configuration error in line 715 of
>> /etc/exim/exim.conf:
>> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
>>
>>
>> Can someone point me in the right direction?
>>
>>
> What's your OS?
>
>

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
Hi Mike,

You can find my Makefile at https://lists.my.co.ke/~wash/Makefile.txt
Last time I used it to compile exim-4.92RC4, which is what I am running on
lists.my.co.ke.

root@lists:/home/wash/public_html# exim -bV
Exim version 4.92-RC4 #5 built 27-Dec-2018 23:32:52
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 -
2018
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq iconv() IPv6 Perl Expand_dlfunc TCPwrappers OpenSSL
Content_Scanning DANE DKIM DNSSEC Event OCSP PRDR PROXY SOCKS SPF
TCP_Fast_Open Experimental_QUEUEFILE Experimental_ARC Experimental_DCC
Experimental_DMARC Experimental_DSN_info
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dnsdb
dsearch mysql passwd redis sqlite
Authenticators: cram_md5 dovecot plaintext tls
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram
redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe queuefile
smtp
Malware: clamd sock cmdline

You can use that for your Local/Makefile and see. My Server is
Ubuntu 18.04.1 LTS.



On Wed, 16 Jan 2019 at 16:22, Mike Tubby via Exim-users <exim-users@exim.org>
wrote:

> Ubuntu 16.04.5 LTS
>
> On 15/01/2019 12:20, Odhiambo Washington via Exim-users wrote:
> > On Tue, 15 Jan 2019 at 13:04, Mike Tubby via Exim-users <
> exim-users@exim.org>
> > wrote:
> >
> >> I have been using Exim-4 built from source with SPF from libspf2:
> >>
> >> https://github.com/Exim/exim/wiki/SPF
> >>
> >> for several years and when a new version is issued I grab the tarball,
> >> copy over Local/Makefile from the previous release and:
> >>
> >> make configure
> >> make
> >> make install
> >>
> >> and all is usually well, however in attempting to go from Exim 4.89 to
> >> 4.91 I can see there have been some changes:
> >>
> >> https://fossies.org/diffs/exim/4.90.1_vs_4.91/src/spf.c-diff.html
> >>
> >> So I've altered my Local/Makefile
> >>
> >>
> >>
> #------------------------------------------------------------------------------
> >> # Compiling Exim with experimental features. These are documented in
> >> # experimental-spec.txt. "Experimental" means that the way these
> >> features are
> >> # implemented may still change. Backward compatibility is not
> guaranteed.
> >>
> >> # Uncomment the following lines to add SPF support. You need to have
> >> libspf2
> >> # installed on your system (www.libspf2.org). Depending on where it is
> >> installed
> >> # you may have to edit the CFLAGS and LDFLAGS lines.
> >>
> >> #EXPERIMENTAL_SPF=yes
> >> SUPPORT_SPF=yes
> >> #CFLAGS += -I/usr/local/include
> >> LDFLAGS += -lspf2
> >>
> >> # Uncomment the following lines to add SRS (Sender rewriting scheme)
> >> support.
> >> # You need to have libsrs_alt installed on your system (srs.mirtol.com
> ).
> >> # Depending on where it is installed you may have to edit the CFLAGS and
> >> # LDFLAGS lines.
> >>
> >> EXPERIMENTAL_SRS=yes
> >> CFLAGS += -I/usr/local/include
> >> LDFLAGS += -lsrs_alt
> >> #LDFLAGS += -lsrs2
> >>
> >> and it compiles and links without error, however the SPF ACLs in my
> >> exim.conf are not recognised and it throws errors:
> >>
> >>
> >> 2019-01-12 10:59:55 Exim configuration error in line 715 of
> >> /etc/exim/exim.conf:
> >> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
> >> 2019-01-12 11:02:01 Exim configuration error in line 843 of
> >> /etc/exim/exim.conf:
> >> error in ACL: unknown ACL condition/modifier in "spf = pass"
> >> 2019-01-12 11:02:19 Exim configuration error in line 846 of
> >> /etc/exim/exim.conf:
> >> error in ACL: unknown ACL condition/modifier in "deny spf = fail"
> >> 2019-01-12 11:11:33 Exim configuration error in line 715 of
> >> /etc/exim/exim.conf:
> >> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
> >> 2019-01-12 11:13:39 Exim configuration error in line 715 of
> >> /etc/exim/exim.conf:
> >> error in ACL: unknown ACL condition/modifier in "warn spf = !none"
> >>
> >>
> >> Can someone point me in the right direction?
> >>
> >>
> > What's your OS?
> >
> >
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On 15/01/2019 10:21, Jeremy Harris via Exim-users wrote:
> On 15/01/2019 09:54, Mike Tubby via Exim-users wrote:
>> Can someone point me in the right direction?
> Presumably your build didn't actually include SPF. Check
> the "Support for" line from "exim -bV". If it's not there,
> check you have a consistent set of source files and that
> you didn't try and build on top of some previous version.

I did build on a previous version that had:

EXPERIMENTAL_SPF=yes

In Local/Makefile

I changed it to:

SUPPORT_SPF=yes

but it didn't work possibly because I just did a "make; make install"
... I have now performed:

make clean
make makefile
make
make install

and it fixed it.

However, I noticed two other issues:


*1. Double increment of build numbers*

I only get even-numbered compile numbers due to what looks like a double
increment:

root@relay1:~/exim-4.91# make install
/bin/sh scripts/source_checks
`Makefile' is up to date.

make[1]: Entering directory '/home/mike/exim-4.91/build-Linux-x86_64'
*>>> version 4.91 #9
>>> version 4.91 #10*

>>> exicyclog script built
>>> exinext script built
>>> exiwhat script built

*2. Warning for unused return in usr1_handler*

GCC compiler generates a warning for unsied return codes in usr1_handler:

gcc exim.c
exim.c: In function ‘usr1_handler’:
exim.c:242:1: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result]
 (void)write(fd, process_info, process_info_len);
 ^
gcc expand.c

I have created a fix and sent a separate email with a proposed patch.


Mike


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On 2019-01-16 14:45, Mike Tubby wrote:

> *1. Double increment of build numbers*
>
> I only get even-numbered compile numbers due to what looks like a
> double increment:
>
> root@relay1:~/exim-4.91# make install
> /bin/sh scripts/source_checks
> `Makefile' is up to date.
>
> make[1]: Entering directory '/home/mike/exim-4.91/build-Linux-x86_64'
> *>>> version 4.91 #9
> >>> version 4.91 #10*
>
> >>> exicyclog script built
> >>> exinext script built
> >>> exiwhat script built

Yeah, this happens here too and I trained myself to ignore it. I think
it is because "make install" reruns the script which sets the build number.

> *2. Warning for unused return in usr1_handler*
>
> GCC compiler generates a warning for unsied return codes in usr1_handler:
>
> gcc exim.c
> exim.c: In function 'usr1_handler':
>
> exim.c:242:1: warning: ignoring return value of 'write', declared with
> attribute warn_unused_result [-Wunused-result] (void)write(fd,
> process_info, process_info_len);
>
> gcc expand.c

Ditto. IICR I tried to correct this but it was quite hard; I couldn't
find a way to throw away the value that would not trigger some warning
or another. But maybe doing it in the C source is the wrong way:
instead one should temporarily remove the warn_unused_result attribute.
Maybe gcc has a pragma for that?

--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On Wed, 16 Jan 2019 at 18:26, Mike Tubby via Exim-users <exim-users@exim.org>
wrote:

>
> On 15/01/2019 10:21, Jeremy Harris via Exim-users wrote:
> > On 15/01/2019 09:54, Mike Tubby via Exim-users wrote:
> >> Can someone point me in the right direction?
> > Presumably your build didn't actually include SPF. Check
> > the "Support for" line from "exim -bV". If it's not there,
> > check you have a consistent set of source files and that
> > you didn't try and build on top of some previous version.
>
> I did build on a previous version that had:
>
> EXPERIMENTAL_SPF=yes
>
> In Local/Makefile
>
> I changed it to:
>
> SUPPORT_SPF=yes
>
> but it didn't work possibly because I just did a "make; make install"
> ... I have now performed:
>
> make clean
> make makefile
> make
> make install
>
> and it fixed it.
>

Great!



>
> However, I noticed two other issues:
>
>
> *1. Double increment of build numbers*
>
> I only get even-numbered compile numbers due to what looks like a double
> increment:
>
> root@relay1:~/exim-4.91# make install
> /bin/sh scripts/source_checks
> `Makefile' is up to date.
>
> make[1]: Entering directory '/home/mike/exim-4.91/build-Linux-x86_64'
> *>>> version 4.91 #9
> >>> version 4.91 #10*
>

I have always never bothered about the compile numbers. Are they important
in a way??



>
> >>> exicyclog script built
> >>> exinext script built
> >>> exiwhat script built
>
> *2. Warning for unused return in usr1_handler*
>
> GCC compiler generates a warning for unsied return codes in usr1_handler:
>
> gcc exim.c
> exim.c: In function ‘usr1_handler’:
> exim.c:242:1: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result [-Wunused-result]
> (void)write(fd, process_info, process_info_len);
> ^
> gcc expand.c
>
> I have created a fix and sent a separate email with a proposed patch.
>

Aha. Why don't you try the 4.92RC and see if the same issue exists, and
give a patch
as well. I am saying that because we already started looking ahead -
towards 4.92.





--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SPF not working in Exim 4.91 ? [ In reply to ]
On 16/01/2019 20:21, Odhiambo Washington wrote:
>
>
> On Wed, 16 Jan 2019 at 18:26, Mike Tubby via Exim-users
> <exim-users@exim.org <mailto:exim-users@exim.org>> wrote:
>
>
> On 15/01/2019 10:21, Jeremy Harris via Exim-users wrote:
> > On 15/01/2019 09:54, Mike Tubby via Exim-users wrote:
> >> Can someone point me in the right direction?
> > Presumably your build didn't actually include SPF. Check
> > the "Support for" line from "exim -bV".  If it's not there,
> > check you have a consistent set of source files and that
> > you didn't try and build on top of some previous version.
>
> I did build on a previous version that had:
>
> EXPERIMENTAL_SPF=yes
>
> In Local/Makefile
>
> I changed it to:
>
> SUPPORT_SPF=yes
>
> but it didn't work possibly because I just did a "make; make install"
> ... I have now performed:
>
> make clean
> make makefile
> make
> make install
>
> and it fixed it.
>
>
> Great!
>
>
> However, I noticed two other issues:
>
>
> *1. Double increment of build numbers*
>
> I only get even-numbered compile numbers due to what looks like a
> double
> increment:
>
> root@relay1:~/exim-4.91# make install
> /bin/sh scripts/source_checks
> `Makefile' is up to date.
>
> make[1]: Entering directory '/home/mike/exim-4.91/build-Linux-x86_64'
> *>>> version 4.91 #9
>  >>> version 4.91 #10*
>
>
> I have always never bothered about the compile numbers. Are they
> important in a way??
>
It would be nice if the compile number incremented once each time the
code was built ... its sort of what its for ;-)

As it is currently running 'make' or 'make install' seems to perform a
double increment, well at least it does for me :-!


>
>  >>> exicyclog script built
>  >>> exinext script built
>  >>> exiwhat script built
>
> *2. Warning for unused return in usr1_handler*
>
> GCC compiler generates a warning for unsied return codes in
> usr1_handler:
>
> gcc exim.c
> exim.c: In function ‘usr1_handler’:
> exim.c:242:1: warning: ignoring return value of ‘write’, declared
> with
> attribute warn_unused_result [-Wunused-result]
>   (void)write(fd, process_info, process_info_len);
>   ^
> gcc expand.c
>
> I have created a fix and sent a separate email with a proposed patch.
>
>
> Aha. Why don't you try the 4.92RC and see if the same issue exists,
> and give a patch
> as well. I am saying that because we already started looking ahead -
> towards 4.92.
>
Yep, relay2.thorcom.net is now running 4.92-RC4 and the same issue exists.

Below is a more compact version of the hack, erm I mean 'patch' ;-)

root@relay2:~/exim-4.92-RC4/src# diff exim.c-orig exim.c
247,250c247,252
< if (fd < 0) return;
<
< (void)write(fd, process_info, process_info_len);
< (void)close(fd);
---
> if (fd > 0)
>   {
>     /* hack to avoid GCC warning for unused result */
>     ssize_t dummy1 = write(fd, process_info, process_info_len);
>     int dummy2 = close(fd);
>   }

Regards

Mike


>
>
> --
> Best regards,
> Odhiambo WASHINGTON,
> Nairobi,KE
> +254 7 3200 0004/+254 7 2274 3223
> "Oh, the cruft.", grep ^[^#] :-)
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/