PowerMTA Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

PowerMTA 5.5r1 is out!!!!  Please contact support@port25.com for a license and download access.

Author Topic: Daily email reports  (Read 42254 times)

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Daily email reports
« on: August 14, 2012, 10:03:32 AM »

Hi,
Is there any way to get the email reports for previous days, that may include total messages reached the mta, sent out, bounced etc?
How can I know the total messages reached the server (not sent out or bounced) from the logs, for today, previous day etc ?
Logged

CaLViN

  • Hero Member
  • *****
  • Karma: +43/-2
  • Posts: 1233
  • Hasan Kurtoglu
    • PowerMTA Administration Service
Re: Daily email reports
« Reply #1 on: August 14, 2012, 10:11:43 AM »

Have you checked accounting files ?
Logged

Professional PowerMTA Administrator - Deliverability Expert

Contact me for Consultancy needs!

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: Daily email reports
« Reply #2 on: August 14, 2012, 10:20:00 AM »

Yes.
I got almost everything from it. but, I am still not able to find out how many mails reached the server accurately. I think only sent/bounced mails will be added to accounting files, not deferred or temperror mails. How can I get this count precisely? I tried 'grep'ing with 'QUIT', 'RCPT TO' words in pmta.log file, but, as pmta tries several times to send a deferred mail, I am getting a number higher than the actual count. Is there any way to know exactly how many mails reached the server ? 
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: Daily email reports
« Reply #3 on: August 14, 2012, 10:24:24 AM »

What do you mean by "reached" the server.  Are you talking about how many were submitted and received by PowerMTA?  If so, you need to define "r" records in PowerMTA, which generate records for each message received by PowerMTA. 

Most sites however trust that the "d" plus "b" records equals the total amount submitted.
Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: Daily email reports
« Reply #4 on: August 14, 2012, 11:37:21 AM »

Okay.. That was what I meant. I will enable the 'r' record. I saw mismatch between the d+b and total mails released count. That's why asked the question.
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: Daily email reports
« Reply #5 on: August 14, 2012, 11:48:37 AM »

In general, the total # of "r" records should equal "d" + "b" plus whatever is still in the queue.

Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: Daily email reports
« Reply #6 on: August 22, 2012, 05:50:37 AM »

Hi ,
I could see that 3 account logs were created for the day 21st Aug in my pmta server, namely acct-2012-08-21-0000.csv, acct-2012-08-21-0001.csv and acct-2012-08-21-0002.csv . "r" record is enabled on my server. While taking the counts, I can see that the total no.of r,b,d records are different for all the above 3 logs. Does it mean, total messages received is the sum of 'r' records in all the above logs for the day ? And the same for 'b' and 'd' records ?
For ex:
acct-2012-08-21-0000.csv
r=100
d=90
b=10
acct-2012-08-21-0001.csv
r=200
d=180
b=20
So, that means, for the day 21st, out of 300 mails sent, 270 mails delivered and 30 mails were bounced?
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: Daily email reports
« Reply #7 on: August 22, 2012, 08:28:42 AM »

Cannot say with 100% certainty since, depending on your bounce-after directive and the general responsiveness of domains that you are mailing to, it could take a few days for email messages to be accepted.  So, for example, the message could be queued on 21Aug, seen as an "r" record in an acct file for 21Aug, but then the remote site you are mailing to came back online 2 days later and accepted your email at that time, which would be seen as a "d" record in a file dated 23Aug.

The queue time stamp is included in both "b" and "d" records to indicate when the messages were initially queued, which will match the time for the record for the same message seen as the "r" record.  We write the record to the file of course when the message was delivered or bounced.
Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: Daily email reports
« Reply #8 on: August 22, 2012, 11:34:57 AM »

Okay. Thanks. One more question. If one mail is temporarily bounced at the first attempt, then it re-queued and again temporarily bounced. Will that count two 'b' records on the account file?
Logged

CaLViN

  • Hero Member
  • *****
  • Karma: +43/-2
  • Posts: 1233
  • Hasan Kurtoglu
    • PowerMTA Administration Service
Re: Daily email reports
« Reply #9 on: August 22, 2012, 01:05:53 PM »

Okay. Thanks. One more question. If one mail is temporarily bounced at the first attempt, then it re-queued and again temporarily bounced. Will that count two 'b' records on the account file?
Of course.
Logged

Professional PowerMTA Administrator - Deliverability Expert

Contact me for Consultancy needs!