feat(mail): 增强邮件限流与配额配置
- 新增 IMAP/POP3 事件表与清理任务,并接入 Dovecot auth policy。 - 暴露默认权限限额接口,前端权限组页面改为动态读取。 - 为 Dovecot 配置用户配额、连接数限制和 auth policy。
This commit is contained in:
@@ -10,6 +10,20 @@ ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key
|
||||
|
||||
mail_home = /var/mail/vhosts/%d/%n
|
||||
mail_max_userip_connections = 10
|
||||
|
||||
plugin {
|
||||
quota = maildir:User quota
|
||||
quota_rule = *:storage=1G
|
||||
# auth_policy_server is configured via dovecot-sql.conf.ext user_query
|
||||
}
|
||||
|
||||
auth_policy_server_url = http://127.0.0.1:8080/auth-policy
|
||||
auth_policy_server_api_header = Content-Type: application/json
|
||||
auth_policy_hash_mech = sha256
|
||||
auth_policy_hash_truncate = 12
|
||||
auth_policy_request_fields = protocol=imap username=user
|
||||
|
||||
namespace inbox {
|
||||
inbox = yes
|
||||
mailbox Drafts {
|
||||
@@ -38,6 +52,14 @@ userdb {
|
||||
args = /etc/dovecot/dovecot-sql.conf.ext
|
||||
}
|
||||
|
||||
protocol imap {
|
||||
mail_plugins = quota imap_quota
|
||||
}
|
||||
|
||||
protocol pop3 {
|
||||
mail_plugins = quota
|
||||
}
|
||||
|
||||
service imap-login {
|
||||
inet_listener imaps {
|
||||
port = 993
|
||||
|
||||
Reference in New Issue
Block a user