Yahoo Groups archive

Milter-greylist

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

Thread

"DNS resolver is not thread safe" error

"DNS resolver is not thread safe" error

2006-07-28 by Denis Solovyov

I'm doing

./configure --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local/lib

and getting the following message:

--enable-dnsrbl used but DNS resolver is not thread safe
Try installing BIND9 and using --with-libbind

I have BIND 9.3.2 installed.  Without "--enable-dnsrbl" it seems that it
is configured and compiled well (though with several warnings).
System is Linux 2.4 with gcc 3.3.4 and glibc 2.3.2

# ls -l /usr/local/lib | grep libbind
-rw-r--r--   1 root root   97886 Jan  3  2006 libbind9.a
-rw-r--r--   1 root root     919 Jan  3  2006 libbind9.la
lrwxrwxrwx   1 root root      17 Jan  3  2006 libbind9.so -> libbind9.so.0.0.7
lrwxrwxrwx   1 root root      17 Jan  3  2006 libbind9.so.0 -> libbind9.so.0.0.7
-rw-r--r--   1 root root  112421 Jan  3  2006 libbind9.so.0.0.7
-rw-r--r--   1 root root 3917302 Jan  3  2006 libbind.a
-rw-r--r--   1 root root     798 Jan  3  2006 libbind.la
lrwxrwxrwx   1 root root      16 Jan  3  2006 libbind.so -> libbind.so.4.0.2
lrwxrwxrwx   1 root root      16 Jan  3  2006 libbind.so.4 -> libbind.so.4.0.2
-rw-r--r--   1 root root 1979501 Jan  3  2006 libbind.so.4.0.2

What should I do?  Maybe reinstall BIND with some specific options (I
did "./configure --enable-libbind --with-libtool"), or add some options
to milter-greylist's configure?

Best regards,
Denis Solovyov

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-28 by Emmanuel Dreyfus

On Fri, Jul 28, 2006 at 09:00:59PM +0900, Denis Solovyov wrote:
> 
> ./configure --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local/lib
> 
> and getting the following message:
> 
> --enable-dnsrbl used but DNS resolver is not thread safe
> Try installing BIND9 and using --with-libbind
> 
> I have BIND 9.3.2 installed.  Without "--enable-dnsrbl" it seems that it
> is configured and compiled well (though with several warnings).
> System is Linux 2.4 with gcc 3.3.4 and glibc 2.3.2

I need the tail of config.log to figure what happened.

You can apply Hajimu UMEMOTO's patch, which add a flag to disable the test.
-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-28 by Hajimu UMEMOTO

Hi,

>>>>> On Fri, 28 Jul 2006 21:00:59 +0900
>>>>> Denis Solovyov <elk@...> said:

elk> ./configure --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local/lib

As far as I read configure.ac, it should be --with-libbind=/usr/local.

Sincerely,

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

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-28 by Emmanuel Dreyfus

On Sat, Jul 29, 2006 at 01:11:47AM +0900, Hajimu UMEMOTO wrote:
> elk> ./configure --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local/lib
> 
> As far as I read configure.ac, it should be --with-libbind=/usr/local.

Indeed.

-- 
Emmanuel Dreyfus
manu@...

Re[2]: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-28 by Denis Solovyov

elk>> ./configure --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local/lib
HU> As far as I read configure.ac, it should be --with-libbind=/usr/local.

Yes, yes, I tried both, as well as adding CPPFLAGS with
-I/usr/local/bind/include.  The result is the same all
the time.

Best regards,
Denis Solovyov

Re[3]: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-28 by Denis Solovyov

elk>>> ./configure --with-user=greylist --enable-dnsrbl
elk>>> --with-libbind=/usr/local/lib
HU>> As far as I read configure.ac, it should be --with-libbind=/usr/local.
DS> Yes, yes, I tried both, as well as adding CPPFLAGS with
DS> -I/usr/local/bind/include.  The result is the same all
DS> the time.

This helped:

CPPFLAGS="-D_BSD_SOURCE -I/usr/local/bind/include" ./configure \
    --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local

