Yahoo Groups archive

Milter-greylist

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

Thread

milter-greylist 3.0 alpha3 is out

milter-greylist 3.0 alpha3 is out

2006-08-28 by manu@netbsd.org

Here is the alpha3 of milter-greylist 3.0

http://ftp.espci.fr/pub/milter-greylist/milter-greylist-3.0a3.tgz
MD5 (milter-greylist-3.0a3.tgz) = 6456ffff0966dd251c878c65c70c7343

There is a major feature added here: you can now use any Sendmail macro
in access lists. Here is an example to have a custom delay for hosts
that do not have a correct reverse DNS:

        sm_macro "maybe_forged" "{client_resolve}" "FORGED"

        acl greylist sm_macro "maybe_forged" delay 1h
        acl greylist default 15m

I also make a large change on syslog and printf debugs to make sure no
output message can be missed. That may need some testing.

From the Changelog:
3.0a3
        Fix --disable-drac and --disable-dnsrbl (Fabien Tassin)
        Add support to use Sendmail macros in the ACL
        Remove the need of LOG_PERROR, make sure no log is missed
        Make sure -c tells what happens and return an usable exit code

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

Re: [milter-greylist] milter-greylist 3.0 alpha3 is out

2006-08-28 by Hajimu UMEMOTO

Hi,

>>>>> On Mon, 28 Aug 2006 09:43:55 +0200
>>>>> manu@... said:

manu> Here is the alpha3 of milter-greylist 3.0

It seems there are two problems:

- Since sin_addr and sin6_addr has different offset in struct
  sockaddr, we cannot just use sa_data.

- There is an environment where struct sockaddr_storage is not
  provided.

Here is a patch:

Index: dnsrbl.c
diff -u -p dnsrbl.c.orig dnsrbl.c
--- dnsrbl.c.orig	Mon Aug 28 05:54:41 2006
+++ dnsrbl.c	Mon Aug 28 18:57:26 2006
@@ -102,7 +102,7 @@ dnsrbl_check_source(sa, salen, source)
 #ifdef HAVE_RESN
 	struct __res_state res;
 #endif
-	struct sockaddr_storage ss;
+	sockaddr_t ss;
 	char req[NS_MAXDNAME + 1];
 	char ans[NS_MAXMSG + 1];
 	int anslen;
@@ -291,10 +291,12 @@ dnsrbl_source_add(name, domain, blacklis
 	LIST_INSERT_HEAD(&dnsrbl_head, de, d_list);
 
 	if (conf.c_debug || conf.c_acldebug) {
-		struct sockaddr *sa = (struct sockaddr *)&de->d_blacklisted;
-
-		inet_ntop(sa->sa_family, sa->sa_data,
-		    addrstr, sizeof(addrstr)); 
+		if ((iptostring(SA(&de->d_blacklisted), salen, addrstr,
+		    sizeof(addrstr))) == NULL) {
+			mg_log(LOG_ERR, "iptostring failed: %s",
+			    strerror(errno));
+			exit(EX_SOFTWARE);
+		}
 		mg_log(LOG_DEBUG, "load DNSRBL \"%s\" \"%s\" %s", 
 		    de->d_name, de->d_domain, addrstr);
 	}
Index: dnsrbl.h
diff -u dnsrbl.h.orig dnsrbl.h
--- dnsrbl.h.orig	Sat Jul 29 00:41:51 2006
+++ dnsrbl.h	Mon Aug 28 18:56:18 2006
@@ -40,7 +40,7 @@
 struct dnsrbl_entry {
 	char d_name[QSTRLEN + 1];
 	char d_domain[NS_MAXDNAME + 1];
-	struct sockaddr_storage d_blacklisted;
+	sockaddr_t d_blacklisted;
 	LIST_ENTRY(dnsrbl_entry) d_list;
 };
 

Sincerely,

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

Re: [milter-greylist] milter-greylist 3.0 alpha3 is out

2006-08-28 by manu@netbsd.org

Hajimu UMEMOTO <ume@...> wrote:

> It seems there are two problems:
> 
> - Since sin_addr and sin6_addr has different offset in struct
>   sockaddr, we cannot just use sa_data.
> 
> - There is an environment where struct sockaddr_storage is not
>   provided.
> 
> Here is a patch:

I'll make an alpha 4 with this patch integrated later this afternoon.

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

milter-greylist 3.0 alpha4 is out

2006-08-28 by manu@netbsd.org

Hajimu UMEMOTO <ume@...> wrote:

[3.0 alpha3]
> It seems there are two problems:
> 
> - Since sin_addr and sin6_addr has different offset in struct
>   sockaddr, we cannot just use sa_data.
> 
> - There is an environment where struct sockaddr_storage is not
>   provided.

And here is 3.0 alpha4 with your fixes included:

http://ftp.espci.fr/pub/milter-greylist/milter-greylist-3.0a4.tgz
MD5 (milter-greylist-3.0a4.tgz) = 7392258c2a75c6aaa2c6bd3d585ac301

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

missing vsyslog

2006-08-28 by attila.bruncsak@itu.int

> And here is 3.0 alpha4 with your fixes included:
> 
> http://ftp.espci.fr/pub/milter-greylist/milter-greylist-3.0a4.tgz
> MD5 (milter-greylist-3.0a4.tgz) = 7392258c2a75c6aaa2c6bd3d585ac301

Zut.

I do not have vsyslog() in Tru64 UNIX.

With the attached patch it is at least compiling fine if
CFLAGS="-DNO_VSYSLOG" is there on the configure command line.

Bests,
Attila

Re: [milter-greylist] missing vsyslog

2006-08-28 by manu@netbsd.org

<attila.bruncsak@...> wrote:

> Zut.
> 
> I do not have vsyslog() in Tru64 UNIX.
> 
> With the attached patch it is at least compiling fine if
> CFLAGS="-DNO_VSYSLOG" is there on the configure command line.

Right, I'll add the configure test for vsyslog.

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

Re: [milter-greylist] missing vsyslog

2006-08-28 by manu@netbsd.org

<attila.bruncsak@...> wrote:

> With the attached patch it is at least compiling fine if
> CFLAGS="-DNO_VSYSLOG" is there on the configure command line.

FWIW, it's esay to check for a function: you can get HAVE_VSYSLOG
defined or not in config.h by just adding vsyslog to AC_CHECK_FUNCS() in
configure.ac

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
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.