On Wed, 2011-01-12 at 01:06 +0200, Karolis Žvaigždinas wrote:
We're using Dovecot v1.2.15 LDA/IMAP/POP3+MySQL with quota plugin, quota_rule per-user size, quota_exceed_message and quota_warning on storage=90%%.with script. Everything is working as expected.
But I've been asked to configure it the way, that when a user gets message, which would make his maildir over quota limit, notification go not only to sender, but also to postmaster@domain.com. Browsed wiki, mailinglist archive - couldn't find anything on that. Is there a way to implement such feature?
I use a perl script querying DB and test active domains (since there is no domain quotas) every hour, you could adapt it to test users and send a message rather than what it does, if you dont have many users it should not be much of a problem. it warns the domain manager, and suspends inbound mail. nasty but a necessary evil. but I think you need to make your warning messages more compliance strict, we send a friendly relaxed warning at 75%, a more serious message at 90% telling them to clear out old stuff and purge unneeded now, not wait until they dont see any new mail and wonder why, if they dont clear out the mail, they have no one but themselves to blame.
And what about possibility to send a message to user, notifying him about rejected email "from: xxx@yyy.com" with "subj: blah blah" due to full mailbox? Such messages are small and would not take too much space. Thus the user would know what he misses, urging him to clean his mailbox.
Thats all nice and well, but what if you have these limits because of disk space, 1000 users getting 100 of these a day WILL add up.
That said, if you use dovecot 2.0.x's LDA, you *can* do this now, and the wiki IIRC, does tell you how - we still use 1.2.x so I don't have the command immediately at hand but recall seeing it (it might even work on 1.2.x, but never bothered trying it)