after that configuration was done without errors, and milter-greylist
was compiled (with several warnings).

Has anyone here compiled milter-greylist 2.1.8(9) under Linux with
--enable-dnsrbl?

Best regards,
Denis Solovyov

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-07-31 by Sysadmin

Tere.
> This helped:
>
> CPPFLAGS="-D_BSD_SOURCE -I/usr/local/bind/include" ./configure \
>     --with-user=greylist --enable-dnsrbl --with-libbind=/usr/local
>
> after that configuration was done without errors, and milter-greylist
> was compiled (with several warnings).
>
> Has anyone here compiled milter-greylist 2.1.8(9) under Linux with
> --enable-dnsrbl?
>
>   
No. I have redhat 7.3 based linux, bind & bind-devel packages installed,
--enable-dnsrbl --with-libbind gives error:

dnsrbl.o: In function `dnsrbl_check_source':
/usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:135: undefined reference to `__ns_initparse'
/usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:145: undefined reference to `__ns_parserr'
collect2: ld returned 1 exit status
make: *** [milter-greylist] Error 1




-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Emmanuel Dreyfus

On Mon, Jul 31, 2006 at 01:16:17PM +0300, Sysadmin wrote:
> No. I have redhat 7.3 based linux, bind & bind-devel packages installed,
> --enable-dnsrbl --with-libbind gives error:
> 
> dnsrbl.o: In function `dnsrbl_check_source':
> /usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:135: undefined reference to `__ns_initparse'
> /usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:145: undefined reference to `__ns_parserr'
> collect2: ld returned 1 exit status
> make: *** [milter-greylist] Error 1

is -lbind set in CFLAGS?

Can you look for ns_initparse on your system? Where is it?


-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Sysadmin

Tere.
>
>
> is -lbind set in CFLAGS?
>   
No, as bind is from package and in /usr. Howerver also Denis told, that  
in configure.ac, it should be --with-libbind=/usr/local.

> Can you look for ns_initparse on your system? Where is it?
>
>   
Seems nowhere, locate gives nothing.


-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Emmanuel Dreyfus

On Tue, Aug 01, 2006 at 06:31:14PM +0300, Sysadmin wrote:
> No, as bind is from package and in /usr. Howerver also Denis told, that  
> in configure.ac, it should be --with-libbind=/usr/local.
> 
> > Can you look for ns_initparse on your system? Where is it?
> >
> >   
> Seems nowhere, locate gives nothing.

Run nm on your libraries, search ns_initparse, look for a T line:

