Enable quotas in postfix.
Your maildirsize should update with courier-imap's pop daemon.
Squirrelmail and many other webmail clients use imap which should also
result in the maildirsize updating appropriately.
~Rolan
Max Clark wrote:
Hi all,
Please forgive the cross post, I am not sure what the best forum would
be given the nature of my problem.
I have a mailplatform with thousands of user accounts across multiple
virtual domains. I am using postfix, amavisd-new (spam/virus
scanning), and maildrop (for quotas) to receive and deliver email to
the users inbox. And I am using a combination of courier-imap (with
imap and pop support) with squirrelmail for users to retrieve their
email.
This configuration works exactly as expected, however in the cases
where email is inbound to a user that is over their mailbox quota, the
email has to flow through postfix, amavisd-new and maildrop before the
bounce is generated. A significant amount of the time, the reply-to
address is invalid, or I cannot connect to the remote mailserver.
I would like to reject email to users that are overquota immediately
in postfix before data is passed with a reject_recipient map (or
something similiar). I wrote a perl script to parse the maildirsize
and flag the overquota users, from this I have been generating a
custom map with the overquota users and the reject statement.
This was working great until I noticed that when the user cleans out
their maildir using pop3 or via the webmail, the maildirsize file is
not updated, and my script never knows to unflag the user. This has
left me completely stumped.
How do I effeciently check the maildirsize for thousands of users, and
accurately mark when the maildir has been cleaned out?
TIA,
Max