Line 1: |
Line 1: |
| ==Email Statistics== | | ==Email Statistics== |
| How to get statistics about the performance of your mail server | | How to get statistics about the performance of your mail server |
− | ===Brian Read's spamfilter-stats-7.pl=== | + | |
| + | ===Built-In Statistical Reports=== |
| + | ====Server-Manager==== |
| + | Some email statistics can be seen from server-manager under "Administration", "Mail log file analysis" |
| + | |
| + | ====qplogsumm.pl==== |
| + | SME 7.2 and later include the 'logterse' plugin to qpsmtpd as well as the 'qplogsumm.pl' statistics script. 'qplogsumm.pl' creates and updates /var/log/qpsmtpd/state which shows per-plugin statistics for any qpsmtpd plugin that appears in a qpsmtpd logterse entry. |
| + | |
| + | ===Contribs & Addons=== |
| + | ====Brian Read's spamfilter-stats-7.pl==== |
| Brian Read's mailstats.pl script analyzes your qpsmtpd log files and sends a daily email to "admin" summarizing that day's email activity. | | Brian Read's mailstats.pl script analyzes your qpsmtpd log files and sends a daily email to "admin" summarizing that day's email activity. |
| | | |
− | ====Download & Installation==== | + | =====Download & Installation===== |
| <nowiki>wget -O /etc/cron.d/mailstats.cron \ | | <nowiki>wget -O /etc/cron.d/mailstats.cron \ |
| http://mirror.contribs.org/smeserver/contribs/bread/mailstats/mailstats.cron</nowiki> | | http://mirror.contribs.org/smeserver/contribs/bread/mailstats/mailstats.cron</nowiki> |
Line 11: |
Line 20: |
| '''WARNING''': Make sure that these files are accessible before executing the above commands! If you are unable to access http://mirror.contribs.org/smeserver/contribs/bread/mailstats/ the above commands will create empty files, overwriting existing versions. | | '''WARNING''': Make sure that these files are accessible before executing the above commands! If you are unable to access http://mirror.contribs.org/smeserver/contribs/bread/mailstats/ the above commands will create empty files, overwriting existing versions. |
| | | |
− | ====Change Email Recipient==== | + | =====Change Email Recipient===== |
| The email recipient is specified in the spamfilter-stats-7.pl file, currently (v0.6.11) at line 108, using: | | The email recipient is specified in the spamfilter-stats-7.pl file, currently (v0.6.11) at line 108, using: |
| $opt{'mail'} = "admin"; | | $opt{'mail'} = "admin"; |
| which will deliver email to the local 'admin' account on your SME server. Configure email forwarding in server-manager::Collaboration::Users::admin to deliver the emails to another location. | | which will deliver email to the local 'admin' account on your SME server. Configure email forwarding in server-manager::Collaboration::Users::admin to deliver the emails to another location. |
| | | |
− | ====Handling @*.u Logfiles==== | + | =====Handling @*.u Logfiles===== |
| Multilog occasionally generates log files that end in ".u" instead of ".s". The [http://cr.yp.to/daemontools/multilog.html| multilog manual] says this: | | Multilog occasionally generates log files that end in ".u" instead of ".s". The [http://cr.yp.to/daemontools/multilog.html| multilog manual] says this: |
| * ''.s: This file is completely processed and safely written to disk.'' | | * ''.s: This file is completely processed and safely written to disk.'' |