Re: [Dovecot] Quota question.

2013-09-11 Thread Noel Butler
On Wed, 2013-09-11 at 15:05 -0400, Bruce Markey wrote:

> I think it's something more. Apparently it's not even looking at the 
> database.  Not sure what I didn't do.
> If anyone can point me to a good dovecot / mysql quota how to that would 
> be helpful.
> 
> Thank you
> bruce
> 
> 




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


Re: [Dovecot] Quota question.

2013-09-11 Thread Daniel Parthey
Hi Bruce,

please follow the Dovecot Mailing List guidelines and post your output of

doveconf -n

Also have a look in the List Archives. There has been a similar quota question 
in the last few days.

Regards
Daniel

Re: [Dovecot] Quota question.

2013-09-11 Thread Vijay Rajah
Check if new quota is recognized using 'doveadm quota get -u '

If it does then there is some other issue... It is hard to tell without
knowing how it is setup.

Thanks
VIjay


On Thu, Sep 12, 2013 at 12:35 AM, Bruce Markey  wrote:

> I think it's something more. Apparently it's not even looking at the
> database.  Not sure what I didn't do.
> If anyone can point me to a good dovecot / mysql quota how to that would
> be helpful.
>
>
> Thank you
> bruce
>
>
> --
> Please use PGP, ENCRYPT everything.
> For information about acquiring a secryption.com account, email me.
>
> My public key: 
> https://www.secryption.com/**BruceMarkey.asc
>   or
>https://keyserver.pgp.com
>
>


Re: [Dovecot] Quota question.

2013-09-11 Thread Bruce Markey
I think it's something more. Apparently it's not even looking at the 
database.  Not sure what I didn't do.
If anyone can point me to a good dovecot / mysql quota how to that would 
be helpful.


Thank you
bruce


--
Please use PGP, ENCRYPT everything.
For information about acquiring a secryption.com account, email me.

My public key: https://www.secryption.com/BruceMarkey.asc   or
   https://keyserver.pgp.com



Re: [Dovecot] Quota question.

2009-08-28 Thread Benny Pedersen

On Sat, August 29, 2009 00:04, Timo Sirainen wrote:
> On Aug 28, 2009, at 6:00 PM, Benny Pedersen wrote:
> .., concat('*:bytes=', quota) AS quota_rule FROM ..

super solved it for me

-- 
xpoint



Re: [Dovecot] Quota question.

2009-08-28 Thread Timo Sirainen

On Aug 28, 2009, at 6:00 PM, Benny Pedersen wrote:


On Fri, August 28, 2009 23:46, Timo Sirainen wrote:

On Fri, 2009-08-28 at 23:43 +0200, Benny Pedersen wrote:

On Fri 14 Aug 2009 02:51:33 AM CEST, Timo Sirainen wrote
in 1.1.16 i have also a problem with quotas, maildirsize file is not
created with new size when mailbox is maked, and if qoutas in sql
changes, then the maildirsize file does not follow

That's a completely different problem, you should have just started a
new thread instead of replying. Anyway, post your dovecot -n output  
and

dovecot-sql.conf contents.


okay, did not know that, attached is my dovecot n and sql conf


The problem is

user_query = SELECT concat('/home/vmail/', maildir) AS home,  
concat('/home/vmail/', maildir) AS maildir, 125 AS uid, 125 AS gid,  
concat('maildir:storage=', floor(quota/1024)) AS quota FROM mailbox  
WHERE username = '%u'


that you're trying to use v1.0 quota configuration with v1.1. You'll  
need in dovecot.conf:


plugin {
  quota = maildir
}

and in user_query:

.., concat('*:bytes=', quota) AS quota_rule FROM ..




Re: [Dovecot] Quota question.

2009-08-28 Thread Benny Pedersen
On Fri, August 28, 2009 23:46, Timo Sirainen wrote:
> On Fri, 2009-08-28 at 23:43 +0200, Benny Pedersen wrote:
>> On Fri 14 Aug 2009 02:51:33 AM CEST, Timo Sirainen wrote
>> in 1.1.16 i have also a problem with quotas, maildirsize file is not
>> created with new size when mailbox is maked, and if qoutas in sql
>> changes, then the maildirsize file does not follow
> That's a completely different problem, you should have just started a
> new thread instead of replying. Anyway, post your dovecot -n output and
> dovecot-sql.conf contents.

okay, did not know that, attached is my dovecot n and sql conf

