Yahoo Groups archive

Milter-greylist

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

Thread

GeoIP failed to lookup ip 'PRIVATE_IP'

GeoIP failed to lookup ip 'PRIVATE_IP'

2012-05-27 by Frantisek Hanzlik

Hello milter-greylist gurus,

not sure where I do mistake or how correctly solve this issue.
My /var/log/maillog logs is filled with lines as:
"milter-greylist: GeoIP failed to lookup ip '192.168.1.123'"
messages for outgoing mails.
My LAN is 192.168.1.0/24, milter-greylist-4.2.7-1600.fc16.i686 (from
Fedora 16 i686 distro, with GeoIP support) with sendmail-8.14.5.

Relevant part of my "/etc/mail/greylist.conf" is:

...
list "my network" addr { 127.0.0.1/8 192.168.1.0/24 }
list "broken mta" addr {   \
        12.5.136.141/32    \ # Southwest Airlines (unique sender)
	...
        217.158.50.178/32  \ # AXKit mailing list (unique sender)
}
list "okgeoip" geoip { "CZ" "SK" }
list "maillisty" from { /@.*kernel\.org/ /@.*fedoraproject\.org/ }
...
racl whitelist list "my network"
racl whitelist list "broken mta"
racl whitelist list "maillisty"
racl whitelist spf pass
racl greylist not list "okgeoip"
...
racl whitelist default
...

Same result I will get when if instead of
"racl whitelist list "my network"" I specify

racl whitelist addr 127.0.0.1/8
racl whitelist addr 192.168.1.0/24

With 'Milter.LogLevel=22' maillog shows:
...
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: Milter (greylist): init success to negotiate
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: Milter: connect to filters
May 27 00:00:05 ns milter-greylist: GeoIP failed to lookup ip '192.168.1.223'
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: milter=greylist, action=connect, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: milter=greylist, action=helo, continue
May 27 00:00:05 ns sendmail[1234]: STARTTLS=server, relay=ws223.hanzlici.cz [192.168.1.223], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=helo, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter: sender: <apache@...>
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=mail, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter: rcpts: <sysreport@...>
May 27 00:00:05 ns milter-greylist: q4QM05J6001234: skipping greylist because address 192.168.1.223 is whitelisted, (from=<apache@...>, rcpt=<sysreport@...>,
addr=ws223.hanzlici.cz[192.168.1.223]) ACL 173
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=rcpt, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: from=<apache@...>, size=1095, class=0, nrcpts=1, msgid=<201205262200.q4QM02f6022246@...>, proto=ESMTP,
daemon=MTA, relay=ws223.hanzlici.cz [192.168.1.223]
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): headers, send
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): headers, sent
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=eoh, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): body, send
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist, action=body, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): body, sent
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter add: header: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (hanzlici.cz [90.179.170.17]);
Sun, 27 May 2012 00:00:05 +0200 (CEST)
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter accept: message
May 27 00:00:05 ns sendmail[1234]: q4QM05J7001234: Milter (greylist): quit filter
May 27 00:00:05 ns sendmail[1239]: q4QM05J6001234: to=<sysreport@...>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31489, dsn=2.0.0, stat=Sent
...

Should milter-greylist search in GeoIP DB for local addresses, when
there is earlier access-list entry "racl whitelist list "my network""
(or "racl whitelist addr 192.168.1.0/24") which match for these local
private addresses?
Or I must add my local private addresses to GeoIP database (with some
of my allowed country code)?
Or I did any mistake which I not see?

Thanks in advance, Franta Hanzlik

GeoIP failed to lookup ip 'PRIVATE_IP'

2012-06-13 by Frantisek Hanzlik

Hello milter-greylist gurus,

not sure where I do mistake or how correctly solve this issue.
My /var/log/maillog logs is filled with lines as:
"milter-greylist: GeoIP failed to lookup ip '192.168.1.123'"
messages for outgoing mails.
My LAN is 192.168.1.0/24, milter-greylist-4.2.7-1600.fc16.i686 (from
Fedora 16 i686 distro, with GeoIP support) with sendmail-8.14.5.

