Current time: 11-29-2024, 10:48 PM Hello There, Guest! (LoginRegister)


Post Reply 
Roundcube quota error
Author Message
saracibar Offline
Newbie
*

Posts: 5
Joined: Jan 2009
Reputation: 0
Post: #1
Roundcube quota error
Hi, I wonder if anyone in here has Roundcube running as the webmail application and if the quota feature that appears at the bottom of the roundcube screen works properly. In my case Roundcube works pretty well except for this quota feature that will always show the "no limit" message no matter the limit and use that the email account in question has. I am not sure if this is something to do with the IMAP configuration, the Courier one or even if it is a bug in Roundcube, that's why I am asking to the forum before I start trying to sort this out. I'd appreciate any sort of feedback or advice on this.
02-28-2009 05:35 PM
Find all posts by this user Quote this message in a reply
saracibar Offline
Newbie
*

Posts: 5
Joined: Jan 2009
Reputation: 0
Post: #2
RE: Roundcube quota error
Anyone?
03-07-2009 03:34 AM
Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #3
RE: Roundcube quota error
with dovecot and enabled imap quota it works flawless... don't know about courier...
03-07-2009 03:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: Roundcube quota error
Quote:with dovecot and enabled imap quota it works flawless...
Yeah ? I did also try it now but have the same Problem:
[Image: quotan.th.jpg]

I enabled the debug Modus in the dovecotc.conf.
Here is the output from the mail.log
Code:
Mar  6 21:18:05 vsXXXXX dovecot: Dovecot v1.0.15 starting up
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(pysieved): mysql: Connected to localhost (ispcp)
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(pysieved): mysql: Connected to localhost (ispcp)
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(pysieved): mysql: Connected to localhost (ispcp)
Mar  6 21:18:05 vsXXXXX dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Mar  6 21:18:32 vsXXXXX dovecot: imap-login: Login: user=<bene@mydomain.tld>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Effective uid=1000, gid=8, home=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Namespace: type=private, prefix=INBOX., sep=, inbox=yes, hidden=no, subscriptions=no
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: data=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: root=/var/mail/virtual/mydomain.tld/bene, index=/var/mail/virtual/mydomain.tld/bene, control=, inbox=
Mar  6 21:18:32 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Disconnected: Logged out
Mar  6 21:18:33 vsXXXXX dovecot: imap-login: Login: user=<bene@mydomain.tld>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Effective uid=1000, gid=8, home=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Namespace: type=private, prefix=INBOX., sep=, inbox=yes, hidden=no, subscriptions=no
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: data=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: root=/var/mail/virtual/mydomain.tld/bene, index=/var/mail/virtual/mydomain.tld/bene, control=, inbox=
Mar  6 21:18:33 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Disconnected: Logged out
Mar  6 21:18:36 vsXXXXX dovecot: imap-login: Login: user=<bene@mydomain.tld>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Effective uid=1000, gid=8, home=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Namespace: type=private, prefix=INBOX., sep=, inbox=yes, hidden=no, subscriptions=no
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: data=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: root=/var/mail/virtual/mydomain.tld/bene, index=/var/mail/virtual/mydomain.tld/bene, control=, inbox=
Mar  6 21:18:36 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Disconnected: Logged out
Mar  6 21:18:40 vsXXXXX dovecot: imap-login: Login: user=<bene@mydomain.tld>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Loading modules from directory: /usr/lib/dovecot/modules/imap
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Effective uid=1000, gid=8, home=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Namespace: type=private, prefix=INBOX., sep=, inbox=yes, hidden=no, subscriptions=no
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: data=/var/mail/virtual/mydomain.tld/bene
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): maildir: root=/var/mail/virtual/mydomain.tld/bene, index=/var/mail/virtual/mydomain.tld/bene, control=, inbox=
Mar  6 21:18:40 vsXXXXX dovecot: IMAP(bene@mydomain.tld): Disconnected: Logged out
Looks like the Quota Modul is loaded. Of course there is a quota in the ispCP DB. I used the 10MB default and did not changed it. Before i did changed the dovecot and add the Quota like:
Code:
protocol imap {
     mail_plugins = quota imap_quota
   }
   protocol pop3 {
    mail_plugins = quota
   }
   protocol lda {
    mail_plugins = quota
   }
and modified the dovecot-sql-domain.conf as described in the HowTo:
Code:
user_query = SELECT concat('/var/mail/virtual/', domain.domain_name, '/',mail_acc) as home, '1001' as uid, '8' as gid, concat('maildir:storage=', floor(quota/1024)) AS quota FROM mail_users inner join domain on mail_users.domain_id = domain.domain_id WHERE mail_acc='%n' and (mail_type='normal_mail' OR mail_type='normal_mail,normal_forward');
the Text "Speicherplatz: unbegrenzt" was not there.
So roundcube understand the new feature in any way, but no correct ?!
(The only thing i changed was the UID i did.)

Here is my dovecot config:
Code:
dovecot -n
# 1.0.15: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
protocols: imap pop3 imaps pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_access_groups: mail
mail_location: maildir:/var/mail/virtual/%d/%n
mail_debug: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %u-%v
namespace:
  type: private
  prefix: INBOX.
  inbox: yes
