[milters] Archive

Lists Index Date Thread Search

Article: 683
From: Anthony Howe
Date: 2005-08-03 06:07:24 -0400
Subject: Re: Can't get report from milter-report

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Anthony Howe wrote:
>>Aug  3 11:10:12 vic-free milter-report[71216]: report 1110 started
>>Aug  3 11:10:43 vic-free last message repeated 44858 times
>>Aug  3 11:11:00 vic-free last message repeated 25922 times
> 
> 
> This doesn't look right. Looks like some infinite loop. Hmm. That might 
> be a bug, ie. stating a single daily time -a 1110. Will look into this.

OK, because of the missing commas in you -a option argument, the milter 
thought it only had ONE daily time to report and this will call an 
infinite loop for 50 minutes (1110 .. 1159). I have a quick fix that 
will appear in 0.3:

In milter-report.c, startReportAtThread(), around line 884:

seconds = (86400 + ((reportAt[idx].hh - local.tm_hour)*3600 + 
(reportAt[idx].mm - local.tm_min)*60)) % 86400;
smfLog(SMF_LOG_DEBUG, "next report in %u seconds at %.02u%.02u", 
seconds, reportAt[idx].hh, reportAt[idx].mm);

Insert between the seconds calculation and the smfLog()

if (reportAtLength == 1 && reportAt[idx].hh == local.tm_hour && 
reportAt[idx].mm <= local.tm_min)
	seconds += 86400;

This should fix the single daily report loop and force the next report 
to occur 24 hours later. Its not elegant, but it should do for now.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search