在这个特定的设置中,我想禁止客户创build邮箱以外的默认邮箱。 我在文档中search了这个,但什么都没发现。
我正在使用Dovecot与虚拟用户。
Dovecot支持IMAP ACL扩展,允许configuration精细的邮箱权限。 其中, create许可允许(或拒绝)创build新的(子)邮箱。
按照Dovecotconfiguration手册中的描述启用ACL插件,方法是编辑dovecot.conf (或通过您的发行版设置相应的conf.d文件)。 从Dovecot手册:
mail_plugins = acl protocol imap { mail_plugins = $mail_plugins imap_acl } plugin { # Without global ACLs: acl = vfile # With global ACL files in /etc/dovecot/dovecot-acls file (v2.2.11+): #acl = vfile:/etc/dovecot/dovecot-acl # With global ACLs in /etc/dovecot/acls/ directory (obsolete): #acl = vfile:/etc/dovecot/acls # If enabled, don't try to find dovecot-acl files from mailbox directories. # This reduces unnecessary disk I/O when only global ACLs are used. (v2.2.31+) #acl_globals_only = yes }
而不是手动编辑ACL文件,使用Dovecot的pipe理工具doveadm acl是首选。 要删除创build权限,请使用以下命令行(不要delete整个ACL,也可能在启动之前create一个)。 -u user表示邮箱所有者(即,要更改邮箱的用户)。 id表示要修改ACL的用户(也可以通过ACL访问其他用户),例如user=user_name或anyone 。
doveadm acl remove [-u user|-A|-F file] [-S socket_path] mailbox id right [right ...]
您可能还想了解有关ACLinheritance的信息 ,尽pipe这不重要,因为您要拒绝创build新邮箱。