hi there, I use dbmail as a backend for archiving spam for our enterprise client. The schema is similar to one described in Wiki (with one system wide or domain-wide spam archiving account, however). Due to huge load (up to 10M messages/day), new folder is created each hour. This allows helpdesk people to search for false positives by request and resent them to the original recipients.
I found, however, that I need to perform two maintenance tasks, that cannot be achieved easily with dbmail. So I wrote a couple of patches for the tasks that I guess can be interesting addendums for similar archiving applications based on dbmail: --- first of all, I need to delete old spam. I found that the easiest way to do this is by means of the dbmail-export, exporting old spam messages either to /dev/null or to a separate temporary folder for backing this stuff up for some reasons. The dbmail-export implements very flexible search statements and suites this task ideally. However, when I run it nightly with -D -d options, I found that it leaves all the empty folders that the system created hourly. The patch attached (see export-delete-empty-mailbox.patch) adds a -e option that deletes empty mailboxes (folders) that were involved in export. This is done after actions performed by -d and -D options, so you can use the following command in daily cron: dbmail-export -d -D -e -r -q -q -u spam-archive -m 'INBOX/Spam Archive' -o /dev/null -s "1:* BEFORE 'date '+%e-%b-%Y' -d '30 days ago''" or similar to delete all old messages along with their empty old mailboxes. --- the second patch was inspired by the following problem: when the system creates new folders hourly with dynamic names, they are always created with read-write permission, even if their parent folder is read-only. And helpdesk operators therefore can occasionally modify the messages or even delete them. The patch (see inherit-permissions.patch attached) adds the -P option to dbmail-smtp utility which allows to inherit read-only permission when a mailbox is created in brute-force mode by means of the -M option with dbmail-smtp. This patch keeps space for other useful addendums allowing to control permission of the folders created by the dbmail modules. Both patches are for dbmail-2.2.10. Enjoy your meal. Please consider them for adding into main branch of the dbmail software. regards, Andrey http://www.nabble.com/file/p18716545/export-delete-empty-mailbox.patch export-delete-empty-mailbox.patch http://www.nabble.com/file/p18716545/inherit-permission.patch inherit-permission.patch -- View this message in context: http://www.nabble.com/useful-extensions-to-dbmail-for-message-archiving-tp18716545p18716545.html Sent from the dbmail dev mailing list archive at Nabble.com. _______________________________________________ Dbmail-dev mailing list [email protected] http://twister.fastxs.net/mailman/listinfo/dbmail-dev
