We help IT Professionals succeed at work.

Sendmail Reporting Tools

khairi
khairi asked
on
Hi,

I have sendmail for my mail gateway.  How do I generate report for email incoming, outgoing, top ten, message size, etc.  If possible it will generate other report like other Exchange Reporting tools like Promodag
Comment
Watch Question

Commented:
look for syslog-stat.pl

or here is a message I found:

The 'mailstats' program parses the sendmail.st file and gives that sort of info.

As far as the syslog part of it goes, you didn't say if the file in
/var/log was generated by the "OS/var/log/<filename>" directive in
sendmail.cf or whether you were talking about the actual syslog
messages.
If it's the prior, that file is exactly the same as sendmail.st and so
you
can run mailstats on it (NOTE: don't confuse this with the procmail
"mailstat" program - there is an "s" on the end of the filename) - see
'mailstats -- -' for usage information.

If, however you are referring to the actual syslogd mail.info messages,
you can use sed, awk, perl whathaveyou to grok some info...

Say you wanted to see how much mail traffic occurred during the period
covered by the file /var/log/syslog.4, try something like:

perl -e 'while(<>){if(/\bsize=\d+/){($s)=/\bsize=(\d+)/;$sum+=$s}}\
        print "Bytes transferred: $sum\n";' /var/log/syslog.4

For more detailed parsing, check out the "scripts/mailstuff" directory
in
the CPAN as there are some perl scripts such as 'syslog-stat.pl'
and Tom Christiansen has an old one called ssl (which stands for
"summarize sendmail syslog" and is not related to secure socket layer
<G>)
that is available at ftp.convex.com (/pub/perl/scripts I think.. I just
lost the info) but is very very old and not likely to be the optimal
soltuon for a sendmailv8 machine.

Hope this helps...

--ScottVR
Commented:
The best senmail analyser..!

http://anteater.drzoom.ch/

Author

Commented:
I have problem to have the reporting to on OpenBSD but excellent on Redhat

Commented:
I have never used OpenBSD. Does Anteater work on Open BSD?

Regards,
Geoff

Author

Commented:
I can compile and run the program but the default mail log somehow can be found during the execution.  Try the parameter but still doesnt work but it is okay in Redhat

Explore More ContentExplore courses, solutions, and other research materials related to this topic.