dovecot 不计算 ~Maildir/.INBOX 的配额

dovecot 不计算 ~Maildir/.INBOX 的配额

doveadm 配额获取-u[电子邮件保护]

Quota name Type    Value Limit                                                               %
User quota STORAGE  1323 10240                                                              12
User quota MESSAGE     2     -                                                               0

/home/vmail/domain01.org/user01/Maildir/du -h|sort -h

4.0K    ./.Drafts/new
4.0K    ./.Drafts/tmp
4.0K    ./.INBOX/cur
4.0K    ./.INBOX/new
4.0K    ./.INBOX/tmp
4.0K    ./.Trash/cur
4.0K    ./.Trash/new
4.0K    ./.Trash/tmp
4.0K    ./new
4.0K    ./tmp
24K     ./.INBOX
24K     ./.Trash
1.4M    ./.Drafts
1.4M    ./.Drafts/cur
16M     ./cur
17M     .

新邮件发送到 ./cur/ (我发送了两封邮件,每封 8Mb)并且 dovecot 不会将 ./cur/ 算作引用,而是保存草稿消息 dovecot 升级配额

我有真正的 PAM unix 电子邮件用户

/home/user/Maildir/

和虚拟用户

/home/vmail/domain1.org/user1/Maildir

在 /etc/dovecot/conf.f/10-mail 中

[...]
mail_location = maildir:~/Maildir
mail_home = maildir:/home/vmail/%d/%n/Maildir:INBOX=/home/vmail/%d/%n/Maildir/.INBOX
[...]

doveconf-n

auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = login plain
auth_verbose = yes
auth_verbose_passwords = yes
debug_log_path = /var/log/dovecot.debug
disable_plaintext_auth = no
info_log_path = /var/log/dovecot.info
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_debug = yes
mail_home = maildir:/home/vmail/%d/%n/Maildir:INBOX=/home/vmail/%d/%n/Maildir/.INBOX
mail_location = maildir:~/Maildir
mail_plugins = " quota"
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags notify
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
  subscriptions = yes
  type = private
}
passdb {
  driver = pam
}
passdb {
  args = scheme=SHA256 username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename append flag_change
  mail_log_fields = uid box msgid size from subject vsize
  quota = maildir:User quota
  quota_rule = *:storage=10M
  quota_rule2 = Junk:storage=+1M
  quota_rule3 = SPAM:storage=+1M
  quota_warning = storage=90%% quota-warning 90 %u
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_extensions = +notify +imapflags
}
protocols = " imap sieve pop3 sieve"
quota_full_tempfail = yes
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  service_count = 1
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service quota-warning {
  executable = script /root/bin/quota-warning.sh
  unix_listener quota-warning {
    mode = 0666
    user = vmail
  }
  user = root
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_dh_parameters_length = 2048
ssl_key =  # hidden, use -P to show it
userdb {
  driver = passwd
}
userdb {
  args = scheme=SHA256 username_format=%u /etc/dovecot/users
  driver = passwd-file
}
userdb {
  args = uid=vmail gid=vmail home=/home/vmail/%d/%n
  driver = static
}
verbose_proctitle = yes
protocol lda {
  mail_plugins = " quota sieve quota"
}
protocol imap {
  mail_plugins = " quota imap_quota"
}

相关内容