Page 1 of 1

MTA stats - who's responsible for the data collection?

Posted: 02 Oct 2015 05:11
by pdwalker
I'm currently poking around the rep_total_mail_by_date.php and I've just noticed that my mtalog table is empty.

Does anyone know what part of mailscanner/mailwatch/<something else?> is responsible for populating this table?

Re: MTA stats - who's responsible for the data collection?

Posted: 02 Oct 2015 07:08
by pdwalker
Ok, further poking around reveals the following directories contain the scripts for MTA log processing:

Code: Select all

  /usr/local/bin/mailwatch/tools/Postfix_relay/
According to INSTALL, the mailwatch_relay.sh script needs to run hourly in cron (after updating), but my EFA installation doesn't have this.

This file references two scripts called

Code: Select all

postfix_relay.php
mailscanner_relay.php
located in /home/www/sites/mailscanner/

The first file appears to be the log parser, but it doesn't appear to capture the information correctly from the log file. I'll look at it in a bit more detail shortly.

Re: MTA stats - who's responsible for the data collection?

Posted: 02 Oct 2015 19:47
by shawniverson

Re: MTA stats - who's responsible for the data collection?

Posted: 03 Oct 2015 09:25
by pdwalker
weird.

it's not working for me.

it is logging some data (relay) but it is not logging unknown users, or rbl blocked mail or unknown domains.

were/are you getting those stats?

Re: MTA stats - who's responsible for the data collection?

Posted: 03 Oct 2015 15:32
by shawniverson
not sure....I'll check...

Re: MTA stats - who's responsible for the data collection?

Posted: 13 Apr 2016 06:54
by pdwalker
What were you able to discover?

On my system, only 'relay' events are logged. Nothing else is.

Re: MTA stats - who's responsible for the data collection?

Posted: 14 Apr 2016 21:14
by shawniverson
same here

Re: MTA stats - who's responsible for the data collection?

Posted: 15 Apr 2016 04:33
by pdwalker
So, that means the log processing script needs some additional work.

I'll have a look and see what needs to be done.

Re: MTA stats - who's responsible for the data collection?

Posted: 19 Apr 2016 04:34
by pdwalker
Yeah, the script doesn't process those other events, and thus doesn't capture them. That's left as an "exercise for the reader".

I've made some initial changes to capture this information. I'll share the results once I'm happy with the results.

Re: MTA stats - who's responsible for the data collection?

Posted: 05 May 2016 03:57
by pdwalker
note to self:
you came across this before and found another script that could properly pull the information:
viewtopic.php?f=5&t=1015&p=3146&hilit=m ... tics#p3146