Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

milter-greylist 4.0beta3 is available

milter-greylist 4.0beta3 is available

2007-10-03 by manu@netbsd.org

Here is it:

http://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.0b3.tgz
MD5 (milter-greylist-4.0b3.tgz) = edf3b3a4ad48f7d6aa1da707b3794e52

This version includes Johann Klasek's workaround for Solaris' stdio limitation
to 256 streams. Use --enable-stdio-hack to use it.

Changes since beta2:
        Warn in README that bison may be required for buidling
        Fix configure error on Solaris (Tim Mooney)
        Workaround for Solaris 256 stream limitation (Johann E. Klasek)
        Fix spelling errors (Nerijus Baliunas)
        Restore build for systems like Tru64 where ld does not acccept -R
        Cleanup temporary file after DB dump failure (Johann E. Klasek)
        Handle libc that fails stdio without setting errno (Johann E. Klasek)
        Fixes the usage of the thread-proof resolver library (Johann E. Klasek)
        Do not quit on non fatal errors (Johann E. Klasek)
        Display ACL when matching whitelist ACL (Benoit Branciard)
        Add troubleshooting in README (Rogier Maas)


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by shuttlebox

On 10/3/07, manu@... <manu@...> wrote:
> Here is it:
>
>  http://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.0b3.tgz
>  MD5 (milter-greylist-4.0b3.tgz) = edf3b3a4ad48f7d6aa1da707b3794e52
>
>  This version includes Johann Klasek's workaround for Solaris' stdio limitation
>  to 256 streams. Use --enable-stdio-hack to use it.
>
>  Changes since beta2:
>          Warn in README that bison may be required for buidling
>          Fix configure error on Solaris (Tim Mooney)
>          Workaround for Solaris 256 stream limitation (Johann E. Klasek)
>          Fix spelling errors (Nerijus Baliunas)
>          Restore build for systems like Tru64 where ld does not acccept -R
>          Cleanup temporary file after DB dump failure (Johann E. Klasek)
>          Handle libc that fails stdio without setting errno (Johann E. Klasek)
>          Fixes the usage of the thread-proof resolver library (Johann E. Klasek)
>          Do not quit on non fatal errors (Johann E. Klasek)
>          Display ACL when matching whitelist ACL (Benoit Branciard)
>          Add troubleshooting in README (Rogier Maas)

I tried beta 3 and the stdio hack, everything looked fine except for this:

"sync.c", line 363: warning: implicit function declaration: strtok_r
"sync.c", line 363: warning: improper pointer/integer combination: op "="
"sync.c", line 604: warning: improper pointer/integer combination: op "="
"sync.c", line 862: warning: statement not reached
"sync.c", line 1010: warning: improper pointer/integer combination: op "="
"sync.c", line 1045: warning: improper pointer/integer combination: op "="
"sync.c", line 1058: warning: improper pointer/integer combination: op "="
"sync.c", line 1082: warning: improper pointer/integer combination: op "="
"sync.c", line 1095: warning: improper pointer/integer combination: op "="
"sync.c", line 1106: warning: improper pointer/integer combination: op "="
"sync.c", line 1119: warning: improper pointer/integer combination: op "="
"sync.c", line 1130: warning: improper pointer/integer combination: op "="
"sync.c", line 1143: warning: improper pointer/integer combination: op "="
"sync.c", line 1155: warning: improper pointer/integer combination: op "="
"sync.c", line 1168: warning: improper pointer/integer combination: op "="
"sync.c", line 1181: warning: improper pointer/integer combination: op "="
"sync.c", line 1525: warning: improper pointer/integer combination: op "="

Could that be why mx sync does not work for me? I had the same
warnings before but now I couldn't get it to run at all. I use this as
parameters to configure:

  --prefix=/opt/csw --with-user=greylist
--with-conffile=/opt/csw/etc/mail/greyli
st.conf --enable-dnsrbl --enable-stdio-hack --localstatedir=/var/opt/csw/milter-
greylist

I'm trying to use /var/opt/csw/milter-greylist for the pid, socket and
db but it just ignored it and tried /var/milter-greylist instead. I
tried the options in greylist.conf and also directly on the
commandline to the binary at startup but to no avail. I get this for
all messages:

Oct  3 16:50:01 host.domain.se sm-mta[17724]: [ID 801593 mail.error]
l93Eo154017724: Milter (greylist): local socket name
/var/milter-greylist/milter-greylist.sock unsafe
Oct  3 16:50:01 host.domain.se sm-mta[17724]: [ID 801593 mail.info]
l93Eo154017724: Milter (greylist): to error state

-- 
/peter

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by Emmanuel Dreyfus

