Yahoo Groups archive

Milter-greylist

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

Thread

Experimental p0f support in CVS

Experimental p0f support in CVS

2008-09-06 by manu@netbsd.org

Hello everybody

I added experimental p0f suport in CVS version.

To enable it, configure --enable-p0f
In your configuration file, you need something like this:

p0fsock "/var/run/p0f.sock"
racl greylist p0f /Windows/ delay 12h
racl greylist default delay 15m

p0f clauses accept quoted string (case insensitive substring match),
regex, and you can make lists of it. 

This has not been tested, so experiment at your own risk. Feedback is
welcome.

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

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by Greg Troxel

I added experimental p0f suport in CVS version.

To enable it, configure --enable-p0f
In your configuration file, you need something like this:

p0fsock "/var/run/p0f.sock"
racl greylist p0f /Windows/ delay 12h
racl greylist default delay 15m

p0f clauses accept quoted string (case insensitive substring match),
regex, and you can make lists of it.

This has not been tested, so experiment at your own risk. Feedback is
welcome.

Thanks very much for writing this.

Can you add a README.p0f with suggested invocations of p0f, and a few more rules?

I have built this, and see p0f symbols in my binary, but it's choking on
the example you posted.

I tried your example, but it failed with complaints about / and I then did

p0fsock "/var/run/p0f.sock"
racl greylist p0f "Windows" delay 600m autowhite 2400m

and now milter-greylist seems to be exiting silently.

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by Greg Troxel

I tried to build milter-greylist from CVS for the first time, and had
one minor problem.

I used the following script to pick up prereqs from pkgsrc, and to
overwrite my pkgsrc installation:

#!/bin/sh

CPPFLAGS=-I/usr/pkg/include \
LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" \
./configure \
--prefix=/usr/pkg \
--enable-dnsryesbl \
--enable-p0f

This caused build failures, because the makefile didn't respect
CPPFLAGS, and the following diff makes it work.

It seems odd to have Makfile checked in, given the configure creates it,
and I would also suggest not checking in configure, and adding an
autogen.sh script to run autoconf.

Index: Makefile.in
===================================================================
RCS file: /milter-greylist/milter-greylist/Makefile.in,v
retrieving revision 1.62
diff -u -p -r1.62 Makefile.in
--- Makefile.in 7 Sep 2008 00:13:34 -0000 1.62
+++ Makefile.in 6 Sep 2008 18:00:06 -0000
@@ -29,7 +29,7 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
#

-CFLAGS= @CFLAGS@ -D_BSD_SOURCE -I${SRCDIR} -I.
+CFLAGS= @CFLAGS@ -D_BSD_SOURCE -I${SRCDIR} -I. @CPPFLAGS@
LDFLAGS= @LDFLAGS@
LIBS= @LIBS@
prefix= @prefix@
@@ -129,7 +129,7 @@ install-db:
install: install-daemon-to-bin install-man install-conf install-db

depend:
- ${MKDEP} ${CFLAGS} ${SRC}
+ ${MKDEP} ${CPPFLAGS} ${CFLAGS} ${SRC}

clean:
${RM} -f milter-greylist ${OBJ} ${GENSRC} \

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by Greg Troxel

Here is what happens when I add in these two lines. Before adding those
lines, milter-greylist from cvs behaves at least close to how 4.0 was
running.

p0fsock "/var/run/p0f.sock"
racl greylist p0f "Windows" delay 600m autowhite 2400m

Sep 6 14:07:52 fnord milter-greylist: reloading config file "/etc/mail/greylist.conf"
Sep 6 14:07:52 fnord milter-greylist: reloaded config file "/etc/mail/greylist.conf" in 0.001726s
Sep 6 14:08:02 fnord postfix/smtpd[29532]: warning: milter unix:/var/milter-greylist/milter-greylist.sock: can't read SMFIC_RCPT reply packet header: Undefined error: 0

I will see about gdb when I have some spare time.

Host OS is NetBSD/i386 4_STABLE.

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by manu@netbsd.org

Greg Troxel <gdt@...> wrote:

> It seems odd to have Makfile checked in, given the configure creates it,
> and I would also suggest not checking in configure, and adding an
> autogen.sh script to run autoconf.

The idea is that if configure tries to ruin your day, you can just tweak
the Makefile.

I checked in your change.

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

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by manu@netbsd.org

Greg Troxel <gdt@...> wrote:

> I tried your example, but it failed with complaints about / and I then did

Heh, I told you it has not been tested. I just know it builds... Now
contributors can help finishing the thing.
 
>   p0fsock "/var/run/p0f.sock"
>   racl greylist p0f "Windows" delay 600m autowhite 2400m
> 
> and now milter-greylist seems to be exiting silently.

Does it tell moe when running with -Dv ?

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

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by Greg Troxel

The idea is that if configure tries to ruin your day, you can just tweak
the Makefile.

Sure, but it also means that 'cvs diff' is noisy because checked-in
files get changed as part of a normal build. I view making autoconf
work on a project that uses it as non-optional, but the checked-in
generated files are not actually causing me significant grief.

I checked in your change.

Thanks.

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-06 by manu@netbsd.org

Greg Troxel <gdt@...> wrote:

> Sure, but it also means that 'cvs diff' is noisy because checked-in
> files get changed as part of a normal build.  I view making autoconf
> work on a project that uses it as non-optional, but the checked-in
> generated files are not actually causing me significant grief.

Well, unless you play with CVS version or you are hacking
milter-greylist, you should not have to bother with autoconf: the
configure script should work.

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

Re: [milter-greylist] Experimental p0f support in CVS

2008-09-07 by manu@netbsd.org

Greg Troxel <gdt@...> wrote:

> I will see about gdb when I have some spare time.

I fixed two problems in CVS, but I always get p0f cache misses. It does
not crash anymore, thought. What about at yours?

I also have the mutex thign at exit, but it seems harmless.

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