sendmail daily log summary

Hi all,

What I need is a tool able to produce a daily summary report out of Sendmail log file, more or less how mail/pflogsumm does with Postfix logs.

I tried mail/sma but I wasn't able to make it produce any output. (Is it broken? It doesn't seem that complicated to use, still, I might have missed something.)

I tried sendmail_stats but it doesn't like Sendmail logs anymore, "log line not in expected format" is what it keeps saying.

I don't want something huge or able to produce fancy HTML output, I'd like something simple that produces a plain ASCII report I can email every day to myself and my colleagues exactly as we do with mail/pflogsumm for Postfix servers.

It could be it doesn't exist and I'm tempted to write my own but I want to be sure I'm not reinventing the wheel here.

[I'm using Sendmail from base with sasl2 on a 8.4-RELEASE-p23, if this of any use.]
 
Last edited by a moderator:
We use mail/sma. We call it via a cron entry like:

Code:
0 1 * * * root bzcat /var/mail/maillog.0.bz2 | /usr/local/bin/sma -A -F -q
So at 1am, we run a report against yesterday's mail log.
 
I tried SMA on another server and it works just peachy. I don't understand. Both servers are 8.4-RELEASE-p23. Weird.
 
The only difference I can think of between the two servers is that the one that doesn't work has IPv6 connectivity.
 
We are using IPv6 on the mail servers with mail/sma without any issues. That being said, our reports show FQDNs and not IP addresses. If you run manually, do you get any errors.
 
Nothing, it just says "nothing to report".

You are right, I palyed with it a little bit and it's not that.

If I run it with "-v" I see some "getting size for msgid <whatever>:... not found" but nothing else.

I'm about to give up.
 
A couple of ideas:

- Is your mail server only serving IPv6? If not, try greping out IPv4 entries to a test log and running against that.

- Copy one the mail log files from a working server to your problematic server and see if you get a report.

- Run sma against a test log of increasingly small size until you get some kind of input. This way you may be able to track down the entry in the log file that is causing issues.

- Recompile mail/sma or copy sma from a working server. Shot in the dark, but couldn't hurt.
 
  • Thanks
Reactions: DD
I tried most of the things you suggest already. Except dropping IPv6, I guess I could compile sendmail with IPv6 disabled to not disrupt other services but I haven't got the time yet.

I have a small log file that works if you remove just one line, I send it to the maintainer because I can't figure out why in the hell it's doing that. No one replied yet.

I'm giving up on SMA for the moment, thanks a lot for your help it was very much appreciated.
 
I can confirm that currently sma is not working all the time. There are some daily sendmail log file that causes sma to produce no output at all. When sma works it is nice. Not sure yet what the offending line or characters in the log are. Has anyone found another suitable sendmail logfile analyzer? I would like something that also helps identify things like rejects, discards, ETRN problems. I do that now with vi or grep.
 
Back
Top