Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-13 23:57 UTC

Thread

[SPF] libspf_alt vs libspf2

[SPF] libspf_alt vs libspf2

2004-09-14 by Alexandre CHERIF

Hi,

did someone use milter-greylist with libspf2 (aka libspf_alt) ?
there is some error on the reporting sender IP and i would like to know
if someone has a patch for it just before to make another.


milter-greylist: 1,5,7
libspf2 : 1,0,4

error in syslog : Sender IP 0.2.154.21 and address .......

ps: beside the reporting error, SPF is correctly running.

Regards

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-14 by manu@netbsd.org

Alexandre CHERIF <alexandre.cherif@...> wrote:

[libspf_alt]
I use it...

> error in syslog : Sender IP 0.2.154.21 and address ....... 
> ps: beside the reporting error, SPF is correctly running.

It could be an endianness big (I run my MX on a big endian CPU, so I
never notice them). WOuld the IP make sens if reversed? 

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@...

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-20 by Alexandre CHERIF

Re,

i've replace the inet_ntop with iptostring function and the log is now 
correct.
i will send a patch, for lib_spf2 (new name of spf_alt) and the syslog 
message.

if some want to try it before here is the change

line 273 of milter-greylist.c:
inet_ntop(AF_INET, &priv->priv_addr, ipstr, IPADDRLEN);

change to
                        if (!iptostring(SA(&priv->priv_addr), 
priv->priv_addrlen, ipstr, sizeof(ipstr)))
                        return SMFIS_CONTINUE;


Le 14 sept. 2004, à 20:58, manu@... a écrit :
Show quoted textHide quoted text
> Alexandre CHERIF <alexandre.cherif@...> wrote:
>
> [libspf_alt]
> I use it...
>
>> error in syslog : Sender IP 0.2.154.21 and address .......
>> ps: beside the reporting error, SPF is correctly running.
>
> It could be an endianness big (I run my MX on a big endian CPU, so I
> never notice them). WOuld the IP make sens if reversed?
>
> -- 
> Emmanuel Dreyfus
> Il y a 10 sortes de personnes dans le monde: ceux qui comprennent
> le binaire et ceux qui ne le comprennent pas.
> manu@...
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-20 by Emmanuel Dreyfus

On Mon, Sep 20, 2004 at 03:24:32PM +0200, Alexandre CHERIF wrote:
> line 273 of milter-greylist.c:
> inet_ntop(AF_INET, &priv->priv_addr, ipstr, IPADDRLEN);
> 
> change to
>                         if (!iptostring(SA(&priv->priv_addr), 
> priv->priv_addrlen, ipstr, sizeof(ipstr)))

Anyone has an opinion about this change?  

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-20 by Matthias Scheler

On Mon, Sep 20, 2004 at 01:32:15PM +0000, Emmanuel Dreyfus wrote:
> On Mon, Sep 20, 2004 at 03:24:32PM +0200, Alexandre CHERIF wrote:
> > line 273 of milter-greylist.c:
> > inet_ntop(AF_INET, &priv->priv_addr, ipstr, IPADDRLEN);
> > 
> > change to
> >                         if (!iptostring(SA(&priv->priv_addr), 
> > priv->priv_addrlen, ipstr, sizeof(ipstr)))
> Anyone has an opinion about this change?  

It is not portable. Neither Solaris nor NetBSD have that function.
What about using getnameinfo()?

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-20 by Alexandre CHERIF

this function is include in the source of milter-greylist not an OS one 
(see pending.c).

Le 20 sept. 2004, à 15:39, Matthias Scheler a écrit :
Show quoted textHide quoted text
> On Mon, Sep 20, 2004 at 01:32:15PM +0000, Emmanuel Dreyfus wrote:
>> On Mon, Sep 20, 2004 at 03:24:32PM +0200, Alexandre CHERIF wrote:
>>> line 273 of milter-greylist.c:
>>> inet_ntop(AF_INET, &priv->priv_addr, ipstr, IPADDRLEN);
>>>
>>> change to
>>>                         if (!iptostring(SA(&priv->priv_addr),
>>> priv->priv_addrlen, ipstr, sizeof(ipstr)))
>> Anyone has an opinion about this change?
>
> It is not portable. Neither Solaris nor NetBSD have that function.
> What about using getnameinfo()?
>
> 	Kind regards
>
> -- 
> Matthias Scheler                                  
> http://scheler.de/~matthias/
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-21 by Hajimu UMEMOTO