nm /usr/lib/*.so

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Emmanuel Dreyfus

On Tue, Aug 01, 2006 at 07:38:23PM +0300, Sysadmin wrote:
> > Run nm on your libraries, search ns_initparse, look for a T line:
> >
> > nm /usr/lib/*.so
> >
> >   
> nm /usr/lib/*.so | grep ns_initparse
> 00008e34 t __ns_initparse

In what library is it?

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Sysadmin

Tere.
>
> In what library is it?
>
>   
Sry, in /usr/lib/libresolv.so:

/usr/lib/libresolv.so:                                                                                             

0000c3c0 r 
AskedForGot                                                                                             

0000cda0 r 
Base64                                                                                                  

00000000 A 
GLIBC_2.0                                                                                               

00000000 A 
GLIBC_2.2                                                                                               

00000000 A 
GLIBC_PRIVATE                                                                                           

0000cde1 r 
Pad64                                                                                                   

0000d584 a 
_DYNAMIC                                                                                                

0000d66c a 
_GLOBAL_OFFSET_TABLE_                                                                                   

         U 
_IO_putc@@GLIBC_2.0                                                                                     

0000d660 ? 
__CTOR_END__                                                                                            

0000d65c ? 
__CTOR_LIST__                                                                                           

0000d668 ? 
__DTOR_END__                                                                                            

0000d664 ? 
__DTOR_LIST__                                                                                           

0000d580 ? 
__EH_FRAME_BEGIN__                                                                                      

0000d580 ? 
__FRAME_END__                                                                                           

00008934 T 
__b64_ntop                                                                                              

00008bec T 
__b64_pton                                                                                              

0000d800 a 
__bss_start                                                                                             

         U 
__ctype_b@@GLIBC_2.0                                                                                    

         U 
__ctype_tolower@@GLIBC_2.0                                                                              

         U 
__ctype_toupper@@GLIBC_2.0                                                                              

         w 
__cxa_finalize@@GLIBC_2.1.3                                                                             

         w 
__deregister_frame_info@@GLIBC_2.0                                                                      

000043d0 T 
__dn_comp                                                                                               

00005fc8 T 
__dn_count_labels                                                                                       

00004400 T 
__dn_expand                                                                                             

00004340 T 
__dn_skipname                                                                                           

0000c344 t 
__do_global_ctors_aux                                                                                   

00002714 t 
__do_global_dtors_aux                                                                                   

0000d000 d 
__dso_handle                                                                                            

         U 
__errno_location@@GLIBC_2.0                                                                             

000060e0 T 
__fp_nquery                                                                                             

0000612c T 
__fp_query                                                                                              

00006070 T 
__fp_resstat                                                                                            

         w 
__gmon_start__                                                                                          

         U 
__h_errno_location@@GLIBC_2.0                                                                           

00006158 T 
__hostalias                                                                                             

0000cede ? 
__invoke_dynamic_linker__                                                                               

000052b4 T 
__loc_aton                                                                                              

00005694 T 
__loc_ntoa                                                                                              

00009f48 t 
__ns_format_ttl                                                                                         

00009ecc T 
__ns_get16                                                                                              

00009ee0 t 
__ns_get32                                                                                              

*00008e34 t __ns_initparse*

-- 
Sysadmin

Re[2]: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-01 by Denis Solovyov

>> is -lbind set in CFLAGS?
S> No, as bind is from package and in /usr. Howerver also Denis told, that
S> in configure.ac, it should be --with-libbind=/usr/local.

BIND  is  located  in  /usr/local  if it was built from the sources with
default  settings.  Default  installation  also  puts  include  files of
libbind  to  /usr/local/bind/include (and it seems that this location is
not  used  while  building  milter-greylist  -  I  set  it  as  "-I"  in
CPPFLASGS). 

Binary  RPMs  from Linux distributives will probably put BIND to /usr as
well as other software.

Best regards,
Denis Solovyov

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-02 by Sysadmin

Tere.
>>> is -lbind set in CFLAGS?
>>>       
> S> No, as bind is from package and in /usr. Howerver also Denis told, that
> S> in configure.ac, it should be --with-libbind=/usr/local.
>
> BIND  is  located  in  /usr/local  if it was built from the sources with
> default  settings.  Default  installation  also  puts  include  files of
> libbind  to  /usr/local/bind/include (and it seems that this location is
> not  used  while  building  milter-greylist  -  I  set  it  as  "-I"  in
> CPPFLASGS). 
>
> Binary  RPMs  from Linux distributives will probably put BIND to /usr as
> well as other software.
>
>   
Hmm, I tried:

export 
CPPFLAGS                                                                                                    

export 
LDFLAGS                                                                                                     

CPPFLAGS=-I/usr/lib/include                                                                                        

LDFLAGS=-L/usr/lib

./configure --with-user=smmsp --without-db --without-drac-db 
\                                                    
    --with-conffile=/etc/mail/greylist.conf 
--with-dumpfile=/var/spool/greylist/greylist.db \                     
    --bindir=/usr/local/sbin --enable-dnsrbl --with-libbind=/usr 
--with-thread-safe-resolver

make

same errors:

gcc -g -O2 -Wall -Ino/include -I/usr/include/bind -I/usr/include 
-D_XOPEN_SOURCE=500 -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/spool/greylist/greylist.db\" -DDRACDB=\"no\" 
-D_BSD_SOURCE -I/usr/lib/include  -c -o conf.o conf.c
gcc -g -O2 -Wall -Ino/include -I/usr/include/bind -I/usr/include 
-D_XOPEN_SOURCE=500 -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/spool/greylist/greylist.db\" -DDRACDB=\"no\" 
-D_BSD_SOURCE -I/usr/lib/include  -c -o autowhite.o autowhite.c
gcc -g -O2 -Wall -Ino/include -I/usr/include/bind -I/usr/include 
-D_XOPEN_SOURCE=500 -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/spool/greylist/greylist.db\" -DDRACDB=\"no\" 
-D_BSD_SOURCE -I/usr/lib/include  -c -o dump.o dump.c
gcc -g -O2 -Wall -Ino/include -I/usr/include/bind -I/usr/include 
-D_XOPEN_SOURCE=500 -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/spool/greylist/greylist.db\" -DDRACDB=\"no\" 
-D_BSD_SOURCE -I/usr/lib/include  -c -o spf.o spf.c
gcc -g -O2 -Wall -Ino/include -I/usr/include/bind -I/usr/include 
-D_XOPEN_SOURCE=500 -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/spool/greylist/greylist.db\" -DDRACDB=\"no\" 
-D_BSD_SOURCE -I/usr/lib/include  -c -o acl.o acl.c
gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o 
list.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o 
-L/usr/lib -Lno/lib -Wl,--rpath=no/lib -L/usr/lib -Wl,--rpath=/usr/lib 
-lresolv -lnsl -lpthread -lmilter
dnsrbl.o: In function `dnsrbl_check_source':
/usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:135: undefined 
reference to `__ns_initparse'
/usr/src/redhat/BUILD/milter-greylist-2.1.10/dnsrbl.c:145: undefined 
reference to `__ns_parserr'
collect2: ld returned 1 exit status
make: *** [milter-greylist] Error 1


What now?

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-02 by Emmanuel Dreyfus

On Wed, Aug 02, 2006 at 09:33:25AM +0300, Sysadmin wrote:
> gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o 
> list.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o 
> -L/usr/lib -Lno/lib -Wl,--rpath=no/lib -L/usr/lib -Wl,--rpath=/usr/lib 
> -lresolv -lnsl -lpthread -lmilter

Where has -lbind gone? Add it to LIBS in the Makefile.

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-04 by Sysadmin

Tere.
>
>
> Where has -lbind gone? Add it to LIBS in the Makefile.
>
>   
Well, I haven't touch the Makefile, so the question is, is  it globally 
missing or is it just me?

Btw - have anyone successfully compiled it in Linux?

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-04 by Fabien Tassin

According to Sysadmin:
> 
> Btw - have anyone successfully compiled it in Linux?

I'm running 2.1.12 on Debian/Linux since it went out, no problem so far.
It's with dnsrbl and spf2.

libresolv, libnsl and libpthread are all from libc6 (glibc 2.3.6).
I also have bind9 there but it's not used by greylist.
Here is the relevant part of lsof:

COMMAND     PID  USER   FD   TYPE     DEVICE    SIZE     NODE NAME
milter-gr 13456 smmsp  txt    REG        3,5  286368   160389 /usr/local/bin/milter-greylist
milter-gr 13456 smmsp  mem    REG        3,1   92260   203431 /lib/ld-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,5   90936      171 /usr/lib/libspf2.so.2.0.0
milter-gr 13456 smmsp  mem    REG        3,1   59172   203566 /lib/libresolv-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,1   76792   203483 /lib/libnsl-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,1   81962   203556 /lib/libpthread-0.10.so
milter-gr 13456 smmsp  mem    REG        3,5   39860       31 /usr/lib/libmilter.so.0
milter-gr 13456 smmsp  mem    REG        3,1 1177116   203458 /lib/libc-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,1   30428   203484 /lib/libnss_compat-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,1   34324   203513 /lib/libnss_nis-2.3.6.so
milter-gr 13456 smmsp  mem    REG        3,1   38376   203494 /lib/libnss_files-2.3.6.so

/Fabien

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-04 by Emmanuel Dreyfus

On Fri, Aug 04, 2006 at 03:02:59PM +0200, Fabien Tassin wrote:
> I'm running 2.1.12 on Debian/Linux since it went out, no problem so far.
> It's with dnsrbl and spf2.

Maybe we can share experiences about the DNSRBL stuff: how do you use it?

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by Sysadmin

Tere.
> I'm running 2.1.12 on Debian/Linux since it went out, no problem so far.
> It's with dnsrbl and spf2.
>
> libresolv, libnsl and libpthread are all from libc6 (glibc 2.3.6).
> I also have bind9 there but it's not used by greylist.
>   

So in Debian all work's fine?

However,I'm still in same situation. Reading bind.spec from 
bind-9.2.1-1.7x.2.src.rpm helped a litte, as I found that bind was 
compiled without libbind support, but compiled it with libbbind support, 
and if I tried to install the bind-devel package, it conflicted with the 
files from glibc-devel package. So I downloaded the latest bind source, 
compiled it with options:

./configure 
\                                                                                                     
 
--prefix=/usr/local/bind 
\                                                                                         

--enable-libbind 
\                                                                                                 

--enable-ipv6 
\                                                                                                    

--with-openssl=/usr/local/ssl 
\                                                                                    

--enable-threads \

And then tried to compile milter-greylist with oprions:

export 
CPPFLAGS                                                                                                    

export 
LDFLAGS                                                                                                    

                                                                                                              
LDFLAGS="-L/usr/local/bind/lib"                                                                                   

CPPFLAGS="-I/usr/local/bind/include"                                                                                                                                                         

                                                                                                                   

./configure --with-user=smmsp --without-db --without-drac-db 
\                                                    
    --with-conffile=/etc/mail/greylist.conf 
--with-dumpfile=/var/spool/greylist/greylist.db \                     
    --bindir=/usr/local/sbin --enable-dnsrbl --with-libbind=/usr 
--with-thread-safe-resolver 

I'm still getting the same errors:

gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o 
list.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o 
-Lno/lib -Wl,--rpath=no/lib -L/usr/lib -Wl,--rpath=/usr/lib -lresolv 
-lnsl -lpthread -lmilter
dnsrbl.o: In function `dnsrbl_check_source':
/usr/src/redhat/BUILD/milter-greylist-2.1.12/dnsrbl.c:166: undefined 
reference to `__ns_initparse'
/usr/src/redhat/BUILD/milter-greylist-2.1.12/dnsrbl.c:173: undefined 
reference to `__ns_parserr'
collect2: ld returned 1 exit status

And from config.log  I found:

configure:3062: checking for res_init in -lbind 
configure:3092: gcc -o conftest -g -O2 -Wall -Ino/include 
-I/usr/include/bind -I/usr/include                      
-I/usr/local/bind/include  -Lno/lib -Wl,--rpath=no/lib -L/usr/lib 
-Wl,--rpath=/usr/lib conftest.c -lbind   >&5    
/usr/bin/ld: cannot find 
-lbind                                                                                    

collect2: ld returned 1 exit status

Ok, then after many different settings I tried:

./configure --with-user=smmsp --without-db --without-drac-db 
\                                                    
    --with-conffile=/etc/mail/greylist.conf 
--with-dumpfile=/var/spool/greylist/greylist.db \                     
    --bindir=/usr/local/sbin --enable-dnsrbl 
--with-libbind=/usr/local/bind --with-thread-safe-resolver

And from config.log  I found:

configure:3062: checking for res_init in 
-lbind                                                                   
configure:3092: gcc -o conftest -g -O2 -Wall -Ino/include 
-I/usr/local/bind/include/bind -I/usr/local/bind/include
 -Lno/lib -Wl,--rpath=no/lib -L/usr/local/bind/lib 
-Wl,--rpath=/usr/local/bind/lib conftest.c -lbind   >&5        
/tmp/cckdnjpV.o: In function 
`main':                                                                               

/usr/src/redhat/BUILD/milter-greylist-2.1.12/conftest.c:21: undefined 
reference to `res_init'                     
collect2: ld returned 1 exit status

What is now wrong?

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by manu@netbsd.org

Sysadmin <sysadmin@...> wrote:

[BIND configuration]
> ./configure --prefix=/usr/local/bind --enable-libbind
(...)

[milter-greylist configuration]
> ./configure --with-user=smmsp --without-db --without-drac-db 
> \                                                    
>     --with-conffile=/etc/mail/greylist.conf 
> --with-dumpfile=/var/spool/greylist/greylist.db \
>     --bindir=/usr/local/sbin --enable-dnsrbl --with-libbind=/usr 
> --with-thread-safe-resolver 

Use --with-libbind=/usr/local/bind since you installed it there.
 
And if you use the resolver from BIND 9, you should not need
--with-thread-safe-resolver

Please adjust --with-libbind and remove --with-thread-safe-resolver, and
tell us how it goes. I suspect you'll succeed. If you do I'll update the
docs to give theses hints.   

Basically, your problem was that you did not have libbind.a, right?
 
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by Sysadmin

Tere.
>
> Use --with-libbind=/usr/local/bind since you installed it there.
>   
Last time I did so, but still error.
>  
> And if you use the resolver from BIND 9, you should not need
> --with-thread-safe-resolver
>
> Please adjust --with-libbind and remove --with-thread-safe-resolver, and
> tell us how it goes. I suspect you'll succeed. If you do I'll update the
> docs to give theses hints. 
>   

Well, with:

./configure --with-user=smmsp --without-db --without-drac-db 
\                                                    
    --with-conffile=/etc/mail/greylist.conf 
--with-dumpfile=/var/spool/greylist/greylist.db \                     
    --bindir=/usr/local/sbin --enable-dnsrbl --with-libbind=/usr/local/bind

I got same error:

gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o 
list.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o 
-Lno/lib -Wl,--rpath=no/lib -L/usr/local/bind/lib 
-Wl,--rpath=/usr/local/bind/lib -lresolv -lnsl -lpthread -lmilter
dnsrbl.o: In function `dnsrbl_check_source':
/usr/src/redhat/BUILD/milter-greylist-2.1.12/dnsrbl.c:166: undefined 
reference to `__ns_initparse'
/usr/src/redhat/BUILD/milter-greylist-2.1.12/dnsrbl.c:173: undefined 
reference to `__ns_parserr'
collect2: ld returned 1 exit status

config.log:

configure:3062: checking for res_init in 
-lbind                                                                   
configure:3092: gcc -o conftest -g -O2 -Wall -Ino/include 
-I/usr/local/bind/include/bind -I/usr/local/bind/include
   -Lno/lib -Wl,--rpath=no/lib -L/usr/local/bind/lib 
-Wl,--rpath=/usr/local/bind/lib conftest.c -lbind   >&5      
/tmp/cc4kdZ6l.o: In function 
`main':                                                                               

/usr/src/redhat/BUILD/milter-greylist-2.1.12/conftest.c:21: undefined 
reference to `res_init'                     
collect2: ld returned 1 exit 
status                                                                                

configure:3098: $? = 
1                                                                                             

configure: failed program 
was:                                                                                     

| /* confdefs.h.  
*/                                                                        

