Yahoo Groups archive

Milter-greylist

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

Thread

parse / reload bug

parse / reload bug

2004-11-10 by Klas Heggemann

We are running greylist-milter version 1.5.10 + some patches.


Yesterday I added the extra ebay range to the  config file, installed 
and
checked the syslog file which reported that it was reloaded.

However i missed to add a newline last, which resulted in that
the whole configuration file was discarded. The error is

unknown token "#" line 155

(which is last line with no newline)
	
This resulted in no whitelistiing of our local hosts, and a default 
greylist
timeout in 30 minutes :-(

When doing a restart of the milter, the error is reported on stderr.

I've hacked a -c flag to the milter-greylist, which checks the config 
file,
but does not start the deamon. Since conf_load does not return any 
status,
exit status will always be the same, so you have to check out for the 
errors
you self. This is a trival fix, but I can send a patch if you want.


(A simular but not as fatal error is when you use '/' in a comment

addr 130.237..0./16	# our net / and more

which results in
	

error at line 156: parse error

)


Klas Heggemann

Re: [milter-greylist] parse / reload bug

2004-11-10 by Brent J. Nordquist

On Wed, Nov 10, 2004 at 12:57:35PM +0100, Klas Heggemann wrote:
> However i missed to add a newline last, which resulted in that
> the whole configuration file was discarded. The error is
> 
> unknown token "#" line 155
> 
> (which is last line with no newline)
> 	
> This resulted in no whitelistiing of our local hosts, and a default 
> greylist timeout in 30 minutes :-(

Yeah; I discovered the same kind of thing. I'm supposed to be working
on a patch to change this behavior (see list archive, a few days ago);
a few things came up at work that I've had to spend time on first.

> I've hacked a -c flag to the milter-greylist, which checks the config 
> file,
> but does not start the deamon. Since conf_load does not return any 
> status,
> exit status will always be the same, so you have to check out for the 
> errors
> you self. This is a trival fix, but I can send a patch if you want.

Yes, would you please? Most helpful if it applies cleanly against
stock 1.5.11. Thanks!

-- 
Brent J. Nordquist <b-nordquist@...> N0BJN
Other contact information: http://kepler.its.bethel.edu/~bjn/contact.html

Re: [milter-greylist] parse / reload bug

2004-11-10 by Hajimu UMEMOTO

Hi,

>>>>> On Wed, 10 Nov 2004 12:57:35 +0100
>>>>> Klas Heggemann <klas@...> said:

klas> (A simular but not as fatal error is when you use '/' in a comment
klas> addr 130.237..0./16	# our net / and more
klas> which results in
klas> error at line 156: parse error
klas> )

This problem was fixed in 1.5.11.

Sincerely,

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

Re: [milter-greylist] parse / reload bug

2004-11-10 by manu@netbsd.org

Klas Heggemann <klas@...> wrote:

> This is a trival fix, but I can send a patch if you want.

Wasn't it already fixed in 1.5.10?

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@...

Re: [milter-greylist] parse / reload bug

2004-11-11 by Klas Heggemann

2004-11-11 kl. 11.20 skrev milter-greylist@yahoogroups.com:

> Yeah; I discovered the same kind of thing. I'm supposed to be working
> on a patch to change this behavior (see list archive, a few days ago);
> a few things came up at work that I've had to spend time on first.

Do I recognize this? :-) I guess this is universal...

>
>> I've hacked a -c flag to the milter-greylist, which checks the config
>> file,
>> but does not start the deamon. Since conf_load does not return any
>> status,
>> exit status will always be the same, so you have to check out for the
>> errors
>> you self. This is a trival fix, but I can send a patch if you want.
>
> Yes, would you please? Most helpful if it applies cleanly against
> stock 1.5.11. Thanks!

Ok. I've applied it to 1.5.11 with no problem. Here it is:

Re: [milter-greylist] parse / reload bug

2004-11-11 by manu@netbsd.org

Klas Heggemann <klas@...> wrote:

> Ok. I've applied it to 1.5.11 with no problem. Here it is:

Thank you for that one, I committed it (with a man page update, please
think about updating the doc next time).

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
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.