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

General eFa discussion
Post Reply
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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?
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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.
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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?
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post by shawniverson »

not sure....I'll check...
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post by pdwalker »

What were you able to discover?

On my system, only 'relay' events are logged. Nothing else is.
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post by shawniverson »

same here
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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.
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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.
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

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

Post 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
Post Reply