Статья в продолжении статьи Установка и настройка почтовой связки на основе Postfix+Dovecot+MySQL+PostfixAdmin+Roundcube на Debian 7/ Ubuntu 14.04 Настройка PostfixAdmin
|
# nano /usr/share/postfixadmin/config.inc.php |
|
$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
|
# nano /etc/dovecot/conf.d/10-mail.conf |
|
mail_plugins = $mail_plugins quota |
|
# nano /etc/dovecot/conf.d/20-imap.conf |
|
protocol imap { mail_plugins = $mail_plugins imap_quota } |
|
# nano /etc/dovecot/conf.d/10-master.conf |
|
service dict { unix_listener dict { mode = 0660 user = vmail group = mail } |
|
# nano /etc/dovecot/conf.d/90-quota.conf |
|
plugin { quota = dict:User quota::proxy::quota } |
|
# nano /etc/dovecot/dovecot.conf |
|
dict { quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } |
|
# nano /etc/dovecot/dovecot-dict-sql.conf.ext |
|
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
|
# nano /etc/dovecot/dovecot-sql.conf.ext |
|
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' |
Применяем сделанные настройки […]