-- 
xpoint# 1.1.16: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.27-gentoo-r8 x86_64 Gentoo Base System release 1.12.11.1 ext3
base_dir: /var/run/dovecot/
protocols: pop3 imap managesieve pop3s imaps
ssl_listen: *
ssl_ca_file: /etc/ssl/certs/ca-certificates.crt
ssl_cert_file: /etc/ssl/private/home_server.pem
ssl_key_file: /etc/ssl/private/home_privatekey.pem
ssl_cipher_list: ALL:!LOW
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_executable(managesieve): /usr/libexec/dovecot/managesieve-login
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
login_greeting_capability(managesieve): no
login_processes_count: 2
login_max_processes_count: 10
first_valid_uid: 125
last_valid_uid: 125
first_valid_gid: 125
last_valid_gid: 125
mail_location: maildir:/home/vmail/%d/%u/.maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_executable(managesieve): /usr/libexec/dovecot/managesieve
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugins(managesieve): 
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(managesieve): /usr/lib64/dovecot/managesieve
imap_client_workarounds(default): outlook-idle
imap_client_workarounds(imap): outlook-idle
imap_client_workarounds(pop3): 
imap_client_workarounds(managesieve): 
pop3_lock_session(default): no
pop3_lock_session(imap): no
pop3_lock_session(pop3): yes
pop3_lock_session(managesieve): no
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve): 
sieve_storage(default): 
sieve_storage(imap): 
sieve_storage(pop3): 
sieve_storage(managesieve): /home/vmail/%d/%u/.sieve
sieve(default): 
sieve(imap): 
sieve(pop3): 
sieve(managesieve): /home/vmail/%d/%u/.dovecot.sieve
namespace:
  type: private
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  mechanisms: plain login
  worker_max_count: 4
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 438driver = mysql
connect = host=localhost dbname=dbname user=dbuser password=dbpass
default_pass_scheme = MD5-CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT concat('/home/vmail/', maildir) AS home, 
concat('/home/vmail/', maildir) AS maildir, 125 AS uid, 125 AS gid, 
concat('maildir:storage=', floor(quota/1024)) AS quota FROM mailbox WHERE 
username = '%u'

Re: [Dovecot] Quota question.

2009-08-28 Thread Timo Sirainen
On Fri, 2009-08-28 at 23:43 +0200, Benny Pedersen wrote:
> On Fri 14 Aug 2009 02:51:33 AM CEST, Timo Sirainen wrote
> 
> > You should be able to just delete the user's quota row from SQL and then
> > log in as the user and issue "GETQUOTAROOT INBOX" command. That should
> > recalculate the quota, and in my tests a few days ago it did. But some
> > other guy said that he couldn't get it to work.. So, let me know if
> > there is a problem.
> 
> in 1.1.16 i have also a problem with quotas, maildirsize file is not  
> created with new size when mailbox is maked, and if qoutas in sql  
> changes, then the maildirsize file does not follow

That's a completely different problem, you should have just started a
new thread instead of replying. Anyway, post your dovecot -n output and
dovecot-sql.conf contents.



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


Re: [Dovecot] Quota question.

2009-08-28 Thread Benny Pedersen

On Fri 14 Aug 2009 02:51:33 AM CEST, Timo Sirainen wrote


You should be able to just delete the user's quota row from SQL and then
log in as the user and issue "GETQUOTAROOT INBOX" command. That should
recalculate the quota, and in my tests a few days ago it did. But some
other guy said that he couldn't get it to work.. So, let me know if
there is a problem.


in 1.1.16 i have also a problem with quotas, maildirsize file is not  
created with new size when mailbox is maked, and if qoutas in sql  
changes, then the maildirsize file does not follow


* QUOTAROOT "INBOX" "storage=1024000"
* QUOTA "storage=1024000" (STORAGE 860298 2096128)
Getquotaroot completed.

after mysql changed from 2G to 1G qoutas

--
xpoint



Re: [Dovecot] Quota question.

2009-08-17 Thread Tom Diehl

On Mon, 17 Aug 2009, Timo Sirainen wrote:


On Sun, 2009-08-16 at 09:09 -0400, Tom Diehl wrote:

Actually it should be possible to just delete the row and let Dovecot
recalculate the quota on next update, but currently this isn't working.
I've a half-finished patch to make it work, but it's a pretty big
change. v1.2.4 anyway hopefully has it.


Looks like it doesn't make it for v1.2.4. v1.2.5 then.