auth pysieved:
  mechanisms: plain login
  verbose: yes
  passdb:
    driver: checkpassword
    args: /var/www/ispcp/engine/ispcp-dovecot-mngr
  userdb:
    driver: prefetch
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-domain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-aliasdomain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-subdomain.conf
  socket:
    type: listen
    client:
      path: /var/run/pysieved/auth
      mode: 432
      user: vmail
      group: mail
    master:
      path: /var/run/pysieved/auth-master
      mode: 432
      user: vmail
      group: mail
auth default:
  mechanisms: plain login
  verbose: yes
  passdb:
    driver: checkpassword
    args: /var/www/ispcp/engine/ispcp-dovecot-mngr
  userdb:
    driver: prefetch
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-domain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-aliasdomain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-subdomain.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: 432
      user: vmail
      group: mail
I checked it many time but cant find the error Rolleyes
BTW: Is the change in the sql File not also needed for Alias and subdomains ?

Greez BeNe

//EDIT
Is there the
Code:
and domain.domain_name='%d'
missing in the new sqlfile ?
(This post was last modified: 03-07-2009 07:42 AM by BeNe.)
03-07-2009 07:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #5
RE: Roundcube quota error
i use quota rules:
add to plugin section:
plugin {
quota = maildir:User quota
quota_rule = *:storage=1G
}

where 1G means default quota is 1 GByte.

then in the sql config:
SELECT concat('/var/mail/virtual/', domain.domain_name, '/',mail_acc) as home, '1001' as uid, '8' as gid, concat(''*:bytes='', quota) AS quota_rule FROM mail_users inner join domain on mail_users.domain_id = domain.domain_id WHERE mail_acc='%n' and (mail_type='normal_mail' OR mail_type='normal_mail,normal_forward');

this overrides the 1G Default with the value specified in the quota field (quota is assumed to be stored in bytes...)

I use this in an no ispcp setup so it is not tested to work with ispcp...
(This post was last modified: 03-07-2009 08:08 AM by rbtux.)
03-07-2009 08:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #6
RE: Roundcube quota error
Ah, i understand.

But now i get this Error in the mail.log after the change (debug modus)
Code:
maildir quota: Unknown setting: User quota
The problem is the same -> "Speicherplatz: unbegrenzt"

Here is the new dovecot config:
Code:
dovecot -n
# 1.0.15: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
protocols: imap pop3 imaps pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_access_groups: mail
mail_location: maildir:/var/mail/virtual/%d/%n
mail_debug: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %u-%v
namespace:
  type: private
  prefix: INBOX.
  inbox: yes
auth pysieved:
  mechanisms: plain login
  verbose: yes
  passdb:
    driver: checkpassword
    args: /var/www/ispcp/engine/ispcp-dovecot-mngr
  userdb:
    driver: prefetch
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-domain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-aliasdomain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-subdomain.conf
  socket:
    type: listen
    client:
      path: /var/run/pysieved/auth
      mode: 432
      user: vmail
      group: mail
    master:
      path: /var/run/pysieved/auth-master
      mode: 432
      user: vmail
      group: mail
auth default:
  mechanisms: plain login
  verbose: yes
  passdb:
    driver: checkpassword
    args: /var/www/ispcp/engine/ispcp-dovecot-mngr
  userdb:
    driver: prefetch
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-domain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-aliasdomain.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql-subdomain.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: 432
      user: vmail
      group: mail
plugin:
  quota: maildir:User quota
  quota_rule: *:storage=1G
Or should this be imap_quota instead of User quota ?

Greez BeNe
(This post was last modified: 03-07-2009 08:58 AM by BeNe.)
03-07-2009 08:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #7
RE: Roundcube quota error
nope this was correct... BUT I assumed u have a 1.1 release... now I saw you have 1.0.15... this release understands no quota_rules...

Hmm maybe roundcude relies on quota rules??
03-07-2009 09:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #8
RE: Roundcube quota error
Quote:BUT I assumed u have a 1.1 release... now I saw you have 1.0.15... this release understands no quota_rules...
Good to know, so i will use Backport or precompiled Repositories and we will see Wink

Thanks for info!
Greez BeNe
03-07-2009 09:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: Roundcube quota error
1h later -> Updated to Version 1.1.9 and it works Wink
[Image: quota2.th.jpg]
Also in Thunderbird now:
[Image: thunderbird.th.jpg]

Now i want to try to switch back to the Quota in the MySQL Tables that comes with ispCP. So i can set a quota per User

BTW: What about the Postfix Quota ?
Did you get this running ?

/etc/postfix/main.cf
Code:
#
# Quota support; activate, if avaible/used
#

virtual_create_maildirsize     = yes
virtual_mailbox_extended       = yes
virtual_mailbox_limit_maps     = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message  = "The user you're trying to reach is over mailbox quota."
virtual_overquota_bounce       = yes
etc/postfix/mysql_virtual_mailbox_limit_maps.cf is empty and does not exist on my system.

Would be also a nice feature Smile

Greez BeNe
(This post was last modified: 03-07-2009 10:51 AM by BeNe.)
03-07-2009 10:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #10
RE: Roundcube quota error
problem with quoting in the mysql query string... please post the complete string!

About postfix postfix... No I don't have it implemented. I rather have the mails stuck in my queue as bounced to the sender... So I am able to get in touch with the customer and after he deleted some messages or bought more quota I can flush the queue and he receive his mails...
(03-07-2009 10:52 AM)rbtux Wrote:  About postfix postfix...

Hmm I might need some sleep ;-) About postfix quota...
ok to late ;-)
(This post was last modified: 03-07-2009 10:56 AM by rbtux.)
03-07-2009 10:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 10 Guest(s)