dovecot 1.2+ show quota utilization in PA2.3+

krpi
2011-03-17
2013-01-23
  • krpi

    krpi - 2011-03-17

    Hello,

    is possible to show quota utilization? (in postfixadmin admin interface i have now 0/200MB and I want to see how much user has filled his quota for expample 58/200MB).  My configuration is: postfix, dovecot, assp, postfixadmin + mysql. Everything is working (quota, expire, autocreate, vacation, postfixadmin, …)

    Working cfg please (dovecot.conf , dovecot-dict-sql.conf, postfixadmin,)

    My config:
    dovecot.conf:
    auth default {
      mechanisms = plain login
      passdb sql {
        args = /etc/dovecot/dovecot-sql.conf
      }
      userdb sql {
        args = /etc/dovecot/dovecot-sql.conf
      }
      userdb prefetch {
      }
      user = nobody
      socket listen {
        master {
          path = /var/run/dovecot/auth-master
          mode = 0660
          user = vmail
          group = vmail
        }
        client {
          path = /var/spool/postfix/private/auth
          mode = 0660
          user = postfix
          group = mail
        }
      }
    }

    plugin {
       quota = maildir:Kvota uzivatele
       quota_rule = *:storage=200MB
       quota_rule2 = Trash:ignore
       quota_rule3 = Spam:ignore
    }
    etc…

    dovecot-sql.conf

    driver = mysql
    connect = host=localhost dbname=postfix user=dovecot password=XXXXXXXXX
    user_query = SELECT concat('/iscsi/vmail/', maildir) as home, \
    concat('maildir:/iscsi/vmail/', maildir) as mail, \
    5001 AS uid, \
    5001 AS gid, \
    concat('*:storage=', FLOOR(quota/1024) ) AS quota_rule, \
    concat('Trash:storage=', FLOOR(quota/1024/4)) AS quota_rule2, \
    'Spam:ignore' AS quota_rule3 \
    FROM mailbox WHERE username = '%u' AND active = '1'
    password_query = SELECT username as user, password, concat('/iscsi/vmail/', maildir) as userdb_home, \
    concat('maildir:/iscsi/vmail/', maildir) as userdb_mail, \
    5001 as userdb_uid, \
    5001 as userdb_gid, \
    concat('*:storage=', FLOOR(quota/1024) ) AS userdb_quota_rule, \
    concat('Trash:storage=', FLOOR(quota/1024/4)) AS userdb_quota_rule2, \
    'Spam:ignore' AS userdb_quota_rule3 \
    FROM mailbox WHERE username = '%u' AND active = '1'

    postfixadmin conf

    $CONF = 'mysqli';
    $CONF = 'localhost';
    $CONF = 'postfixadmin';
    $CONF = 'XxXxXXXX';
    $CONF = 'postfix';

    $CONF = array (
       'admin' => 'admin',
       'alias' => 'alias',
       'domain' => 'domain',
       'domain_admins' => 'domain_admins',
       'log' => 'log',
       'mailbox' => 'mailbox',
       'vacation' => 'vacation'
    );
    $CONF = '1048576';
    $CONF = 'YES';
    $CONF = 'YES';

    end etc…

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks