Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-13 Thread Timo Sirainen
On Tue, 2009-08-11 at 12:38 -0700, Tim Traver wrote:
 Timo,
 
 oh, I didn't realize that it was not a standard Maildir++ file. It looks
 like that is what is used in courier, which I am migrating from.

I don't think it's from Courier either. I just checked Courier's sources
and there's no mention of that file. Unless maybe you had some old or
patched version that supported it..



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-11 Thread Timo Sirainen

On Aug 11, 2009, at 1:56 AM, Tim Traver wrote:


quota = maildir

would it look like this :

quota_rule = maildir:


No. http://wiki.dovecot.org/Quota/1.1 has plenty of examples.



Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-11 Thread Tim Traver


Timo Sirainen wrote:
 On Aug 11, 2009, at 1:56 AM, Tim Traver wrote:

 quota = maildir

 would it look like this :

 quota_rule = maildir:

 No. http://wiki.dovecot.org/Quota/1.1 has plenty of examples.

Timo,

ok, I had looked at that before, and just now, and there doesn't seem to
be an example for my situation. I don't want to set individual quotas
for mailboxes here. I get the quota information from the userdb when I
use the checkpasswd routine...

So, this is why I am confused. I tried using

quota_rule = maildir:backend

but that actually errored out on startup...

Tim.



Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-11 Thread Tim Traver
Timo,

ok, I have been trying to get this all set up, and am still having
problems. I'm sorry for bugging you about this...

To refresh the situation, I have a custom checkpasswd routine that
retrieves the user information properly, which gives the Maildir root.

In that Maildir directory, I use the maildirquota file to set the quota
of the account.

although setting up a quota_rule did indeed make it so that the
maildirsize file was created when an email was delivered, it would
ignore the quota that is set up in the maildirquota file.

How do I get the quota plugins to use the maildirquota file as the
source of the correct quota for that account???

I have included my dovecot -n output for you
# 1.2.2: /usr/local/etc/dovecot.conf
# OS: FreeBSD 7.2-STABLE i386
log_path: /local/logs/dovecot.errors
protocols: imap imaps pop3 pop3s managesieve
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login
verbose_proctitle: yes
first_valid_uid: 100
mail_uid: 100
mail_gid: 100
mail_location: maildir:%h/Maildir
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
lock_method: dotlock
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3):
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
lda:
  postmaster_address: postmas...@scaledsystems.com
  mail_plugins: quota sieve
  quota_full_tempfail: yes
  auth_socket_path: /var/run/dovecot/auth-master
auth default:
  mechanisms: plain login
  username_translation: %@
  username_format: %Lu
  verbose: yes
  passdb:
driver: checkpassword
args: /bin/checkpassword_dovecot_auth
  userdb:
driver: checkpassword
args: /bin/checkpassword_dovecot_deliver
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 438
plugin:
  quota: maildir:User Quota
  quota_rule: ?:storage=1GB

I can't figure this one out...

Tim.

Tim Traver wrote:
 Timo Sirainen wrote:
   
 On Aug 11, 2009, at 1:56 AM, Tim Traver wrote:

 
 quota = maildir

 would it look like this :

 quota_rule = maildir:
   
 No. http://wiki.dovecot.org/Quota/1.1 has plenty of examples.

 
 Timo,

 ok, I had looked at that before, and just now, and there doesn't seem to
 be an example for my situation. I don't want to set individual quotas
 for mailboxes here. I get the quota information from the userdb when I
 use the checkpasswd routine...

 So, this is why I am confused. I tried using

 quota_rule = maildir:backend

 but that actually errored out on startup...

 Tim.

   


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-11 Thread Timo Sirainen
On Tue, 2009-08-11 at 11:56 -0700, Tim Traver wrote:
 To refresh the situation, I have a custom checkpasswd routine that
 retrieves the user information properly, which gives the Maildir root.
 
 In that Maildir directory, I use the maildirquota file to set the quota
 of the account.

What is maildirquota file? What kind of data does it contain? I've never
heard of it. Sounds like your checkpassword script should be generating
quota_rule by reading that file.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-11 Thread Tim Traver
Timo,

oh, I didn't realize that it was not a standard Maildir++ file. It looks
like that is what is used in courier, which I am migrating from.
It simply contains the same value as the first line of the maildirsize
file does.

so, I guess I have to put the quota rule in the checkpasswd routine and
return it as userdb_quota variable...

ok, I guess I will try that...

Thanks,

Tim.


