LINUX.ORG.RU
ФорумAdmin

Dovecot quota

 , ,


0

1

Добрый времени суток. Не получается настроит квоту в довекот. Выдает такую ошибку. Прошу помочь. Спасибо.

[root@mail dovecot]# doveadm quota get -u test123@khujandi.com doveadm(test123@khujandi.com): Error: Quota not enabled Quota name Type Value Limit %

Перемещено hobbit из redhat

Ответ на: комментарий от Pinkbyte

## ## Quota configuration. ##

# Note that you also have to enable quota plugin in mail_plugins setting. # <doc/wiki/Quota.txt>

## ## Quota limits ##

# Quota limits are set using «quota_rule» parameters. To get per-user quota # limits, you can set/override them by returning «quota_rule» extra field # from userdb. It's also possible to give mailbox-specific limits, for example # to give additional 100 MB when saving to Trash:

plugin { quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M

# LDA/LMTP allows saving the last mail to bring user from under quota to # over quota, if the quota doesn't grow too high. Default is to allow as # long as quota will stay under 10% above the limit. Also allowed e.g. 10M. quota_grace = 10%%

# Quota plugin can also limit the maximum accepted mail size. #quota_max_mail_size = 100M }

## ## Quota warnings ##

# You can execute a given command when user exceeds a specified quota limit. # Each quota root has separate limits. Only the command for the first # exceeded limit is excecuted, so put the highest limit first. # The commands are executed via script service by connecting to the named # UNIX socket (quota-warning below). # Note that % needs to be escaped as %%, otherwise «% » expands to empty.

plugin { quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u }

# Example quota-warning service. The unix listener's permissions should be # set in a way that mail processes can connect to it. Below example assumes # that mail processes run as vmail user. If you use mode=0666, all system users # can generate quota warnings to anyone. #service quota-warning { # executable = script /usr/local/bin/quota-warning.sh # user = dovecot # unix_listener quota-warning { # user = vmail # } #}

## ## Quota backends ##

# Multiple backends are supported: # dirsize: Find and sum all the files found from mail directory. # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O. # dict: Keep quota stored in dictionary (eg. SQL) # maildir: Maildir++ quota # fs: Read-only support for filesystem quota

plugin { #quota = dirsize:User quota #quota = maildir:User quota quota = dict:User quota::proxy::quota #quota = fs:User quota }

# Multiple quota roots are also possible, for example this gives each user # their own 100MB quota and one shared 1GB quota within the domain: plugin { #quota = dict:user::proxy::quota #quota2 = dict:domain:%d:proxy::quota_domain #quota_rule = *:storage=102400 #quota2_rule = *:storage=1048576 }

Jahongir
() автор топика
Ответ на: комментарий от Pinkbyte

В начале у меня была такая ошибка:

Fatal: Unknown command ‘quota’, but plugin quota exists. Try to set mail_plugins=quota

Для исправление я добавил в файл /etc/dovecot/dovecot.conf:

mail_plugins=quota

После уже пишет данную ошибку :

[root@mail dovecot]# doveadm quota get -u test123@khujandi.com doveadm(test123@khujandi.com): Error: Quota not enabled Quota name Type Value Limit %

Jahongir
() автор топика
Ответ на: комментарий от Jahongir

Ну дык естественно:

plugin { #quota = dirsize:User quota #quota = maildir:User quota quota = dict:User quota::proxy::quota #quota = fs:User quota }

Сами настройки квоты ты включил, а какой именно плагин использовать(dirsize, maildir или dict) - нет, вот тебе и жалуются.

Подробности тут

Pinkbyte ★★★★★
()
Последнее исправление: Pinkbyte (всего исправлений: 1)
Ответ на: комментарий от Pinkbyte

[root@mail /]# doveadm quota get -u inventar1@khujandi.com doveadm(inventar1@khujandi.com): Error: dict-client: Lookup 'priv/quota/storage' failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=1000(vmail) egid=1000(vmail) missing +r perm: /var/run/dovecot/dict, dir owned by 0:97 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks)) doveadm(inventar1@khujandi.com): Error: dict-client: Lookup 'priv/quota/messages' failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=1000(vmail) egid=1000(vmail) missing +r perm: /var/run/dovecot/dict, dir owned by 0:97 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks)) Quota name Type Value Limit % User quota STORAGE error error error User quota MESSAGE error error error

Jahongir
() автор топика
Ответ на: комментарий от Jahongir

Очевидные проблемы с правами. Проверяй от какого пользователя запущен dovecot(там может быть несколько процессов, pstree в помощь) и какие права на указанный в ошибке файл-сокет

Pinkbyte ★★★★★
()
Ответ на: комментарий от Dimez

[root@mail /]# doveadm quota get -u inventar1@khujandi.com

doveadm(inventar1@khujandi.com): Error: dict-client: Lookup ‘priv/quota/storage’ failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=1000(vmail) egid=1000(vmail) missing +r perm: /var/run/dovecot/dict, dir owned by 0:97 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))

doveadm(inventar1@khujandi.com): Error: dict-client: Lookup ‘priv/quota/messages’ failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=1000(vmail) egid=1000(vmail) missing +r perm: /var/run/dovecot/dict, dir owned by 0:97 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))

Quota name Type Value Limit %

User quota STORAGE error error error

User quota MESSAGE error error error

Jahongir
() автор топика
Ответ на: комментарий от Pinkbyte

[root@mail /]# ps aux | grep dovecot

root 12920 0.0 0.0 16092 1136 ? Ss 15:20 0:03 /usr/sbin/dovecot

dovecot 12921 0.0 0.0 9752 1112 ? S 15:20 0:01 dovecot/anvil

root 12922 0.0 0.0 9884 1304 ? S 15:20 0:01 dovecot/log

root 12924 0.0 0.0 19364 2760 ? S 15:20 0:04 dovecot/config

dovecot 12927 0.0 0.1 156224 5032 ? S 15:20 0:02 dovecot/auth

root 12929 0.0 0.1 156000 5056 ? S 15:20 0:03 dovecot/auth -w

root 12933 0.0 0.0 9748 860 ? S 15:20 0:00 dovecot/ssl-params

postfix 19520 0.0 0.1 89960 4100 ? S 16:52 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

dovenull 19549 0.0 0.1 44240 3964 ? S 16:52 0:00 dovecot/imap-login

vmail 19550 0.0 0.0 22084 2864 ? S 16:52 0:00 dovecot/imap

dovenull 19551 0.0 0.1 44240 3964 ? S 16:52 0:00 dovecot/imap-login

vmail 19552 0.0 0.0 21840 2220 ? S 16:52 0:00 dovecot/imap

dovenull 20355 0.0 0.1 44232 3432 ? S 17:02 0:00 dovecot/pop3-login

postfix 20390 0.0 0.1 89960 4108 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20391 0.0 0.1 89960 4048 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20393 0.0 0.1 89960 4108 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20395 0.0 0.1 89960 4104 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20398 0.0 0.1 89960 4104 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20400 0.0 0.1 89960 4104 ? S 17:03 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

dovenull 20419 0.0 0.1 44232 3432 ? S 17:03 0:00 dovecot/pop3-login

dovenull 20440 0.0 0.1 44232 3432 ? S 17:03 0:00 dovecot/pop3-login

postfix 20471 0.0 0.1 89960 4044 ? S 17:04 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

postfix 20475 0.0 0.1 89960 4048 ? S 17:04 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

root 20477 0.1 0.1 156000 4824 ? S 17:04 0:00 dovecot/auth -w

root 20518 0.3 0.1 156000 4832 ? S 17:05 0:00 dovecot/auth -w

root 20521 0.4 0.1 156000 4824 ? S 17:05 0:00 dovecot/auth -w

root 20532 0.0 0.0 112816 948 pts/1 S+ 17:05 0:00 grep –color=auto dovecot

[root@mail /]#

Jahongir
() автор топика