Relevant part of my "/etc/mail/greylist.conf" is:

...
list "my network" addr { 127.0.0.1/8 192.168.1.0/24 }
list "broken mta" addr {   \
        12.5.136.141/32    \ # Southwest Airlines (unique sender)
	...
        217.158.50.178/32  \ # AXKit mailing list (unique sender)
}
list "okgeoip" geoip { "CZ" "SK" }
list "maillisty" from { /@.*kernel\.org/ /@.*fedoraproject\.org/ }
...
racl whitelist list "my network"
racl whitelist list "broken mta"
racl whitelist list "maillisty"
racl whitelist spf pass
racl greylist not list "okgeoip"
...
racl whitelist default
...

Same result I will get when if instead of
"racl whitelist list "my network"" I specify

racl whitelist addr 127.0.0.1/8
racl whitelist addr 192.168.1.0/24

With 'Milter.LogLevel=22' maillog shows:
...
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: Milter (greylist): init
success to negotiate
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: Milter: connect to filters
May 27 00:00:05 ns milter-greylist: GeoIP failed to lookup ip '192.168.1.223'
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: milter=greylist,
action=connect, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J5001234: milter=greylist,
action=helo, continue
May 27 00:00:05 ns sendmail[1234]: STARTTLS=server, relay=ws223.hanzlici.cz
[192.168.1.223], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA,
bits=256/256
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=helo, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter: sender:
<apache@...>
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=mail, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter: rcpts:
<sysreport@...>
May 27 00:00:05 ns milter-greylist: q4QM05J6001234: skipping greylist
because address 192.168.1.223 is whitelisted, (from=<apache@...>,
rcpt=<sysreport@...>,
addr=ws223.hanzlici.cz[192.168.1.223]) ACL 173
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=rcpt, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: from=<apache@...>,
size=1095, class=0, nrcpts=1,
msgid=<201205262200.q4QM02f6022246@...>, proto=ESMTP,
daemon=MTA, relay=ws223.hanzlici.cz [192.168.1.223]
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist):
headers, send
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=header, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist):
headers, sent
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=eoh, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): body,
send
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: milter=greylist,
action=body, continue
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter (greylist): body,
sent
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter add: header:
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7
(hanzlici.cz [90.179.170.17]);
Sun, 27 May 2012 00:00:05 +0200 (CEST)
May 27 00:00:05 ns sendmail[1234]: q4QM05J6001234: Milter accept: message
May 27 00:00:05 ns sendmail[1234]: q4QM05J7001234: Milter (greylist): quit
filter
May 27 00:00:05 ns sendmail[1239]: q4QM05J6001234:
to=<sysreport@...>, delay=00:00:00, xdelay=00:00:00, mailer=local,
pri=31489, dsn=2.0.0, stat=Sent
...

Should milter-greylist search in GeoIP DB for local addresses, when
there is earlier access-list entry "racl whitelist list "my network""
(or "racl whitelist addr 192.168.1.0/24") which match for these local
private addresses? IMO this is solved at CONNECT phase in both cases
("racl XX addr" and "racl XX geoip").
Or I must add my local private addresses to GeoIP database (with some
of my allowed country code)?
Or I did any mistake which I not see?

Thanks in advance, Franta Hanzlik

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2012-06-14 by manu@netbsd.org

Frantisek Hanzlik <franta@...> wrote:

> My /var/log/maillog logs is filled with lines as:
> "milter-greylist: GeoIP failed to lookup ip '192.168.1.123'"

A patch that avoids geoIP on special addresses will be welcome.

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-25 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> "milter-greylist: GeoIP failed to lookup ip '192.168.1.123'"
> messages for outgoing mails.

That message is old, but it seems I missed it at the time it was posted.

