[Dovecot] Quota is not working (Debian Squeeze - Dovecot 1.2) SOLVED

RaSca rasca at miamammausalinux.org
Mon Jan 23 17:04:17 EET 2012


Il giorno Mer 18 Gen 2012 15:56:41 CET, Timo Sirainen ha scritto:
[...]
> You're using SQL only for passdb lookup.
[...]
> user_query isn't used, because you aren't using userdb sql.

Hi Timo,
thank you, I confirm everything you wrote. In order to help someone with
the same problem, when using virtual profiles in mysql, there must be
declared both passwd sql (necessary to verify the authentication) and
userdb sql (necessary to verify the user informations).
For every value that has not a specific user override it is possible to
declare a global value in the plugin area (and there must be also "a
quota = maildir:User quota" declaration).

In the end, with this configuration the quota plugin works (the sql file
remains the same I first posted):

protocols = imap pop3
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/mail/mailboxes/%d/%u
mail_privileged_group = mail
#mail_debug = yes
#auth_debug = yes
mail_nfs_storage = yes
mmap_disable=yes
fsync_disable=no
mail_nfs_index = yes

protocol imap {
  mail_plugins = quota imap_quota
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  mail_plugins = quota
}

protocol managesieve {
}

protocol lda {
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = postmaster@<mydomain>
    mail_plugins = sieve quota
    quota_full_tempfail = no
}

auth default {
  mechanisms = plain

  userdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

  user = root

  socket listen {
    master {
        path = /var/run/dovecot/auth-master
        mode = 0600
        user = vmail
    }
    client {
        path = /var/spool/postfix/private/auth
        mode = 0660
        user = postfix
        group = postfix
    }
   }
}

plugin {
  quota = maildir:User quota
  quota2 = fs:Disk quota
  quota_rule = *:storage=1G
  quota_warning = storage=95%% /mail/scripts/quota-warning.sh 95
  quota_warning2 = storage=80%% /mail/scripts/quota-warning.sh 80
  sieve_global_path = /mail/sieve/globalsieverc
}


-- 
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
rasca at miamammausalinux.org
http://www.miamammausalinux.org



More information about the dovecot mailing list