Line 1: |
Line 1: |
| + | === Version === |
| + | {{ #smeversion: smeserver-mailstats}} |
| + | |
| ==Mailstats== | | ==Mailstats== |
| Brian Read's mailstats contrib analyzes your qpsmtpd log files and sends a periodic email to the address you specify summarizing your server's email activity. | | Brian Read's mailstats contrib analyzes your qpsmtpd log files and sends a periodic email to the address you specify summarizing your server's email activity. |
Line 5: |
Line 8: |
| | | |
| Read the original announcement here: http://forums.contribs.org/index.php?topic=40651.0 | | Read the original announcement here: http://forums.contribs.org/index.php?topic=40651.0 |
| + | |
| + | {{Note box| For GeoIP reporting you may need updated rpms and GeoIP plugin - please see bugs below and the GeoIP wiki page https://wiki.contribs.org/GeoIP}} |
| | | |
| ==Installation== | | ==Installation== |
Line 61: |
Line 66: |
| config setprop mailstats Base ("Midnight"|Midday"|"Now"|"##") | | config setprop mailstats Base ("Midnight"|Midday"|"Now"|"##") |
| Note: a number is interpreted as the hour of the day (0-23) | | Note: a number is interpreted as the hour of the day (0-23) |
− |
| |
− | ==Logging to a MySQL database==
| |
− | In order to log your data to a MySQL database, you will need to create a database named 'mailstats'.
| |
− |
| |
− | There is a script to create the mailstats database held in Brian Read's contrib area, courtesy of Hartmut Trepkau.
| |
− |
| |
− | http://mirror.contribs.org/smeserver/contribs//bread/mailstats/sql%20create/
| |
− |
| |
− | You can use this to create the database and tables, and it will also set the configuration entry to enable the saving to the database.
| |
− |
| |
− | Note that the create-mysql.sh script will delete any previous database (and the associated data) of the name "mailstats".
| |
− | Also note the that script requires the tables.sql file in the same directory.
| |
| | | |
| ==Additional Notes== | | ==Additional Notes== |
Line 84: |
Line 77: |
| However in the early days of an installation, there will be only the "current" file, this leads to a nightly error message: | | However in the early days of an installation, there will be only the "current" file, this leads to a nightly error message: |
| | | |
− | ''Can't open /var/log/qpsmtpd/*.s: No such file or directory'' | + | ''Can't open /var/log/qpsmtpd/@*: No such file or directory'' |
| | | |
| This is only a minor issue as it 'solves' itself once logrotate creates the .u or .s files. | | This is only a minor issue as it 'solves' itself once logrotate creates the .u or .s files. |
| + | |
| + | You can eliminate this issue by forcing a qpsmtpd log rotation as described at http://wiki.contribs.org/Email_Statistics#Force_first_log_rotation |
| | | |
| ===Manual report generation=== | | ===Manual report generation=== |
| | | |
| You can use the following command to generate a report | | You can use the following command to generate a report |
− | perl /usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/@* /var/log/qpsmtpd/current | + | perl /usr/bin/mailstats.pl /var/log/qpsmtpd/@* /var/log/qpsmtpd/current |
| + | |
| + | == Bug Reporting & Tracking == |
| + | Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the '''smeserver-mailstats''' component or use this link: {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-mailstats|title=smeserver-mailstats}} |
| + | |
| + | === smeserver-mailstats - Outstanding bugs === |
| + | {{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-mailstats|noresultsmessage="No open bugs found."}} |
| | | |
| | | |
Line 97: |
Line 98: |
| [[Category:Contrib]] | | [[Category:Contrib]] |
| [[Category:Mail]] | | [[Category:Mail]] |
| + | [[Category:Administration:Monitoring]] |