Re: tool-stats: strptime failed

2018-04-09 Thread Joerg Jung
> On 2. Apr 2018, at 21:57, Denis  wrote:
> 
> One minor problem with "Bonus: tool-stats script" from the tutorial.
> 
> # cat /scripts/log-stat.sh
> 
> #!/bin/sh
> 
> /usr/bin/zcat /var/log/maillog.*.gz \
>| /usr/local/bin/tool-stats \
>| /usr/bin/mail -s "smtpd log report" root
> 
> returns:
> 
> tool-stats: strptime failed line 1: Undefined error: 0
> tool-stats: strptime failed line 44: Undefined error: 0
> tool-stats: strptime failed line 45: Undefined error: 0
> 
> Does somebody have fixed the errors from it?

No.

> It seems to be a problem with newsyslog timestamps like these:
> 
> 2018-01-25T10:08:12.912Z mail newsyslog[8703]: logfile turned over

Yes, known problem. Github issue already open. PR/diff/fix welcome.


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: tool-stats

2016-09-06 Thread Mischa
Hi Giovanni,

Nope... native. Only running this machine with a honeypot domain at the moment.

# uname -a
OpenBSD br1 6.0 GENERIC.MP#0 amd64

Mischa



> On 06 Sep 2016, at 18:22, Giovanni Bechis  wrote:
> 
> On 09/06/16 18:10, Mischa wrote:
>> Hi All,
>> 
>> Did something else change in 6.0 in regards to logging?
>> 
>> tool-stats remains very empty.
>> 
> in OpenBSD 6.0 works file, are you running portable (on Linux) ?
> 
> -
> tool-stats - smtpd log statistics (c) 2016 Joerg Jung
> 
> Thu Sep 06 09:00:02 - Thu Sep 06 18:19:33
> 
> Messages:   smtp: 6533 mta: 6509 mda: 0 reject: 0
> Throughput: 700.57 mails/hour 44.67 mbytes/hour
> -
> 
> Cheers
>  Giovanni
> 
>> # zcat /var/log/maillog.6.gz | tool-stats  
>> tool-stats - smtpd log statistics (c) 2016 Joerg Jung
>> 
>> Mon Aug 27 15:00:01 - Tue Aug 28 15:00:01
>> 
>> Messages:   smtp: 0 mta: 0 mda: 0 reject: 4327
>> Throughput: 0.00 mails/hour 0.00 bytes/hour
>> 
>> Filters
>> 
>>  DNSBL:   4327
>>  Regex:   connect: 0 helo: 0 mail: 0 rcpt: 0 dataline: 0
>>  Spam:0
>>  Virus:   0
>> 
>> ###
>> 
>> # tool-stats /var/log/maillog   
>> tool-stats - smtpd log statistics (c) 2016 Joerg Jung
>> 
>> Thu Sep 06 11:00:01 - Thu Sep 06 18:07:10
>> 
>> Messages:   smtp: 0 mta: 0 mda: 0 reject: 0
>> Throughput: 0.00 mails/hour 0.00 bytes/hour
>> 
>> Filters
>> 
>>  DNSBL:   0
>>  Regex:   connect: 0 helo: 0 mail: 0 rcpt: 0 dataline: 0
>>  Spam:0
>>  Virus:   0
>> 
>> 
>> 
>> I can see mail is coming in still
>> 
>> # grep -c "550 Invalid recipient" /var/log/maillog
>> 754
>> 
>> Mischa
>> 
>> 
> 
> 
> -- 
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

--
High5! B.V.
KvK: 33248398
BTW: NL800781417B01
Mobile: +31 6 2181 8161




--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: tool-stats

2016-09-06 Thread Giovanni Bechis
On 09/06/16 18:10, Mischa wrote:
> Hi All,
> 
> Did something else change in 6.0 in regards to logging?
> 
> tool-stats remains very empty.
> 
in OpenBSD 6.0 works file, are you running portable (on Linux) ?

-
tool-stats - smtpd log statistics (c) 2016 Joerg Jung

