0

I'm trying to setup always_bcc to an archive account in order to copy all inbound and outbound mail into a mailbox that can be sucked up by a third-party cloud archive solution. Outbound, works fine, no issues. Inbound, and the whole thing falls apart. Everything sent in gets held in the postfix mail queue:

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:

Logs don't show anything: 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

mail.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

I can't even wrap my head around it since nothing makes sense. The moment I remove the always_bcc line, everything works fine.

Any thoughts, theories, or things that I'm just missing would be helpful! Thanks!

Edit: Output of 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
}

UPDATE: Those dovecot namespace errors may be related to some fixes I tried before asking for further help. I'm going to try working on this again over the weekend to see if I can find any further errors in logs or anything else I can find to help me figure out what is going on. I'll update here whatever I find. This issue is particularly confusing since I can't seem to find anything that will point me in the right direction. I'm not particularly used to software or config issues that don't present themselves in an error in some point in the process with clarity.

2
  • Umm.. This is clearly dovecot error and the dovecot complain that it's namespace error. And yet I didn't spot any namespace in your dovecot -n. Maybe other folks have some explanations about this.
    – masegaloeh
    Dec 20, 2014 at 6:41
  • This error seems to be related to dovecot only. Postfix forwards all mails to the dovecot transport defined in master.cf (which you haven't posted as far as I can see). If I understood correctly, incoming mail gets handled correctly? That's strange, possibly it just has to do how dovecot handles the sender address?
    – mgabriel
    Dec 20, 2014 at 21:24

1 Answer 1

0

add in etc/postfix/main.cf file this line dovecot_destination_recipient_limit = 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .