On Feb 15, 2008, at 4:56 PM, Tobias Balle-Petersen wrote:
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?
What you describe sounds like the maildirsize file's header which
includes the quota information. You can have Dovecot use this is you
specify "quota = maildir" i.e. without specifying any limits. Some
possibilities to do this:
a) Move plugin {} section before protocol lda {} and specify the
quota=maildir in protocol lda {}. I think this makes deliver use the
one in lda for deliver and the one in plugin for imap.
b) Specify quota=maildir in plugin {} and override it in the imap's
post-login script.
Anyway I didn't mean this, although this is probably a better idea. I
was talking about doing some kind of a pre-deliver script:
#!/bin/sh
QUOTA=cat ~/quota
exec /usr/local/libexec/dovecot/deliver
But this also requires that quota isn't defined anywhere in
dovecot.conf or it gets overridden. Also v1.1 requires using an extra
command line parameter or it drops all environment variables. And this
of course requires that you know the user's home dir before deliver is
run.