That message is the a debug message, it does not cause any failure. It
notes the country code was not set, and you will not be able to match it
in an ACL. How is that behavior a problem?

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> I understand that message is only debug or warning, and that private
> IP ranges are not in GeoIP database. But why, when I have config
> file as:
> ...
> list "my network" addr { 127.0.0.1/8 192.168.0.0/22 }
> list "ip friends" geoip { "CZ" "DE" "SK" }
> ...
> racl whitelist list "my network"
> racl greylist not list "ip friends"
> ...
> 
> is this message emitted?

Because the GeoIP data is filled at conntect stage, and the racl are
evaluated at RCPT-stage.

If the problem is just the warning, I guess we could have a quiet_geoip
option for that. And avoid looking up GeoIP for private addresses.

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by Frantisek Hanzlik

manu@... wrote:
> Frantisek Hanzlik franta@... <mailto:franta%40hanzlici.cz>> wrote:
> 
>> I understand that message is only debug or warning, and that private
>> IP ranges are not in GeoIP database. But why, when I have config
>> file as:
>> ...
>> list "my network" addr { 127.0.0.1/8 192.168.0.0/22 }
>> list "ip friends" geoip { "CZ" "DE" "SK" }
>> ...
>> racl whitelist list "my network"
>> racl greylist not list "ip friends"
>> ...
>>
>> is this message emitted?
> 
> Because the GeoIP data is filled at conntect stage, and the racl are
> evaluated at RCPT-stage.
> 
> If the problem is just the warning, I guess we could have a quiet_geoip
> option for that. And avoid looking up GeoIP for private addresses.
> 
> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu@... <mailto:manu%40netbsd.org>

Ouch, that was my RTFM fault, from greylist.conf man page
"DATA-STAGE ACL" paragraph first sentence says it clearly:
"ACL using the racl keyword are evaluated at the RCPT stage..."
Maybe I was affected from similar directive from milter-regex,
where IPs/FQDNs of connected MTAs are evaluated in connect stage.

And yes, problem is only cosmetical, but these warnings fill logs
IMO uselessly. Any of you suggested modifications will be good.

I just remember other cosmetical, but filling logs problem: when I
specify "maxpeek=nn", then when message exceed this size, I got in
log message as:
"DATE pc milter-greylist: ignoring message beyond maxpeek = nn"
but not one line, but many - the longer message, the more lines in
log. When I was trying find some dependency "No. of lines in log" x
"message size", then I got some as

NLines=(MsgLen - Maxpeek) / 64500

Then when I have "maxpeek 99999" and message size is 100kB I have
one ".. milter-greylist: ignoring message beyond maxpeek = 99999"
line in log, but when mail message will be 20MB large, I will get
over 300 these ...message beyond maxpeek... lines! This is slightly
annoying, IMO in log should be (if mail size >maxpeek) only one line.

Thanks for Your work!
Fr. Hanzlik

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> And yes, problem is only cosmetical, but these warnings fill logs
> IMO uselessly. Any of you suggested modifications will be good.

We could do this, which remove the warning and let the user match an invalid
country. Opinions?

Index: geoip.c
===================================================================
RCS file: /cvsroot/milter-greylist/geoip.c,v
retrieving revision 1.4
diff -U 4 -r1.4 geoip.c
--- geoip.c     15 Feb 2010 16:38:03 -0000      1.4
+++ geoip.c     26 Jan 2013 06:08:05 -0000
@@ -138,10 +138,9 @@
        priv->priv_ccode = GeoIP_country_code_by_addr(geoip_handle, ipstr);
        UNLOCK(geoip_lock);
 
        if (priv->priv_ccode == NULL)
-               mg_log(LOG_DEBUG, "GeoIP failed to lookup ip '%s'", ipstr);
-
+               priv->priv_ccode = "ZZ";
 
        return;
 }
 


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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> I just remember other cosmetical, but filling logs problem: when I
> specify "maxpeek=nn", then when message exceed this size, I got in
> log message as:
> "DATE pc milter-greylist: ignoring message beyond maxpeek = nn"
> but not one line, but many - the longer message, the more lines in
> log. 