> Basically, your problem was that you did not have libbind.a, right?
>  
>   
Yes. So I leaved the Redhat packages installed, and compiled for 
milter-greylist bind from the source.

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by manu@netbsd.org

Sysadmin <sysadmin@...> wrote:

> configure:3062: checking for res_init in 
> -lbind
> configure:3092: gcc -o conftest -g -O2 -Wall -Ino/include 
> -I/usr/local/bind/include/bind -I/usr/local/bind/include
>    -Lno/lib -Wl,--rpath=no/lib -L/usr/local/bind/lib 
> -Wl,--rpath=/usr/local/bind/lib conftest.c -lbind   >&5      
> /tmp/cc4kdZ6l.o: In function 
> `main':
> 
> /usr/src/redhat/BUILD/milter-greylist-2.1.12/conftest.c:21: undefined
> reference to `res_init'                     
> collect2: ld returned 1 exit

Can you upload your libbind.a somewhere I can have a look at it?

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

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by Sysadmin

Tere.
>
> Can you upload your libbind.a somewhere I can have a look at it?
>
>   
Sure, please get it from -  
http://www.e-positive.ee/usr_local_bind_lib.tar.gz, it includes 
libbind.a and libbind9.a, don't know about the libbind9.a, why it is there.

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-05 by manu@netbsd.org

