darold / sendmailanalyzer

Sendmail log Analyzer is a tool to monitor sendmail usage and generate HTML and graph reports. It reports all you ever wanted to know about email trafic on your network. You can also use it in ISP environment with per domain and per mailbox report.
http://sendmailanalyzer.darold.net/
GNU General Public License v3.0
76 stars 13 forks source link

Direction and inbound mail not recognised #48

Closed lloydsystems closed 7 years ago

lloydsystems commented 7 years ago

Thank you for your program, which I have been testing on my mail system. The server is CentOS 6 with Postfix MTA, SpamAssassin and SQLgrey. SpamAssassin daemon (spamd) connects to Postfix by milter (spamass-milter). Cyrus-IMAP runs on the same server. Postfix passes clean inbound mail via LMTP to Cyrus-IMAP, which handles the delivery.

Testing SendmailAnalyzer on this setup I find these issues:

  1. No recognition of inbound/outbound/internal/external (all zero)
  2. Incoming mail to my domain is not identified Mail sent is listed, showing sender and recipient addresses. But no received mail appears. If I click on the link to my domain I see the incoming mail messages, but it shows no recipient, no status, etc.

Configuration is basically at default settings. I have tried setting LOCAL_DOMAIN to 127.0.0.1 or mydomain.com but same result.

Am I missing something, or is it just SendmailAnalyzer is not compatible with my setup?

Thanks, Steve Jones

darold commented 7 years ago

Hi Steve,

Please send a mail.log file to my private email, I will try to find the best configuration for you and see if there is any issue.

Regards,

darold commented 7 years ago

Thanks for the log file, it helps me to fix two problems. Please download latest development code and just set LOCAL_DOMAIN to mail.mydomain.com.au in your sendmailanalyzer.conf.

lloydsystems commented 7 years ago

Hi Gilles,

Thanks for the updated code. I downloaded the current master and built and installed a new package. I set LOCAL_DOMAIN mail.mydomain.com.au as suggested. The results appeared to be good, only my sent mail was categorized as ext->ext, so I added the internal network domain: LOCAL_DOMAIN mail.mydomain.com.au ad.mydomain.com.au After that, sent mail is grouped as int->ext, with received mail in ext->int as expected. So far so good.

But I have been testing for a couple of days and discovered a couple of oddities.

  1. Today's statistics show the flow of received mail as int->int, whereas for previous days it's ext->int. Flow of spam and reject are shown as 'local incoming' instead of 'incoming'.
  2. But, after midnight, when today becomes yesterday, the categories become fixed. Received mail is ext->int, and spam and reject flow is 'incoming'.
  3. The day roll-over caused the number of in/out mail to become doubled. So if I had outgoing=2 and local delivery=6, after midnight they became 4 and 12. I note this happened the first day, but not the next. I deleted all history (/var/lib/sendmailanalyzer/*) and imported the logs again and the numbers returned to 2 and 6.
  4. If I look at sender/recipient statistics and drill down on my domain I notice in the recipient column 'email_address(x2)' everywhere. Why (x2)? Then, after restarting the service, it became (x3). I found the init script starts the daemon with '-f' option, always forcing re-read of the log. This means the FULL option (default 0) in the config file will always be ignored. Is this intentional? I removed the '-f', deleted history and imported again and the (xX) is gone and doesn't reappear after restart.

I welcome your comments.

Steve Jones

enekux commented 7 years ago

Hi, I am noticing similar issue here. I am going to provide you with some logs, which I hope they will be helpful for you for troubleshooting. Thank you.

darold commented 7 years ago

Thanks for all the information it helps a lot. Commit 88d501e might fix the issue. I will reply to your email to give you the right configuration.

darold commented 7 years ago

I think the issue is solved for your, I'm closing the issue, otherwise please reopen it.