Статья в продолжении статьи Установка и настройка почтовой связки на основе Postfix+Dovecot+MySQL+PostfixAdmin+Roundcube на Debian 7/ Ubuntu 14.04 Настройка PostfixAdmin
1 |
# nano /usr/share/postfixadmin/config.inc.php |
1 2 3 4 5 6 7 |
$CONF['maxquota'] = '0'; $CONF['domain_quota_default'] = '0'; $CONF['quota'] = 'YES'; $CONF['domain_quota'] = 'NO'; $CONF['quota_multiplier'] = '1024000'; $CONF['used_quotas'] = 'YES'; $CONF['new_quota_table'] = 'YES'; |
Перезапуск Nginx/Apache сервера Настройка Dovecot
1 |
# nano /etc/dovecot/conf.d/10-mail.conf |
1 |
mail_plugins = $mail_plugins quota |
1 |
# nano /etc/dovecot/conf.d/20-imap.conf |
1 2 3 |
protocol imap { mail_plugins = $mail_plugins imap_quota } |
1 |
# nano /etc/dovecot/conf.d/10-master.conf |
1 2 3 4 5 6 |
service dict { unix_listener dict { mode = 0660 user = vmail group = mail } |
1 |
# nano /etc/dovecot/conf.d/90-quota.conf |
1 2 3 |
plugin { quota = dict:User quota::proxy::quota } |
1 |
# nano /etc/dovecot/dovecot.conf |
1 2 3 |
dict { quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } |
1 |
# nano /etc/dovecot/dovecot-dict-sql.conf.ext |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
connect = host=localhost dbname=postfix user=postfixuser password=postfixpassword map { pattern = priv/quota/storage table = quota2 username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota2 username_field = username value_field = messages } |
Для Dovecot версии 1.2 и выше используется таблица quota2 вместо таблицы quota
1 |
# nano /etc/dovecot/dovecot-sql.conf.ext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
driver = mysql connect = host=localhost dbname=postfix user=postfixuser password=postfixapassword default_pass_scheme = MD5-CRYPT user_query = \ SELECT '/var/vmail/%d/%n' as home, \ 'maildir:/var/vmail/%d/%n' as mail, \ 1150 AS uid, 8 AS gid, concat('*:bytes=', quota) AS quota_rule \ FROM mailbox WHERE username = '%u' AND active = '1' password_query = \ SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, \ 'maildir:/var/vmail/%d/%n' as userdb_mail, 1150 as userdb_uid, 8 as userdb_gid \ FROM mailbox WHERE username = '%u' AND active = '1' |
Применяем сделанные настройки […]