Ok, I think I get it. Here is a patch to configure.ac (don't forget to
run autoconf). I hope things will be alright with it.

Index: configure.ac
===================================================================
RCS file: /cvsroot/milter-greylist/configure.ac,v
retrieving revision 1.179
diff -r1.179 configure.ac
57c57
<           AC_CHECK_LIB([bind], [res_init], [LIBS="-lbind $LIBS"])
---
>           LIBS="-lbind $LIBS"

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

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-06 by Sysadmin

Tere.
> Ok, I think I get it. Here is a patch to configure.ac (don't forget to
> run autoconf). I hope things will be alright with it.
>
> Index: configure.ac
> ===================================================================
> RCS file: /cvsroot/milter-greylist/configure.ac,v
> retrieving revision 1.179
> diff -r1.179 configure.ac
> 57c57
> <           AC_CHECK_LIB([bind], [res_init], [LIBS="-lbind $LIBS"])
> ---
>   
>>           LIBS="-lbind $LIBS"
>>     
>
>   
Great, thank You, thank You, thank You,  finally I managed to compile 
the latest milter-greylist with --enable-dnsrbl. Now, the next step is 
learn to use this new feature.


-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-06 by manu@netbsd.org

Sysadmin <sysadmin@...> wrote:

> Great, thank You, thank You, thank You,  finally I managed to compile
> the latest milter-greylist with --enable-dnsrbl. Now, the next step is
> learn to use this new feature.

