Yahoo Groups archive

Milter-greylist

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

Thread

greylist breaking smf-sav ??

greylist breaking smf-sav ??

2007-03-08 by Raul Dias

Hi,

I just packaged smf-sav, then I read this in the readme:

------------------8<----------------
If you are using the milter-greylist milter, please, bear in mind that
it has an incorrect proposition about the Sendmail macroses
configuration. This one can break the smf-sav milter functionality.
--------------------->8-------------

So, I halted the instalation for now.

Can someone please, elaborate what the problem really is? 
Or if there really is a problem?
Does anyone here uses this milter (smf-sav)?


Thanks,

Raul Dias

again: patch for whitelisting with access.db

2007-03-08 by Georg Horn

I just downloaded the current development release, 3.1.6, and saw that
my patch for whitelisting with access.db didnt make it into it. In my
original posting when i announced the patch i forgot to actually
attach it and posted it in a second mail, but this seems to have been
overlooked. So here it conmes again:

Bye,
Georg

--cut---
diff -r -u milter-greylist-3.0.org/README milter-greylist-3.0/README
--- milter-greylist-3.0.org/README	2006-10-06 11:14:39.000000000 +0200
+++ milter-greylist-3.0/README	2007-02-28 16:05:31.000000000 +0100
@@ -105,6 +105,15 @@
 when the {greylist} macro is defined and set as WHITE.
 O Milter.macros.envrcpt={greylist}
 
+When using access DB as a whitelisting source, you will also need some
+rules for the ruleset "Local_check_rcpt" which assign a value to the
+macro {greylist}.
+Kstorage macro
+SLocal_check_rcpt
+R$+		$: $(storage {greylist} $) $&{client_addr}
+R$+		$: $>A <$1> <?> <+Connect> <$1>
+R<$+> <$*>	$: $(storage {greylist} $@ $1 $) $2
+
 Alternatively, you can use the following m4 macro definitions 
 if you build sendmail.cf with m4 (contributed by Hubert Ulliac).
 Here again, confMILTER_MACROS_* are shared with other milters,
@@ -124,6 +133,18 @@
 milter-greylist instead of overwriting what has already been done. This 
 should simplify an automatic generation of sendmail.cf.
 
+To add the rules for defining the {greylist} macro via m4, add the following
+lines to your m4 input file:
+
+LOCAL_CONFIG
+Kstorage macro
+LOCAL_RULESETS
+SLocal_check_rcpt
+R$+		$: $(storage {greylist} $) $&{client_addr}
+R$+		$: $>A <$1> <?> <+Connect> <$1>
+R<$+> <$*>	$: $(storage {greylist} $@ $1 $) $2
+
+Note that there must be tabs and no spaces before the "$:"!
 
 
  3 Configuring milter-greylist 
diff -r -u milter-greylist-3.0.org/milter-greylist.c milter-greylist-3.0/milter-greylist.c
--- milter-greylist-3.0.org/milter-greylist.c	2007-02-28 12:24:35.000000000 +0100
+++ milter-greylist-3.0/milter-greylist.c	2007-02-28 15:52:23.000000000 +0100
@@ -348,11 +348,13 @@
 
 	 /*
 	  * If sendmail rules have defined a ${greylist} macro
-	  * with value WHITE, then it is whitelisted
+	  * with value WHITE (or RELAY or OK), then it is whitelisted
 	  */
 	if ((conf.c_noaccessdb == 0) &&
 	    ((greylist = smfi_getsymval(ctx, "{greylist}")) != NULL) &&
-	    (strcmp(greylist, "WHITE") == 0)) {
+	    ((strcmp(greylist, "WHITE") == 0) ||
+	    (strcmp(greylist, "RELAY") == 0) ||
+	    (strcmp(greylist, "OK") == 0))) {
 		mg_log(LOG_DEBUG, 
 		    "whitelisted by {greylist}");
 		priv->priv_elapsed = 0;
--cut---

Re: [milter-greylist] greylist breaking smf-sav ??

2007-03-08 by Emmanuel Dreyfus

On Thu, Mar 08, 2007 at 10:41:01AM -0300, Raul Dias wrote:
> Can someone please, elaborate what the problem really is? 

It's explained in the README:

> You need a few options in sendmail.cf to use milter-greylist:
> 
> O InputMailFilters=greylist
> Xgreylist, S=local:/var/milter-greylist/milter-greylist.sock
> O Milter.macros.connect=j,{if_addr}
> O Milter.macros.envfrom=i
>  
> Note that InputMailFilters and Milter.macros.* options are shared
> with other milters, and the other milters you have set up may
> require additionnal macros. Therefore you need to merge what
> milter-greylist needs with what other milters need. If you just
> copy the lines proposed in this file, this is likely to break
> other milters setup. In this section we simply list the macros
> milter-greylist require. Your default sendmail.cf is likely to already
> contain the proper Milter.macros.* setup.

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] again: patch for whitelisting with access.db