On Wed, Oct 03, 2007 at 05:02:16PM +0200, shuttlebox wrote:
> I tried beta 3 and the stdio hack, everything looked fine except for this:
> 
> "sync.c", line 363: warning: implicit function declaration: strtok_r

Where is strtok_r on your system? man strtok_r should tell it:

SYNOPSIS
     #include <string.h>		<<< I need this

     char *
     strtok(char * restrict str, const char * restrict sep);

     char *
     strtok_r(char *str, const char *sep, char **lasts);


-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by shuttlebox

On 10/3/07, Emmanuel Dreyfus <manu@...> wrote:
>  Where is strtok_r on your system? man strtok_r should tell it:
>
>  SYNOPSIS
>       #include <string.h>		<<< I need this
>
>  char *
>       strtok(char * restrict str, const char * restrict sep);
>
>  char *
>       strtok_r(char *str, const char *sep, char **lasts);

I found this:

    #include <string.h>

     char *strtok_r(char *s1, const char *s2, char **lasts);


-- 
/peter

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by Emmanuel Dreyfus

On Wed, Oct 03, 2007 at 05:22:57PM +0200, shuttlebox wrote:
> I found this:
> 
>     #include <string.h>
> 
>      char *strtok_r(char *s1, const char *s2, char **lasts);

Now peek at /usr/include/string.h and check the definition for
strtok_r. Is it enclused by #if or #ifdefs?

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by shuttlebox

On 10/3/07, Emmanuel Dreyfus <manu@...> wrote:
>  Now peek at /usr/include/string.h and check the definition for
>  strtok_r. Is it enclused by #if or #ifdefs?

It was in two places, it was a little more inside the first
if/else/endif but I only included the strtok_r stuff.

#if defined(__STDC__)

#if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
            (_POSIX_C_SOURCE - 0 >= 199506L)
extern char *strtok_r(char *, const char *, char **);
#endif  /* defined(__EXTENSIONS__) || defined(_REENTRANT) .. */

#else   /* __STDC__ */

#if defined(__EXTENSIONS__) || defined(_REENTRANT) || \
        (_POSIX_C_SOURCE - 0 >= 199506L)
extern char *strtok_r();
#endif  /* defined(__EXTENSIONS__) || defined(_REENTRANT).. */

#endif

-- 
/peter

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-03 by Emmanuel Dreyfus

On Wed, Oct 03, 2007 at 05:50:25PM +0200, shuttlebox wrote:
> #if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
>             (_POSIX_C_SOURCE - 0 >= 199506L)

What do you have in CFLAGS in the Makefile?
Please add some ifdefs to check the values, for instance at the top
of sync.c:

#ifdef __EXTENSIONS__
#warn __EXTENSIONS__ is set
#endif
#ifdef _REENTRANT
#warn REENTRANT is set
#endif
#ifdef _POSIX_C_SOURCE
#warn _POSIX_C_SOURCE is set
#endif

Check the man page of your C preprocessor to discover the value of 
_POSIX_C_SOURCE. With GCC, cpp -dM /dev/null should give it.


-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-04 by Benoit Branciard

manu@... a \ufffdcrit :
> 
> Changes since beta2:
>         Workaround for Solaris 256 stream limitation (Johann E. Klasek)

I may be totally wrong, but... Wasn't this patch supposed to replace 
*all* fdopen(), fopen() and fclose() stdio calls by Fdopen(), Fopen() 
and Fclose() macros ?

Fdopen() and Fopen() doesn't seem to be used anywhere in this 4.0b3 
code... Could they have been forgotten ?

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-04 by Emmanuel Dreyfus

On Thu, Oct 04, 2007 at 10:10:52AM +0200, Benoit Branciard wrote:
> I may be totally wrong, but... Wasn't this patch supposed to replace 
> *all* fdopen(), fopen() and fclose() stdio calls by Fdopen(), Fopen() 
> and Fclose() macros ?
> 
> Fdopen() and Fopen() doesn't seem to be used anywhere in this 4.0b3 
> code... Could they have been forgotten ?

Indeed it seems I screwed the thing. 4.0b4 will follow soon... 

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-04 by shuttlebox

On 10/3/07, Emmanuel Dreyfus <manu@...> wrote:
> On Wed, Oct 03, 2007 at 05:50:25PM +0200, shuttlebox wrote:
>  > #if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
>  >             (_POSIX_C_SOURCE - 0 >= 199506L)
>
>  What do you have in CFLAGS in the Makefile?

CFLAGS=         -fast -xarch=v8 -xildoff -xstrconst -DUSE_FD_POOL -DUSE_DNSRBL -
DCONFFILE=\"/opt/csw/etc/mail/greylist.conf\" -D_BSD_SOURCE -I${SRCDIR} -I.