Excellent. I'll update the docs and make a new release later today.
I wonder if it's time to call it 3.0alpha1, or if it's too early.

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

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-06 by Sysadmin

Tere.
> Excellent. I'll update the docs and make a new release later today.
Btw, noticed now in logs new things:

milter-greylist: k76CtSt9004267: addr 
41-78.125-70.tampabay.res.rr.com[70.125.78.41] from 
<llya@...> to <xx@yy> delayed for 11:54:57 (ACL 83)

What is this ACL 83, it isn't the greylist.db -s line number, as I found 
in on the line 574:

70.125.78.41    <llya@...>    <xx@yy>       1154911826 
# 2006-08-07 03:50:26

> I wonder if it's time to call it 3.0alpha1, or if it's too early.
>   

I personally think, that if not rc1, then at least beta10, as it rocks:).

-- 
Sysadmin

Re: [milter-greylist] "DNS resolver is not thread safe" error

2006-08-06 by manu@netbsd.org

Sysadmin <sysadmin@...> wrote:

> > Excellent. I'll update the docs and make a new release later today.
> Btw, noticed now in logs new things:
> 
> milter-greylist: k76CtSt9004267: addr 
> 41-78.125-70.tampabay.res.rr.com[70.125.78.41] from 
> <llya@...> to <xx@yy> delayed for 11:54:57 (ACL 83)
> 
> What is this ACL 83, 