:-(


I am looking fwd to this fix. I have several thousand mailboxes to migrate in
the next few weeks. Not something that is really practical to do by hand. Maybe
I could script something using expect and a modified db query so that I do not
have to know all of the users passwds.


Do all your users use the same UID? There's an easier way to do this


Yes, they do.


then:

echo "1 getquotaroot inbox" | USER=username dovecot --exec-mail imap


That is really cool!!

Thanks for the help.

I really appreciate it.

Enjoy your vacation!!

Regards,

--
Tom Diehl   tdi...@rogueind.com  Spamtrap address mtd...@rogueind.com


Re: [Dovecot] Quota question.

2009-08-17 Thread Timo Sirainen
On Sun, 2009-08-16 at 09:09 -0400, Tom Diehl wrote:
> > Actually it should be possible to just delete the row and let Dovecot
> > recalculate the quota on next update, but currently this isn't working.
> > I've a half-finished patch to make it work, but it's a pretty big
> > change. v1.2.4 anyway hopefully has it.

Looks like it doesn't make it for v1.2.4. v1.2.5 then.

> I am looking fwd to this fix. I have several thousand mailboxes to migrate in
> the next few weeks. Not something that is really practical to do by hand. 
> Maybe
> I could script something using expect and a modified db query so that I do not
> have to know all of the users passwds.

Do all your users use the same UID? There's an easier way to do this
then:

echo "1 getquotaroot inbox" | USER=username dovecot --exec-mail imap



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


Re: [Dovecot] Quota question.

2009-08-16 Thread Tom Diehl

On Thu, 13 Aug 2009, Timo Sirainen wrote:


On Thu, 2009-08-13 at 10:31 -0400, Tom Diehl wrote:

What is the proper way to get the quota in the database to reflect what is
actually in the users mailbox?

..

   quota: dict:user::proxy::quotadict

..

   quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


You should be able to just delete the user's quota row from SQL and then
log in as the user and issue "GETQUOTAROOT INBOX" command. That should
recalculate the quota, and in my tests a few days ago it did. But some
other guy said that he couldn't get it to work.. So, let me know if
there is a problem.


Thanks for the help. It seems to be working now.



Actually it should be possible to just delete the row and let Dovecot
recalculate the quota on next update, but currently this isn't working.
I've a half-finished patch to make it work, but it's a pretty big
change. v1.2.4 anyway hopefully has it.


I am looking fwd to this fix. I have several thousand mailboxes to migrate in
the next few weeks. Not something that is really practical to do by hand. Maybe
I could script something using expect and a modified db query so that I do not
have to know all of the users passwds.

Does that sound reasonable?

Regards,

--
Tom Diehl   tdi...@rogueind.com  Spamtrap address mtd...@rogueind.com


Re: [Dovecot] Quota question.

2009-08-14 Thread Timo Sirainen

On Aug 14, 2009, at 8:12 AM, Tom Diehl wrote:


2 BAD Error in IMAP command GETQUOTAROOT: Unknown command.


You need to add imap_quota to mail_plugins.



Re: [Dovecot] Quota question.

2009-08-14 Thread Tom Diehl

Hi Timo,

Thanks for the reply.

On Thu, 13 Aug 2009, Timo Sirainen wrote:


On Thu, 2009-08-13 at 10:31 -0400, Tom Diehl wrote:

What is the proper way to get the quota in the database to reflect what is
actually in the users mailbox?

..

   quota: dict:user::proxy::quotadict

..

   quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


You should be able to just delete the user's quota row from SQL and then
log in as the user and issue "GETQUOTAROOT INBOX" command. That should
recalculate the quota, and in my tests a few days ago it did. But some
other guy said that he couldn't get it to work.. So, let me know if
there is a problem.


I tried issuing the "GETQUOTAROOT INBOX" command from a telnet session but
it would seem I am doing something wrong. Below is the telnet session:

(vfoggy pts3) # telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS 
AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
1 login myusern...@mydomain.com my_passwd
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT 
THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE 
UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES 
WITHIN CONTEXT=SEARCH] Logged in
2 GETQUOTAROOT INBOX
2 BAD Error in IMAP command GETQUOTAROOT: Unknown command.
3 logout
* BYE Logging out
3 OK Logout completed.
Connection closed by foreign host.
(vfoggy pts3) #

With debugging turned on I see the following in the logs when I login:

...
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): Loading modules from directory: /usr/lib64/dovecot/imap 
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): Module loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so 
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): Effective uid=512, gid=512, home=/var/spool/vmail/domains/mydomain.com/myusername
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): Quota root: name=user backend=dict args=:proxy::quotadict 
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): dict quota: user=myusern...@mydomain.com, uri=proxy::quotadict, noenforcing=0 
Aug 14 08:02:20 vfoggy dovecot: IMAP(myusern...@mydomain.com): maildir: data=~/

...

When I issue the GETQUOTAROOT command there is nothing logged.

I did this before I deleted the row in SQL so that I could see what it returned
but I suspect that would not make it return "Unknown command".

What am I missing?

Regards,

--
Tom Diehl   tdi...@rogueind.com  Spamtrap address mtd...@rogueind.com


Re: [Dovecot] Quota question.

2009-08-13 Thread Timo Sirainen
On Thu, 2009-08-13 at 10:31 -0400, Tom Diehl wrote:
> What is the proper way to get the quota in the database to reflect what is
> actually in the users mailbox?
..
>quota: dict:user::proxy::quotadict
..
>quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf

You should be able to just delete the user's quota row from SQL and then
log in as the user and issue "GETQUOTAROOT INBOX" command. That should
recalculate the quota, and in my tests a few days ago it did. But some
other guy said that he couldn't get it to work.. So, let me know if
there is a problem.

Actually it should be possible to just delete the row and let Dovecot
recalculate the quota on next update, but currently this isn't working.
I've a half-finished patch to make it work, but it's a pretty big
change. v1.2.4 anyway hopefully has it.



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