Re: [Dovecot] Unexplainable problem with POP3 quotas
Hello Rick, and thanks for replying
First of all, the attached script had an error (I attached the wrong one :-\, the "export" line reads:
export PATH="/usr/bin:/bin"
2009/4/30 <dovecot@dovecot.org>:
It's a dumb question, but you are running the script via cron or manually right? (dovecot doesn't execute it in it's own).
From the documentation, I'd expect it does. In http://wiki.dovecot.org/Quota/1.1 I read:
You can configure Dovecot to run an external command when user's quota exceeds a specified limit.
so I expect that it will run the script. Am I wrong?
Ciao --bronto
Hi
From the documentation, I'd expect it does. In http://wiki.dovecot.org/Quota/1.1 I read:
You can configure Dovecot to run an external command when user's quota exceeds a specified limit.
so I expect that it will run the script. Am I wrong?
Forgot to say: http://wiki.dovecot.org/Quota/1.1 also says:
Note that the warning is ONLY executed at the exact time when the limit is being crossed, so when you're testing it you have to do it by crossing the limit by saving a new mail.
and, of course, that's the way we test it:
- get the size of the Maildir from the "Disconnected"
- add some bytes (e.g.: 3000) to the aforementioned size and divide that number by 0.8
- set this number as quota. Now we are under the 80% warning limit.
- send a message slightly smaller than the number of bytes added at step 2 (e.g., 2000); we are still under the 80% limit
- log in via POP to make dovecot update maildirsize
- log out, send another message to cross the 80% quota limit
- log in again via POP and log out. Dovecot updates maildirsize and should notice we have passed the limit
It should, but it doesn't, and the quota-warning.sh script is not executed, and no warning messages are injected into the maildir.
Any clues?
Ciao and thanks --Marco
On Thu, 2009-04-30 at 17:36 +0200, Marco Marongiu wrote:
- send a message slightly smaller than the number of bytes added at step 2 (e.g., 2000); we are still under the 80% limit
- log in via POP to make dovecot update maildirsize
This is the problem. Your MDA should enforce the quota usage. There's no guarantees that Dovecot updates maildirsize after the Maildir has been modified externally. Even when it updates it, it uses a different code path ("quota recalculation"), which doesn't trigger quota warnings.
So use Dovecot's deliver and it'll do the quota enforcing and warnings.
2009/5/1 Timo Sirainen <tss@iki.fi>:
On Thu, 2009-04-30 at 17:36 +0200, Marco Marongiu wrote:
- send a message slightly smaller than the number of bytes added at step 2 (e.g., 2000); we are still under the 80% limit
- log in via POP to make dovecot update maildirsize
This is the problem. Your MDA should enforce the quota usage. There's no guarantees that Dovecot updates maildirsize after the Maildir has been modified externally. Even when it updates it, it uses a different code path ("quota recalculation"), which doesn't trigger quota warnings.
So use Dovecot's deliver and it'll do the quota enforcing and warnings.
Thanks Timo, we just reviewed the information in http://wiki.dovecot.org/LDA and http://wiki.dovecot.org/LDA/Postfix and we'll begin to test a new configuration shortly.
I hope to be back with good news soon ;)
Ciao --bronto
2009/5/1 Timo Sirainen <tss@iki.fi>:
On Thu, 2009-04-30 at 17:36 +0200, Marco Marongiu wrote:
- send a message slightly smaller than the number of bytes added at step 2 (e.g., 2000); we are still under the 80% limit
- log in via POP to make dovecot update maildirsize
This is the problem. Your MDA should enforce the quota usage. There's no guarantees that Dovecot updates maildirsize after the Maildir has been modified externally. Even when it updates it, it uses a different code path ("quota recalculation"), which doesn't trigger quota warnings.
So use Dovecot's deliver and it'll do the quota enforcing and warnings.
May 5 16:22:51 posta-st-mda-v01 deliver(faccalai@posta.staging): quota: Executing warning: /usr/local/dovecot/bin/quota-warning.sh 80 /mnt/maildir/posta.staging/USER/f/fa/faccalai@posta.staging faccalai posta.staging
It worked!!! Thank you!
What I did is:
- recompiling a dovecot anew with support for raw storage, and deliver (the initial one didn't have them)
- configured dovecot as per documentation (Quota 1.1, LDA, LDA/Postfix) so that:
- it just serverd for authentication purposes (protocols = none)
- it has a protocol lda section, with mail_plugins = quota
- configured the auth default to create the master socket
- changed postfix's main.cf and master.cf as per documentation
- set a user's quota near the 80% limit and started testing
Thanks a lot again
Ciao --bronto
participants (2)
-
Marco Marongiu
-
Timo Sirainen