Dovecot无法创建新的用户邮箱

时间:2019-05-16 06:32:00

标签: linux debian postfix-mta dovecot

我在Debian上有一个postfix-dovecot邮件服务器。 我也在该系统上安装了postfixadmin,它将新的用户数据正确地写入Mysql。 我的问题是,当我向新的邮箱用户发送新邮件或尝试登录时,Dovecot无法创建用户目录(/ var / vmail / user / {cur,new,tmp})。 实际的用户(先前创建的用户)现在正在工作。

我认为这不是权限问题,因为vmail用户可以写入目录。 dovecot-lda不会尝试创建它。 如果我手动创建这些目录,邮箱将开始工作。

没有目录,我只在dovecot.log中看到以下几行:

“ lda(teszt@domain.org):错误:用户初始化失败:命名空间”:邮件位置设置不明确,不知道如何处理:domain.org/teszt/(尝试使用mbox为其前缀:或maildir :)“

一些配置部分: 鸽舍:

 # 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.9.0-9-686-pae i686 Debian 9.9
auth_debug = yes
auth_mechanisms = plain cram-md5 digest-md5 ntlm
auth_verbose = yes
dict {
sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
info_log_path = /var/log/dovecot/dovecot_info.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot/dovecot.log
mail_debug = yes
mail_gid = 5000
mail_location = mbox:~/mail:INBOX=/var/vmail/%d/%n
mail_max_userip_connections = 25
mail_plugins = " quota"
mail_privileged_group = vmail
mail_uid = 5000
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
namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
separator = /
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
quota = dict:User quota::proxy::sqlquota
quota_exceeded_message = This message was rejected because it would exceed the quota for the mailbox.
quota_rule2 = Trash:storage=+100M
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
sieve = /var/vmail/%d/%n/sieve/dovecot.sieve
sieve_default = /var/lib/dovecot/sieve/default.sieve
sieve_dir = /var/vmail/%d/%n/sieve
sieve_global = /var/lib/dovecot/sieve/global/
sieve_global_dir = /var/lib/dovecot/sieve/
sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
protocols = " imap sieve pop3 sieve"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
}
}
service dict {
unix_listener dict {
group = vmail
mode = 0600
user = vmail
}
}
service imap-login {
inet_listener imap {
address = 127.0.0.1
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
process_limit = 256
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service pop3-login {
inet_listener pop3 {
address = 127.0.0.1
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
process_limit = 256
}
service quota-warning {
executable = script /usr/local/bin/quota-warning.sh
unix_listener quota-warning {
user = vmail
}
user = dovecot
}
ssl_cert = </etc/letsencrypt/live/domain.org/fullchain.pem
ssl_key = # hidden, use -P to show it
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lmtp {
auth_socket_path = /var/run/dovecot/auth-master
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = " quota sieve quota"
}
protocol imap {
mail_max_userip_connections = 25
mail_plugins = " quota imap_quota"
}
protocol sieve {
info_log_path = /var/log/dovecot-sieve.log
log_path = /var/log/dovecot-sieve-errors.log
mail_max_userip_connections = 25
managesieve_max_line_length = 65536
}
protocol pop3 {
mail_max_userip_connections = 25
}

后缀:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
body_checks = pcre:/etc/postfix/maps/body_checks
bounce_queue_lifetime = 2d
broken_sasl_auth_clients = yes
content_filter = amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
header_checks = pcre:/etc/postfix/maps/header_checks
inet_interfaces = all
local_transport = dovecot
mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT"
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
maximal_queue_lifetime = 2d
message_size_limit = 20971520
milter_default_action = accept
milter_protocol = 2
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
myhostname = domain.org
mynetworks = 127.0.0.0/8, [::ffff:127.0.0.0]/104, [::1]/128, <public_IP>
myorigin = /etc/mailname
non_smtpd_milters = inet:localhost:12301
policyd-spf_time_limit = 3600
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = no
recipient_bcc_maps = hash:/etc/postfix/maps/bcc_recipient
recipient_delimiter = +
relay_domains = hash:/etc/postfix/maps/relay_domains
sender_bcc_maps = hash:/etc/postfix/maps/bcc_sender
sender_dependent_relayhost_maps = hash:/etc/postfix/maps/relayhost_map
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks, reject_rbl_client sbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client dul-dnsbl.sorbs.net, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl-1.uceprotect.net, reject_unknown_reverse_client_hostname, check_client_access cidr:/etc/postfix/maps/client_access, check_client_access hash:/etc/postfix/maps/client_access_domain, permit
smtpd_data_restrictions = reject_unauth_pipelining, permit
smtpd_delay_reject = yes
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, check_helo_access hash:/etc/postfix/maps/helo_access, reject_invalid_hostname, reject_unknown_hostname, reject_non_fqdn_hostname, permit
smtpd_milters = inet:localhost:12301
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_sender_mx_access cidr:/etc/postfix/maps/check_sender_mx_access_reversed, cidr:/etc/postfix/maps/check_sender_mx_access_wildcard, check_recipient_access hash:/etc/postfix/maps/recipient_access, check_policy_service unix:private/policyd-spf, reject_unknown_client_hostname, reject_unknown_reverse_client_hostname, reject_unknown_sender_domain, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_invalid_hostname, reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client bl.spamcop.net, reject_rbl_client cbl.abuseat.org, reject_rbl_client dnsbl.sorbs.net, reject_rbl_client sbl.spamhaus.org, reject_rbl_client dnsbl-1.uceprotect.net, reject_rbl_client zen.spamhaus.org, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks, check_sender_access hash:/etc/postfix/maps/sender_access, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_rhsbl_sender domain.tld, permit
smtpd_soft_error_limit = 10
smtpd_tls_cert_file = /etc/letsencrypt/live/domain.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/domain.org/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
strict_rfc821_envelopes = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql_virtual_alias_domain_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = dovecot
virtual_uid_maps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message=Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_mailbox_limit_override=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_overquota_bounce=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_mailbox_extended=yes
ls -al /var/vmail
drwxrwxr-x 6 vmail vmail 4096 May 9 21:01 .
drwxr-xr-x 15 root root 4096 May 15 15:41 ..
drwxrwxr-x 11 vmail vmail 4096 May 15 11:19 domain.org
id dovecot
uid=109(dovecot) gid=115(dovecot) groups=115(dovecot),5000(vmail)
id postfix
uid=108(postfix) gid=113(postfix) groups=113(postfix),45(sasl),5000(vmail)
id vmail
uid=5000(vmail) gid=5000(vmail) groups=5000(vmail),113(postfix),115(dovecot),116(dovenull)

你能帮我吗?

0 个答案:

没有答案