Yahoo Groups archive

Milter-greylist

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

Thread

new features in CVS

new features in CVS

2007-01-02 by manu@netbsd.org

Hi

A few new features in the CVS version, that will be in upcoming 3.1.4

1) When using URL checks in ACL, you can now send arbitrary sendmail
macros. Here is an example syntax:

urlcheck "http://www.example.net/filter.php?r=%r+d=%M{daemon_name}" 5

And %M{daemon_name} will be substituted by {daemon_name} value.


2) Custom logs. It's now possible to monitor milter-greylist activity
with a custom log format. You can choose where the output is sent (file
or external command), and the output format. If you have this in
greylist.conf:
stat ">>/var/log/milter-greylist.log" "%T{%T}    %i:%s:%f:%S\n"

On each mail, this will give you a line like this in
milter-greylist.log:
10:08:04    192.0.2.16:spammer@...:postmaster@...:reject

Another example, to send the data to the local7 facility of syslog,
using the external command logger:
stat "|logger -p local7.info" "%i:%s:%f:%S\n" 

Substitutions are the sames as in URL checks (%i becomes sender IP, %s
becomes sender e-mail, %r becomes recipient, and so on). A few nifty
additions:

%T{format} is substituted by strftime(3) time format. So %T{%F %T} gives
you a date/time in the following format: YYYY-MM-DD HH:MM:SS 
%S is substituted by the action milter-greylist chose: accept, tempfail
or reject
%A is substituted by the line number of the ACL that caused the decision

I implemented that to make statistic gathering easier. I hope it will
fullfil everybody's needs. Feel free to ask if you need another
substitution, that should not be very difficult to add.

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

Re: [milter-greylist] new features in CVS

2007-01-03 by Nerijus Baliunas

Hello,

I get compile error with current cvs:
gcc -g -O2 -Wall -D_XOPEN_SOURCE=500 -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
milter-greylist.c: In function `fstring_expand':
milter-greylist.c:2003: error: `URLMAXLEN' undeclared (first use in this function)

It's because urlcheck.h is included only #ifdef USE_CURL.

Regards,
Nerijus

Re: [milter-greylist] new features in CVS

2007-01-03 by manu@netbsd.org

Nerijus Baliunas <nerijus@...> wrote:

> I get compile error with current cvs:
> gcc -g -O2 -Wall -D_XOPEN_SOURCE=500 -D_BSD_SOURCE   -c -o
> milter-greylist.o milter-greylist.c
> milter-greylist.c: In function `fstring_expand':
> milter-greylist.c:2003: error: `URLMAXLEN' undeclared (first use in this
> function)
> 
> It's because urlcheck.h is included only #ifdef USE_CURL.

I just fixed it, thank you for the report.

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

new features in CVS

2007-01-28 by manu@netbsd.org

A few additionnal features in CVS

- ACL clauses can now be negated:
racl greylist not rcpt foo@...

- You can now override the X-Greylist header by a per-ACL value:
racl whitelist dnsrbl "foo" report "whitelisted, sender is in foo DNSRBL"

- Format strings can be used in msg and report clauses:
racl blacklist dnsrbl "foo" msg "%d [%i] caught in DNSRBL foo"

See FORMAT STRINGS in greylist.conf(5) for the complete list of available
substitutions.

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