It's the ACL at line 83 of the config file. I added this to easily spot
what is going on: you know it has been greylisted, and this ACL 83 tells
you what caused that in your config.

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

milter-greylist 3.0 alpha1 is out

2006-08-06 by manu@netbsd.org

What about giving a try to milter-greylist 3.0 alpha1?

http://ftp.espci.fr/pub/milter-greylist/milter-greylist-3.0a1.tgz
MD5 (milter-greylist-3.0a1.tgz) = f8fb01d4f9a8903d73801b826fbefbc9

Here are the feature additions since 2.0.2:
- per-ACL greylist and whitelist delays
- DNSRBL support in ACL statements
- list of alternative match for ACL clauses
- blacklist feature
- per-ACL SMTP error code and messages
- DRAC support (Romain Kang)
- Bucketed in-memory databases for better concurency (Ranko Zivojnovic)
- Option to disable human-readable date in dump (Ranko Zivojnovic)
- Selectable MX sync source address (Guido Kerkewitz)
- Option to log expired entries (Jeff Rife)
- Faster ACL code (Attila Bruncsak)
- flushaddr flag for ACL statements, which flush an IP from the database
- Multi-line statements in the config file

And many bugfixes, due to your favourite milter-greylist hackers: 
Attila Bruncsak, Romain Kang, Guido Kerkewitz, Hajimu UMEMOTO, Alexander
Lobodzinski, Fredrik Pettai, Alexey Popov, Jeff Rife, and Ranko
Zivojnovic. (if you contributed something since 2.0.2 and are not in
this list, please complain now so that I have an opportunity to tell
about your contribution in the upcoming 3.0 announcement)
 
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

