Debian – mail client Thunderbird does not read new mails from dovecot/postfix mail server

debiandovecotpostfix

I run a server:
Debian GNU/Linux 7.8 (wheezy) and used the default mail system (exim) for mails with regular users (no vmail). Mail system did not work properly for some users, so I removed exim and installed postfix/dovecot according to this German tutorial.

Everything works fine. I connected with Thunderbird using the old users, successfully.

I was able to see old mails as they were still sitting in INBOX. However, any attempt to receive new mails failed. These mails sit in ~/mail/new. I can read them with 'cat' (or whatever) on the server, but not in the client.
log files look fine. I really don't know what to do.

Output of postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = mail/
inet_interfaces = all
mailbox_size_limit = 1000000000
mydestination = $myhostname, localhost.$mydomain, $mydomain
mydomain = cljhome.net
myhostname = www.cljhome.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = reject_invalid_hostname
smtpd_enforce_tls = no
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain, permit_sasl_authenticated, reject_unauth_destination,
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_address
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/mail.cert
smtpd_tls_key_file = /etc/postfix/mail.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
strict_rfc821_envelopes = yes

Output of dovecot -n

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 
listen = *
mail_location = mbox:~/mail:INBOX=/var/mail/%u
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
passdb {
  driver = shadow
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  user = root
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
userdb {
  driver = passwd
}

Thanks for the reply. The editor seems to use pound characters as formating tags.

Best Answer

In mail architecture like above, you need synchronize two configuration

  • The format* and location of where postfix stores the incoming email
  • The format* and location of where dovecot retrieves the email

When they are out of sync, dovecot won't find email that previously stored by postfix.

The related dovecot parameter is

mail_location = mbox:~/mail:INBOX=/var/mail/%u

and related postfix parameter is

home_mailbox = mail/

As you can see, they are out of sync. The solution is change mail_location to become

mail_location = maildir:~/mail