Tobias Balle-Petersen
2008-Feb-15 14:40 UTC
[Dovecot] 1.0.10 / Quota postlogin / Deliver - Not working according to the wiki?
Hello.... I load quotas from users homefolders using postlogin like this: ------------------------- #!/bin/sh # Read users quota if [ -f ~/quota ]; then export QUOTA=`cat ~/quota` fi # Start IMAP session exec /usr/lib/dovecot/imap ------------------------- User without a quota-file in their homedirs get a quota set in dovecot.conf. Im using LDA. According to the wiki this should not work: http://wiki.dovecot.org/Quota?highlight=quota : This post-login trick unfortunately doesn't work with deliver <http://wiki.dovecot.org/LDA>. If you need it, you're pretty much out of luck for now. v1.1 *quota* <http://wiki.dovecot.org/Quota/New> makes this possible. According to my tests it does indeed work. What is not supposed to work? Tobias
Timo Sirainen
2008-Feb-15 14:45 UTC
[Dovecot] 1.0.10 / Quota postlogin / Deliver - Not working according to the wiki?
On Fri, 2008-02-15 at 15:40 +0100, Tobias Balle-Petersen wrote:> ------------------------- > #!/bin/sh > > # Read users quota > if [ -f ~/quota ]; then > export QUOTA=`cat ~/quota` > fi > > # Start IMAP session > exec /usr/lib/dovecot/imap > ------------------------- > > User without a quota-file in their homedirs get a quota set in dovecot.conf.Sure this works for IMAP.> Im using LDA. According to the wiki this should not work:Because the script is run only when logging in with IMAP, not when delivering new mails, so deliver runs with the default quota limit.> According to my tests it does indeed work. What is not supposed to work?The script is definitely not run by deliver, but maybe you've managed to make it work some other way (or you misunderstood something). One possibility would be to set $QUOTA before running deliver and making sure deliver doesn't override it. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080215/ffcd481a/attachment-0002.bin>
Tobias Balle-Petersen
2008-Feb-15 14:56 UTC
[Dovecot] 1.0.10 / Quota postlogin / Deliver - Not working according to the wiki?
Timo Sirainen wrote:> Because the script is run only when logging in with IMAP, not when > delivering new mails, so deliver runs with the default quota limit.OK. I was confused because a user over limit (from personal quota-file) indeed gets his messages deleted when new mail comes in. I see now however, that new mail keeps comming in to the user when is Trash is empty AND he is over quota. Thanks for clearing this up.> The script is definitely not run by deliver, but maybe you've managed to > make it work some other way (or you misunderstood something).Seems to be the issue here ;)> One possibility would be to set $QUOTA before running deliver and making > sure deliver doesn't override it.Can you tell me more about my options in this direction? You mean the user would load his quota whem logging in, and this quota would stay loaded and visible to deliver even after he logs out? Thanks, Tobias