>  Please add some ifdefs to check the values, for instance at the top
>  of sync.c:
>  #ifdef __EXTENSIONS__
>  #warn __EXTENSIONS__ is set
>  #endif
>  #ifdef _REENTRANT
>  #warn REENTRANT is set
>  #endif
>  #ifdef _POSIX_C_SOURCE
>  #warn _POSIX_C_SOURCE is set
>  #endif

I added this and issued gmake again, here's the output:

cc -fast -xarch=v8 -xildoff -xstrconst -DUSE_FD_POOL -DUSE_DNSRBL
-DCONFFILE=\"/opt/csw/etc/mail/greylist.conf\" -D_BSD_SOURCE -I. -I.
-I/opt/csw/include  -c -o sync.o sync.c
"sync.c", line 373: warning: implicit function declaration: strtok_r
"sync.c", line 373: warning: improper pointer/integer combination: op "="
"sync.c", line 614: warning: improper pointer/integer combination: op "="
"sync.c", line 872: warning: statement not reached
"sync.c", line 1020: warning: improper pointer/integer combination: op "="
"sync.c", line 1055: warning: improper pointer/integer combination: op "="
"sync.c", line 1068: warning: improper pointer/integer combination: op "="
"sync.c", line 1092: warning: improper pointer/integer combination: op "="
"sync.c", line 1105: warning: improper pointer/integer combination: op "="
"sync.c", line 1116: warning: improper pointer/integer combination: op "="
"sync.c", line 1129: warning: improper pointer/integer combination: op "="
"sync.c", line 1140: warning: improper pointer/integer combination: op "="
"sync.c", line 1153: warning: improper pointer/integer combination: op "="
"sync.c", line 1165: warning: improper pointer/integer combination: op "="
"sync.c", line 1178: warning: improper pointer/integer combination: op "="
"sync.c", line 1191: warning: improper pointer/integer combination: op "="
"sync.c", line 1535: warning: improper pointer/integer combination: op "="
cc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o
list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o
acl.o urlcheck.o stat.o clock.o geoip.o fd_pool.o  -lpthread -lsocket
-lresolv -lnsl -lmilter

>  Check the man page of your C preprocessor to discover the value of
>  _POSIX_C_SOURCE. With GCC, cpp -dM /dev/null should give it.

I'm not sure how to do that with Sun Studio C..?

-- 
/peter

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-04 by Johann E. Klasek

On Thu, Oct 04, 2007 at 11:30:11AM +0200, shuttlebox wrote:
> On 10/3/07, Emmanuel Dreyfus <manu@...> wrote:
> > On Wed, Oct 03, 2007 at 05:50:25PM +0200, shuttlebox wrote:
> >  > #if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
> >  >             (_POSIX_C_SOURCE - 0 >= 199506L)
> >
> >  What do you have in CFLAGS in the Makefile?
> 
> CFLAGS=         -fast -xarch=v8 -xildoff -xstrconst -DUSE_FD_POOL -DUSE_DNSRBL -
> DCONFFILE=\"/opt/csw/etc/mail/greylist.conf\" -D_BSD_SOURCE -I${SRCDIR} -I.

I think _REENTRANT is missing. On my Sun box the man page for strtok_r
says

NOTES
     When compiling multithreaded  applications,  the  _REENTRANT
     flag  must  be defined on the compile line. This flag should
     only be used in multithreaded applications.


After trying

cc -E -g -fast -xarch=v8 -xildoff -xstrconst -I/pd/db/include -I/usr/local/include -DUSE_DNSRBL -D_BSD_SOURCE -DUSE_FD_POOL -D_REENTRANT -c sync.c  | less

you should see the strtok_r declaration ...

> I'm not sure how to do that with Sun Studio C..?

I think in Solaris environments with Sun Studio CC the definition of _REENTRANT
is mandatory (I found it also in other milter applications).

On some projects I'm using

./configure -C CC=cc CFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -D_XOPEN_SOURCE=1 -D__EXTENSIONS__ -O"

which also leads to the strtok_r declaration (because of __EXTENSIONS__) ...


Johann

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-05 by Matthias Scheler

On Thu, Oct 04, 2007 at 02:10:37PM +0200, Johann E. Klasek wrote:
> After trying
> 
> cc -E -g -fast -xarch=v8 -xildoff -xstrconst -I/pd/db/include -I/usr/local/include -DUSE_DNSRBL -D_BSD_SOURCE -DUSE_FD_POOL -D_REENTRANT -c sync.c  | less

This is not the correct fix. The correct fix (see threads(3THR)) is to
use "cc -mt ...".

	Kind regards

-- 
Matthias Scheler                                  http://zhadum.org.uk/

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.