ACL vs normal rules.

2006-08-07 by Mart Pirita

Tere.


Once I asked:
>>
>> milter-greylist: k76CtSt9004267: addr 
>> 41-78.125-70.tampabay.res.rr.com[70.125.78.41] from 
>> <llya@...> to <xx@yy> delayed for 11:54:57 (ACL 83)
>>
>> What is this ACL 83,     
>>     

And Emmanuel expained:
>> It's the ACL at line 83 of the config file. I added this to easily spot
>> what is going on: you know it has been greylisted, and this ACL 83 tells
>> you what caused that in your config.
>>
>>   

In conf I have:

dnsrbl "SORBS DUN" dnsbl.sorbs.net 
127.0.0.10                                                                      

acl greylist dnsrbl "SORBS DUN" delay 12h  #line 83 
                                                                     
acl greylist default delay 15m  #line 84
greylist 15m #line 139

So with this conf do I need the line 139 at all?

-- 
Mart

Re: [milter-greylist] ACL vs normal rules.

2006-08-07 by Emmanuel Dreyfus

On Mon, Aug 07, 2006 at 12:18:10PM +0300, Mart Pirita wrote:
> In conf I have:
> 
> dnsrbl "SORBS DUN" dnsbl.sorbs.net 
> 127.0.0.10                                                                      
> 
> acl greylist dnsrbl "SORBS DUN" delay 12h  #line 83 
>                                                                      
> acl greylist default delay 15m  #line 84
> greylist 15m #line 139
> 
> So with this conf do I need the line 139 at all?

No, you don't need it. 

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] ACL vs normal rules.

2006-08-07 by Mart Pirita

Tere.
>
> No, you don't need it. 
>
>   
Ok, but if I disable the line 83:

#dnsrbl "SORBS DUN" dnsbl.sorbs.net 
127.0.0.10                                                                      

#acl greylist dnsrbl "SORBS DUN" delay 12h  #line 83 
                                                                   
acl greylist default delay 15m  #line 84
greylist 15m #line 139

Is the line 84 now still active? If yes, then I should replace the line 
139 with the line 84? If yes, then probably You should make 
milter-greylist-sample.conf which also includes in right order the new 
stuff from greylist3.conf as it's now little bit confusing.

-- 
Mart

Re: [milter-greylist] ACL vs normal rules.

2006-08-07 by Emmanuel Dreyfus

On Mon, Aug 07, 2006 at 01:01:33PM +0300, Mart Pirita wrote:
> #acl greylist dnsrbl "SORBS DUN" delay 12h  #line 83 
>                                                                    
> acl greylist default delay 15m  #line 84
> greylist 15m #line 139
> 
> Is the line 84 now still active?

Yes.

> If yes, then I should replace the line 
> 139 with the line 84? If yes, then probably You should make 
> milter-greylist-sample.conf which also includes in right order the new 
> stuff from greylist3.conf as it's now little bit confusing.

delays sets in ACL override the global setting. If you have a delay
in a defaul ACL, then you don't need to specify the global setting, 
as it will never be used.

-- 
Emmanuel Dreyfus
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.