Thu Sep 06 09:00:02 - Thu Sep 06 18:19:33

Messages:   smtp: 6533 mta: 6509 mda: 0 reject: 0
Throughput: 700.57 mails/hour 44.67 mbytes/hour
-

 Cheers
   Giovanni

> # zcat /var/log/maillog.6.gz | tool-stats  
> tool-stats - smtpd log statistics (c) 2016 Joerg Jung
> 
> Mon Aug 27 15:00:01 - Tue Aug 28 15:00:01
> 
> Messages:   smtp: 0 mta: 0 mda: 0 reject: 4327
> Throughput: 0.00 mails/hour 0.00 bytes/hour
> 
> Filters
> 
>DNSBL:   4327
>Regex:   connect: 0 helo: 0 mail: 0 rcpt: 0 dataline: 0
>Spam:0
>Virus:   0
> 
> ###
> 
> # tool-stats /var/log/maillog   
> tool-stats - smtpd log statistics (c) 2016 Joerg Jung
> 
> Thu Sep 06 11:00:01 - Thu Sep 06 18:07:10
> 
> Messages:   smtp: 0 mta: 0 mda: 0 reject: 0
> Throughput: 0.00 mails/hour 0.00 bytes/hour
> 
> Filters
> 
>DNSBL:   0
>Regex:   connect: 0 helo: 0 mail: 0 rcpt: 0 dataline: 0
>Spam:0
>Virus:   0
> 
> 
> 
> I can see mail is coming in still
> 
> # grep -c "550 Invalid recipient" /var/log/maillog
> 754
> 
> Mischa
> 
> 


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Tool stats

2016-06-02 Thread Edgar Pettijohn


Sent from my iPhone

> On Jun 2, 2016, at 8:44 AM, Joerg Jung  wrote:
> 
> 
>> On 02 Jun 2016, at 15:24, Edgar Pettijohn  wrote:
>> 
>> I saw this in my daily report.
>> 
>> Running daily.local:
>> tool-stats: session failed line 10341
> 
> That means: it found a Session ID in the log which has been "Accepted”  but 
> not 
> created with “New” before. This can happen due to log rotation, e.g. previous 
> file 
> which is not part of current tool-stats run, contains the "New” session.
> 
> Depending on the server throughput this should only happen rarely for very 
> few Sessions.
> 
>> The report was still emailed to me and looked correct. Not sure if it's a 
>> bug or not.
> 
> Not really bug. Can be ignored for now. I’m not sure, maybe this message 
> should be 
> silenced, e.g. log_debug() only with me “-v” switch enabled or something.
> 
> Gilles is re-working the logs currently, tool-stats will be adjusted once 
> this is done.
> Likely that I'll handle this message then as well.
> 

Thanks for the quick response. I will ignore this message in the future.

Edgar

>> Thanks,
>> 
>> Edgar
>> 
>> Sent from my iPhone
>> 
>> --
>> You received this mail because you are subscribed to misc@opensmtpd.org
>> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
> 
> 
> -- 
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
> 


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Tool stats

2016-06-02 Thread Joerg Jung

> On 02 Jun 2016, at 15:24, Edgar Pettijohn  wrote:
> 
> I saw this in my daily report.
> 
> Running daily.local:
> tool-stats: session failed line 10341

That means: it found a Session ID in the log which has been "Accepted”  but not 
created with “New” before. This can happen due to log rotation, e.g. previous 
file 
which is not part of current tool-stats run, contains the "New” session.

Depending on the server throughput this should only happen rarely for very few 
Sessions.

> The report was still emailed to me and looked correct. Not sure if it's a bug 
> or not. 

Not really bug. Can be ignored for now. I’m not sure, maybe this message should 
be 
silenced, e.g. log_debug() only with me “-v” switch enabled or something.

Gilles is re-working the logs currently, tool-stats will be adjusted once this 
is done.
Likely that I'll handle this message then as well.

> Thanks,
> 
> Edgar
> 
> Sent from my iPhone
> 
> --
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
> 


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org