Timo Sirainen schrieb:
On Sat, 2008-07-12 at 16:38 +0200, Robert Schetterer wrote:
Timo Sirainen schrieb:
On Sat, 2008-07-12 at 16:12 +0200, Robert Schetterer wrote:
I think existing quotas in sql could be used
if dovecot would ignore that no
maildir storage is used and simply
interpretes existing maildirsize files, which maybe created out of existing sql quota entries
( but thats speculate )
You can of course create a script for yourself that does that, but I
don't think Dovecot should bother trying to do it.
Hi Timo, it maybe possible with
Post-login scripting

like

QUOTA=`/usr/bin/mysql -N -B -D${DBDBSE} -h ${DBHOST} -u${DBUSER} -p${DBPASS} -e "SELECT ${DBQOTA} FROM ${DBTABL} where username='$USER'" 2>/dev/null`

but i am lost how to answer this in imap to the client
You're using userdb sql, right? Why don't you just have it return the
quota using user_query? See the examples in
http://wiki.dovecot.org/Quota/1.1

seems not to work with dbox

quota maildir: No maildir storages, ignoring quota

You'll have to use dict quota. That's independent of how the limits as
configured.

sorry i read dict stuff
and i dont understand it
i have no idea to make this work out of the wiki

it says

----
For example:

plugin {
  # v1.0: 10MB and 1000 messages quota limit
quota = dict:storage=10240:messages=1000 mysql:/etc/dovecot-dict-quota.conf
  # v1.1:
  quota = dict:::mysql:/etc/dovecot-dict-quota.conf
  quota_rule = *:storage=10M:messages=1000
}

However, the above example won't really work. This is because it would require linking all the binaries with MySQL library

i understand this

-----
, which I didn't really want to do. Currently you'll have to do this via the dictionary proxy (see below). Actually the performance is better that way anyway, and I don't really see a reason not to use it.

Example dovecot-dict-quota.conf:

connect = host=localhost dbname=mails user=sqluser password=sqlpass
table = quota
select_field = current
where_field = path
username_field = username

---
ok i allready have my quota tables
from postfix admin
and i am unclear about the query i need
as well how to set this in plugin quota section
in dovecot.conf


i have this quota userdb sql working with maildir

user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \
concat('*:storage=', ROUND( mailbox.quota / 1024 ) ) AS quota_rule, \
#when saving to Trash mailbox the user gets additional 50MB
"Trash:storage=50240" AS quota_rule2, \
#when saving to Sent mailbox the user gets additional 50MB
"Sent:storage=50240" AS quota_rule3, \
#when saving to Drafts mailbox the user gets additional 50MB
"Drafts:storage=50240" AS quota_rule4, \
#when saving to Templates mailbox the user gets additional 50MB
"Templates:storage=50240" AS quota_rule5, \
#when saving to Junk mailbox the user gets additional 50MB
"Junk:storage=50240" AS quota_rule6, \
#ignore quota on shared
"shared:ignore" AS quota_rule7, \
concat('dbox:/usr/local/virtual/', maildir) AS mail, \
1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active = '1'

sorry about asking like newbie here , but i simply dont understand this dict stuff setup



--
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

Reply via email to