Would you try this patch? (not tested, I just checked it builds)

Index: milter-greylist.c
===================================================================
RCS file: /cvsroot/milter-greylist/milter-greylist.c,v
retrieving revision 1.253
diff -U 4 -r1.253 milter-greylist.c
--- milter-greylist.c   19 Oct 2012 03:57:39 -0000      1.253
+++ milter-greylist.c   26 Jan 2013 06:21:02 -0000
@@ -823,13 +823,18 @@
 
        len = strlen(name) + strlen(sep) + strlen(value) + strlen(crlf);
        priv->priv_msgcount += len;
 
-       if (priv->priv_msgcount > priv->priv_maxpeek) {
+       if (priv->priv_maxpeek == 0)
+               return SMFIS_CONTINUE;
+
+       if ((priv->priv_msgcount > priv->priv_maxpeek) || 
+           (priv->priv_buflen > priv->priv_maxpeek)) {
                if (conf.c_debug)
                        mg_log(LOG_DEBUG, 
                            "ignoring message beyond maxpeek = %d", 
                            priv->priv_maxpeek);
+               priv->priv_maxpeek = 0;
                return SMFIS_CONTINUE;
        }
 
        if ((l = malloc(sizeof(*l))) == NULL) {
@@ -904,12 +909,16 @@
 
        priv->priv_msgcount += size;
 
        /* Avoid copying the whole message to save CPU */
+       if (priv->priv_maxpeek == 0)
+               return SMFIS_CONTINUE;
+
        if ((priv->priv_msgcount > priv->priv_maxpeek) || 
            (priv->priv_buflen > priv->priv_maxpeek)) {
                mg_log(LOG_DEBUG, "ignoring message beyond maxpeek = %d", 
                    priv->priv_maxpeek);
+               priv->priv_maxpeek = 0;
                return SMFIS_CONTINUE;
        }
 
        /* First time: add \r\n between headers and body */

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by Jim Klimov

On 2013-01-26 07:18, manu@... wrote:
> Frantisek Hanzlik franta@... <mailto:franta%40hanzlici.cz>> wrote:
>
>  > And yes, problem is only cosmetical, but these warnings fill logs
>  > IMO uselessly. Any of you suggested modifications will be good.
>
> We could do this, which remove the warning and let the user match an invalid
> country. Opinions?
>


> if (priv->priv_ccode == NULL)
> - mg_log(LOG_DEBUG, "GeoIP failed to lookup ip '%s'", ipstr);
> -
> + priv->priv_ccode = "ZZ";

I'd say that it is remotely possible that in some future there might be
a state, country or planet coded as ZZ ;) So for such private dummy code
I'd use an a-priori invalid symbol, i.e. "__" with the underscore char
being reserved as a separator for country_locale codes.

My 2c,
//Jim

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by manu@...

Jim Klimov <jimklimov@...> wrote:

> I'd say that it is remotely possible that in some future there might be
> a state, country or planet coded as ZZ ;) 

No, ZZ is permanently reserved for local usage:
http://www.iso.org/iso/iso-3166-1_decoding_table.html

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by Frantisek Hanzlik