Timo Sirainen wrote:
 On Tue, 2009-08-11 at 11:56 -0700, Tim Traver wrote:
   
 To refresh the situation, I have a custom checkpasswd routine that
 retrieves the user information properly, which gives the Maildir root.

 In that Maildir directory, I use the maildirquota file to set the quota
 of the account.
 

 What is maildirquota file? What kind of data does it contain? I've never
 heard of it. Sounds like your checkpassword script should be generating
 quota_rule by reading that file.

   


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Timo Sirainen
On Mon, 2009-08-10 at 17:43 -0700, Tim Traver wrote:
 when I log into the IMAP port, I get the following greeting :
 
 * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
 
 So it seems there is no QUOTA support for the IMAP server to query for
 the quota file...

The greeting capability lists only capabilities relevant to pre-login
session. You'll get the full list with either CAPABILITY command or
automatically after logging in.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Tim Traver
Timo,

ok, upon further examination, I found that a later CAPABILITY command
did indeed return QUOTA in its line...

But I also looked in the code to find out what happens when a command is
sent to get the quota like this :

QUOT1 GETQUOTAROOT INBOX

and I get the following back :
* QUOTAROOT INBOX
QUOT1 OK Getquotaroot completed.

But I don't see a quota value in there anywhere.

The maildirquota file is in place in the maildir, and has all of the
correct permissions, unless you restrict it to have particular
permissions before you read it...

Thanks,

Tim.


Timo Sirainen wrote:
 On Mon, 2009-08-10 at 17:43 -0700, Tim Traver wrote:
   
 when I log into the IMAP port, I get the following greeting :

 * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

 So it seems there is no QUOTA support for the IMAP server to query for
 the quota file...
 

 The greeting capability lists only capabilities relevant to pre-login
 session. You'll get the full list with either CAPABILITY command or
 automatically after logging in.

   


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Timo Sirainen
On Mon, 2009-08-10 at 18:01 -0700, Tim Traver wrote:
 and I get the following back :
 * QUOTAROOT INBOX
 QUOT1 OK Getquotaroot completed.
 
 But I don't see a quota value in there anywhere.

That means you either have unlimited quota or you don't have quota
configured at all. Have you set up quota and quota_rule settings?
http://wiki.dovecot.org/Quota/1.1 should explain them, if it doesn't
help show your dovecot -n output.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Tim Traver


Timo Sirainen wrote:
 On Mon, 2009-08-10 at 18:01 -0700, Tim Traver wrote:
   
 and I get the following back :
 * QUOTAROOT INBOX
 QUOT1 OK Getquotaroot completed.

 But I don't see a quota value in there anywhere.
 

 That means you either have unlimited quota or you don't have quota
 configured at all. Have you set up quota and quota_rule settings?
 http://wiki.dovecot.org/Quota/1.1 should explain them, if it doesn't
 help show your dovecot -n output.

   
Timo,

I figured out something...The issue appeared to have been that no
maildirsize file existed. Once I put the maildirsize file in there, then
it sent back the quota parameters.

But, isn't it supposed to create that file if it does not exist???

Or at least on delivery isn't it supposed to get created??? (I have
quota plugin enabled in the lda as well)

Thanks,

Tim.



Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Timo Sirainen

On Aug 11, 2009, at 1:35 AM, Tim Traver wrote:


I figured out something...The issue appeared to have been that no
maildirsize file existed. Once I put the maildirsize file in there,  
then

it sent back the quota parameters.

But, isn't it supposed to create that file if it does not exist???

Or at least on delivery isn't it supposed to get created??? (I have
quota plugin enabled in the lda as well)


It sounds like you didn't set quota_rule.



Re: [Dovecot] QUOTA not appearing in CAPA

2009-08-10 Thread Tim Traver


Timo Sirainen wrote:
 On Aug 11, 2009, at 1:35 AM, Tim Traver wrote:

 I figured out something...The issue appeared to have been that no
 maildirsize file existed. Once I put the maildirsize file in there, then
 it sent back the quota parameters.

 But, isn't it supposed to create that file if it does not exist???

 Or at least on delivery isn't it supposed to get created??? (I have
 quota plugin enabled in the lda as well)

 It sounds like you didn't set quota_rule.

Ok, that's a point of confusion then...

I send back the accounts quota value from my custom checkpasswd routine,
and want to us maildir quotas only.

So what would my quota_rule look like?

I have the following for the checkpasswd
  passdb checkpassword {
# Path for checkpassword binary
args = /bin/checkpassword_dovecot_auth
  }

quota = maildir

would it look like this :

quota_rule = maildir:

?

Thanks,

Tim.