我正在尝试将 always_bcc 设置为存档帐户,以便将所有入站和出站邮件复制到可由第三方云存档解决方案吸收的邮箱中。出站,工作正常,没有问题。入站,整个系统就崩溃了。发送的所有内容都会保留在 postfix 邮件队列中:
Mail ID Sent From To Size Status
5333C1C03F6 2014/12/18 22:15 *********@gmail.com [email protected] [email protected] 5.02 kB mail system configuration error
7D4F11C07B4 2014/12/18 22:15 *********@gmail.com [email protected] [email protected] 5.53 kB mail system configuration error:
日志不显示任何内容:mail.err
Dec 18 17:11:52 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: Duplicate namespace prefix: ""
Dec 18 17:11:52 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:12:59 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: Duplicate namespace prefix: ""
Dec 18 17:12:59 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:12:59 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: Duplicate namespace prefix: ""
Dec 18 17:12:59 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:15:40 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:15:40 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:15:40 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:15:40 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:15:42 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:15:42 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:15:48 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:15:48 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:17:35 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:17:35 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 17:17:36 maple dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: namespace configuration error: list=yes requires prefix=a to end with separator
Dec 18 17:17:36 maple dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Dec 18 21:07:48 maple dovecot: auth: Error: read(anvil-auth-penalty) failed: EOF
Dec 18 21:07:48 maple dovecot: auth: Error: net_connect_unix(anvil-auth-penalty) failed: Permission denied
邮件.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
# SASL parameters
# --------------------------------
# Postfix 2.3 and later
# smtpd_sasl_path = smtpd
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
# This is a new option as of Postfix 2.10, and is required in addition to
# smtpd_recipient_restrictions for things to work properly in this setup.
# smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth-destination
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_relay_domains
# TLS parameters
#----------------------------------
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# These are Postfix 2.3 and later.
#
# Enable (but don't force) all incoming smtp connections to use TLS.
# Enable (but don't force) all outgoing smtp connections to use TLS.
smtp_tls_security_level = may
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
# SMTPD parameters
# ---------------------------------
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# will it be a permanent error or temporary
unknown_local_recipient_reject_code = 450
# how long to keep message on queue before return as failed.
# some have 3 days, I have 16 days as I am backup server for some people
# whom go on holiday with their server switched off.
maximal_queue_lifetime = 7d
# max and min time in seconds between retries if connection failed
minimal_backoff_time = 1000s
maximal_backoff_time = 8000s
# how long to wait when servers connect before receiving rest of data
smtp_helo_timeout = 60s
# how many address can be used in one message.
# effective stopper to mass spammers, accidental copy in whole address list
# but may restrict intentional mail shots.
smtpd_recipient_limit = 16
# how many error before back off.
smtpd_soft_error_limit = 3
# how many max errors before blocking it.
smtpd_hard_error_limit = 12
# require proper helo at connections
smtpd_helo_required = yes
# General Host Configuration and Delivery Information
# ----------------------------------
myhostname = maple.domain.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =
relayhost = domain.tld.outbound10.mxlogic.net:25
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# This specifies where the virtual mailbox folders will be located.
virtual_mailbox_base = /var/vmail
# This is for the mailbox location for each user. The domainaliases
# map allows us to make use of Postfix Admin's domain alias feature.
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/mysql_virtual_mailbox_domainaliases_maps.cf
# and their user id
virtual_uid_maps = static:150
# and group id
virtual_gid_maps = static:8
# This is for aliases. The domainaliases map allows us to make
# use of Postfix Admin's domain alias feature.
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf
# This is for domain lookups.
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
# Integration with other packages
# ---------------------------------------
# Tell postfix to hand off mail to the definition for dovecot in master.cf
virtual_transport = dovecot
# Getting rid of unwanted headers. See: https://posluns.com/guides/header-removal/
header_checks = regexp:/etc/postfix/header_checks
# getting rid of x-original-to
enable_original_recipient = no
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_session_cache_timeout = 3600s
smtpd_sasl_auth_enable = yes
smtpd_tls_security_level = may
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_relay_domains
always_bcc = archive
我甚至无法理解,因为没有任何意义。当我删除 always_bcc 行时,一切都正常了。
任何想法、理论或我所忽略的事情都会有所帮助!谢谢!
编辑:dovecot -n 的输出
# 2.2.9: /etc/dovecot/dovecot.conf
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:21: 'imaps' protocol is no longer necessary, remove it
# OS: Linux 3.13.0-43-generic x86_64 Ubuntu 14.04.1 LTS ext4
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 150
last_valid_uid = 150
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n
mail_uid = vmail
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
postmaster_address = [email protected]
protocols = imap
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = mail
mode = 0600
user = vmail
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
更新:那些 dovecot 命名空间错误或许与我寻求进一步帮助之前尝试过的一些修复有关。我将在周末再次尝试处理这个问题,看看我是否可以在日志中找到任何其他错误或我能找到的任何其他东西来帮助我弄清楚发生了什么。我会在这里更新我发现的任何东西。这个问题特别令人困惑,因为我似乎找不到任何能指引我正确方向的东西。我并不特别习惯在流程的某个阶段没有以错误的形式清晰地出现的软件或配置问题。
答案1
在 etc/postfix/main.cf 文件中添加此行 dovecot_destination_recipient_limit = 1