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

Monthy Messaging graphs showing zero for last day of month #85

Open betsys opened 3 months ago

betsys commented 3 months ago

Running SendmailAnalyzer 9.4 with (an older version of ) sendmail on Centos

In most ways it's running great, but the monthly graphs show zero for the last day of the month, every month The data for the next-to-last day is correct, there's no off-by-one error there. The daily graphs for those days look fine. It's been doing this consistently for the last few years.

Thanks for any suggestions. Not critical, but I've been making some presentations about email and I'd like to fix it.

Attaching screenshots for July 30 and 31 and the entire month,. The second screenshot shows that hovering over the monthly graph for the last day shows zero messages Also attaching file listing.

Running as a daemon with the default script in /etc/init.d , no diffs from https://github.com/darold/sendmailanalyzer/blob/master/start_scripts/sendmailanalyzer

Don't have a /etc/sendmailanalyzer.conf

conf file in /usr/local/sendmailanalizer , diffs from current distro: (I'm not running postscreen, not sure why conf below includes it)

PRODHOST [root@xmx 2024]# diff /usr/local/sendmailanalyzer/sendmailanalyzer.conf /tmp/sendmailanalyzer.conf.dist
< LOG_FILE      /var/log/mail.log
> LOG_FILE      /var/log/maillog
< MTA_NAME      sm-mta|sendmail|postfix|spampd|postscreen
> MTA_NAME      sm-mta|sendmail|postfix|spampd
< #VIRTUAL_DOMAIN_DB_QUERY      SELECT name FROM virtual_domains

> #VIRTUAL_DOMAIN_DB_QUERY        SELECT name FROM virtual_domains
< # When possible sendmailanalyzer extract the fqdn part of the sender or
< # recipient relay. Enable this directive if you just want Ip addresses.
< RELAY_IP_ONLY 0
<
< # Threshold to detect case where postscreen reject an ip address. By
< # default  reject: RCPT from ... are not logged by postfix, we mark the
< # message as DNSBL rejected when DNSBL rank value is upper or equal.
< POSTSCREEN_DNSBL_THRESHOLD    3
> # Custom milter-reject regex detected as spam
> #MILTER_REJECT_REGEX Mailbox not found

Crontab: 0 1 * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1

(there's some homerolled gunk in logrotate but it all operates on the rotated/old files) Logrotate:

var/log/mail.log {
    create 0640 root root
        prerotate
                service sendmail stop
                purgestat
        endscript
        postrotate
                service rsyslog restart
                service sendmail start
                /usr/local/etc/shared/rollover /var/log/mail.log.0 60 \
                        "/usr/local/etc/shared/maillog -z -o /var/log/last/mail.last"
                /usr/local/etc/rollover.mail.log.local
                service sendmailanalyzer restart
                service outbound restart
           echo ""
        endscript
}

Note: there is also a cron job which stops sendmail at 1:30 AM every night to take snapshots. not sure how this would be relevant - if it were impacting things I'd expect to see 1:30 worth of data.

july files july montly 1 july montly 2 july 30 daily july 31 daily