Emmanuel Dreyfus wrote:
> Frantisek Hanzlik <franta@...> wrote:
> 
>> I just remember other cosmetical, but filling logs problem: when I
>> specify "maxpeek=nn", then when message exceed this size, I got in
>> log message as:
>> "DATE pc milter-greylist: ignoring message beyond maxpeek = nn"
>> but not one line, but many - the longer message, the more lines in
>> log. 
> 
> Would you try this patch? (not tested, I just checked it builds)
> 
> Index: milter-greylist.c
> ===================================================================
> RCS file: /cvsroot/milter-greylist/milter-greylist.c,v
> retrieving revision 1.253
> diff -U 4 -r1.253 milter-greylist.c
> --- milter-greylist.c   19 Oct 2012 03:57:39 -0000      1.253
> +++ milter-greylist.c   26 Jan 2013 06:21:02 -0000
> @@ -823,13 +823,18 @@
>  
>         len = strlen(name) + strlen(sep) + strlen(value) + strlen(crlf);
>         priv->priv_msgcount += len;
>  
> -       if (priv->priv_msgcount > priv->priv_maxpeek) {
> +       if (priv->priv_maxpeek == 0)
> +               return SMFIS_CONTINUE;
> +
> +       if ((priv->priv_msgcount > priv->priv_maxpeek) || 
> +           (priv->priv_buflen > priv->priv_maxpeek)) {
>                 if (conf.c_debug)
>                         mg_log(LOG_DEBUG, 
>                             "ignoring message beyond maxpeek = %d", 
>                             priv->priv_maxpeek);
> +               priv->priv_maxpeek = 0;
>                 return SMFIS_CONTINUE;
>         }
>  
>         if ((l = malloc(sizeof(*l))) == NULL) {
> @@ -904,12 +909,16 @@
>  
>         priv->priv_msgcount += size;
>  
>         /* Avoid copying the whole message to save CPU */
> +       if (priv->priv_maxpeek == 0)
> +               return SMFIS_CONTINUE;
> +
>         if ((priv->priv_msgcount > priv->priv_maxpeek) || 
>             (priv->priv_buflen > priv->priv_maxpeek)) {
>                 mg_log(LOG_DEBUG, "ignoring message beyond maxpeek = %d", 
>                     priv->priv_maxpeek);
> +               priv->priv_maxpeek = 0;
>                 return SMFIS_CONTINUE;
>         }
>  
>         /* First time: add \r\n between headers and body */
> 

After some troubles (given by my programming unexperience) I finally
build milter-greylist-4.4.1 Fedora 16 RPM package with your patch
(my distro /even latest Fedora 18/ still contains only older v4.2.7)
and run it. As until now
- milter seems work correctly
- mails bigger than maxpeek (even several times) now dives only one
  line in milter log

I have one question to default greylist.conf: stat directives at lines
17 and 20 offers format like:

"%T{%Y/%m/%d %T} %d [%i] %r -> %f %S (ACL %A) %Xc %Xe %Xm %Xh"

if "->" is arrow represent mail direction from sender to recipient,
should be it rather

"%T{%Y/%m/%d %T} %d [%i] %f -> %r %S (ACL %A) %Xc %Xe %Xm %Xh"

?

Thanks, Franta

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by Frantisek Hanzlik

Emmanuel Dreyfus wrote:
>> Using (nonexisting) "ZZ" country code as alias for "IP isn't" in
>> GeoIP DB"? It is IMO good solution and maybe should be taken as
>> documented official new value for testing. And maybe when there
>> would be another pseudocode for private address space, then we got
>> two additional country values for testing.
> 
> Well, if  GeoIP fail reports ZZ, then you can have acl to test local
> network without acl to test country code, no need to hardcode the logic.
> 
> Z1 and Z2 are invalid ISO 3166-1 country code, by the way.

Of course invalid, I was thinking when it should be used only for
milter internal purposes, then it is suitable - it will not interfere
with real country codes.
But I'll leave it up to Your deliberation.

Thanks, Franta Hanzlik

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-27 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> After some troubles (given by my programming unexperience) I finally
> build milter-greylist-4.4.1 Fedora 16 RPM package with your patch
> (my distro /even latest Fedora 18/ still contains only older v4.2.7)
> and run it. As until now
> - milter seems work correctly
> - mails bigger than maxpeek (even several times) now dives only one
>   line in milter log

Thank your for testing, patch checked in.
 
> I have one question to default greylist.conf: stat directives at lines
> 17 and 20 offers format like:
[ %f and %r are inverted in stat ]

Fixed.

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

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-27 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> Of course invalid, I was thinking when it should be used only for
> milter internal purposes, then it is suitable - it will not interfere
> with real country codes.

ZZ is permanently reserved for local use in ISO 3166-1, so we are safe.

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