Hi,

>>>>> On Mon, 20 Sep 2004 13:32:15 +0000
>>>>> Emmanuel Dreyfus <manu@...> said:

manu> On Mon, Sep 20, 2004 at 03:24:32PM +0200, Alexandre CHERIF wrote:
> line 273 of milter-greylist.c:
> inet_ntop(AF_INET, &priv->priv_addr, ipstr, IPADDRLEN);
> 
> change to
>                         if (!iptostring(SA(&priv->priv_addr), 
> priv->priv_addrlen, ipstr, sizeof(ipstr)))

manu> Anyone has an opinion about this change?  

Oops, it seems be a bug I introduced during an IPv6 support.  It must
be corrected as Alexandre said.  Sorry for the mess.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@...  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-09-21 by Alexandre CHERIF

Hi,

i've made a patch for SPF, it now support  lib_spf2 (aka lib_spf_alt),
you can configure it by the --with-libspf2=[DIR] like the old spf_alt.

a new syslog message is sent when the spf_check has failed

if someone use lib_spf, could it check that SPF_S_FAIL and SPF_H_FAIL 
are
the correct code for a failed check.

comment are wecolme as usual.

Regards

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-10-06 by manu@netbsd.org

Alexandre CHERIF <alexandre.cherif@...> wrote:

> +# Try to configure for libspf2
> +SAVEDLDFLAGS=$LDFLAGS
> +SAVEDCFLAGS=$CFLAGS
> +AC_ARG_WITH(libspf2, 
> +     [  --with-libspf2=DIR  Find libspf2 in DIR],
> +     [LDFLAGS=$LDFLAGS" -L$withval/lib -Wl,$rpath$withval/lib"
> +         CFLAGS=$CFLAGS" -I$withval/include"
> +         AC_CHECK_LIB(spf2, SPF_create_config, [

With libspf2-1.2.0, it seems SPF_create_config does not exist anymore.
If that's the case, you'll probably have to check libspf2 version to
ensure the older API is available, and write a new function in spf.c to
use the new API.

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@...

Re: [milter-greylist] [SPF] libspf_alt vs libspf2

2004-10-06 by Alexandre CHERIF

Re,

yep that's true, i will send a new patch for libspf2 and new api this 
week

Regards

Le 6 oct. 2004, à 09:05, manu@... a écrit :
Show quoted textHide quoted text
>
> Alexandre CHERIF <alexandre.cherif@...> wrote:
>
>> +# Try to configure for libspf2
>> +SAVEDLDFLAGS=$LDFLAGS
>> +SAVEDCFLAGS=$CFLAGS
>> +AC_ARG_WITH(libspf2,
>> +     [  --with-libspf2=DIR  Find libspf2 in DIR],
>> +     [LDFLAGS=$LDFLAGS" -L$withval/lib -Wl,$rpath$withval/lib"
>> +         CFLAGS=$CFLAGS" -I$withval/include"
>> +         AC_CHECK_LIB(spf2, SPF_create_config, [
>
> With libspf2-1.2.0, it seems SPF_create_config does not exist anymore.
> If that's the case, you'll probably have to check libspf2 version to
> ensure the older API is available, and write a new function in spf.c to
> use the new API.
>
> -- 
> Emmanuel Dreyfus
> Il y a 10 sortes de personnes dans le monde: ceux qui comprennent
> le binaire et ceux qui ne le comprennent pas.
> manu@...
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

libspf2

2004-11-12 by manu@netbsd.org

There have been no update on that front. Should we hold 1.6 release for
libspf2 support? Anyone wants to contribute it?

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.