2007-03-08 by Phil Randal

Georg Horn wrote:
> I just downloaded the current development release, 3.1.6, and saw that
> my patch for whitelisting with access.db didnt make it into it. In my
> original posting when i announced the patch i forgot to actually
> attach it and posted it in a second mail, but this seems to have been
> overlooked. So here it conmes again:
> 
> Bye,
> Georg
> 
> --cut---
> diff -r -u milter-greylist-3.0.org/README milter-greylist-3.0/README
> --- milter-greylist-3.0.org/README	2006-10-06 11:14:39.000000000 +0200
> +++ milter-greylist-3.0/README	2007-02-28 16:05:31.000000000 +0100
> @@ -105,6 +105,15 @@
>  when the {greylist} macro is defined and set as WHITE.
>  O Milter.macros.envrcpt={greylist}
>  
> +When using access DB as a whitelisting source, you will also need some
> +rules for the ruleset "Local_check_rcpt" which assign a value to the
> +macro {greylist}.
> +Kstorage macro
> +SLocal_check_rcpt
> +R$+		$: $(storage {greylist} $) $&{client_addr}
> +R$+		$: $>A <$1> <?> <+Connect> <$1>
> +R<$+> <$*>	$: $(storage {greylist} $@ $1 $) $2
> +
>  Alternatively, you can use the following m4 macro definitions 
>  if you build sendmail.cf with m4 (contributed by Hubert Ulliac).
>  Here again, confMILTER_MACROS_* are shared with other milters,
> @@ -124,6 +133,18 @@
>  milter-greylist instead of overwriting what has already been done. This 
>  should simplify an automatic generation of sendmail.cf.
>  
> +To add the rules for defining the {greylist} macro via m4, add the following
> +lines to your m4 input file:
> +
> +LOCAL_CONFIG
> +Kstorage macro
> +LOCAL_RULESETS
> +SLocal_check_rcpt
> +R$+		$: $(storage {greylist} $) $&{client_addr}
> +R$+		$: $>A <$1> <?> <+Connect> <$1>
> +R<$+> <$*>	$: $(storage {greylist} $@ $1 $) $2
> +
> +Note that there must be tabs and no spaces before the "$:"!

Is there any good reason why that can't be included as a patch against 
milter-greylist.m4?

That way it would just work "out of the box".

Cheers,

Phil

Re: [milter-greylist] again: patch for whitelisting with access.db

2007-03-08 by manu@netbsd.org

Georg Horn <horn@...> wrote:

> I just downloaded the current development release, 3.1.6, and saw that
> my patch for whitelisting with access.db didnt make it into it. In my
> original posting when i announced the patch i forgot to actually
> attach it and posted it in a second mail, but this seems to have been
> overlooked. So here it conmes again:

I got it.

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

Re: [milter-greylist] again: patch for whitelisting with access.db

2007-03-08 by manu@netbsd.org

Phil Randal <phil@...> wrote:

> Is there any good reason why that can't be included as a patch against
> milter-greylist.m4?

It seems you just volunteered for providing a patch for taht :-)

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

Re: [milter-greylist] greylist breaking smf-sav ??

2007-03-09 by Jack Olszewski

On Thu, 08 Mar 2007 10:41:01 -0300
Raul Dias <raul@...> wrote:

RD> 
RD> Hi,
RD> 
RD> I just packaged smf-sav, then I read this in the readme:
RD> 
RD> ------------------8<----------------
RD> If you are using the milter-greylist milter, please, bear in mind that
RD> it has an incorrect proposition about the Sendmail macroses
RD> configuration. This one can break the smf-sav milter functionality.
RD> --------------------->8-------------
RD> 
RD> So, I halted the instalation for now.
RD> 
RD> Can someone please, elaborate what the problem really is? 
RD> Or if there really is a problem?
RD> Does anyone here uses this milter (smf-sav)?
RD> 

Yes, smf-sav has been in use here on fc6:

sendmail-8.13.8-2.i386.rpm
milter-greylist-2.1.12-3.fc6.i386.rpm

with no apparent problems.

I've been worried a little by another statement in smf-sav readme:

---------------------8<---------------
IMPORTANT: make sure that libmilter is compiled with
BROKEN_PTHREAD_SLEEP defined. If this symbol is not defined, libmilter
will use sleep() in signal-handler thread, which may cause various
program misbehaviors, including coredumps.
--------------------->8---------------

but it seems to work with the standard sendmail binary for fc6.i386.
 
--
Jack

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.