I have a Postix + Dovecot email server I'm having some little issues. I can send email from roundcube (or using the mail-utils in the terminal), I can also receive email (I can see them in my Maildir/cur directory) BUT my roundcube mail interface always show en empty inbox mail.
Every received email are not available in roundcube interface, but they are in my Maildir directory. It's going to be a path issue but I can't find where.
Here is my Postfix main.cf file configuration:
# TLS parameters
smtpd_tls_cert_file = /path/to/my/folder
smtpd_tls_key_file = /path/to/my/folder
smtpd_tls_CAfile = /path/to/my/folder
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtpd_tls_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtpd_tls_mandatory_ciphers = high
smtpd_tls_auth_only = yes
#######
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtp_tls_mandatory_ciphers = high
smtp_tls_security_level = may
smtp_tls_CApath = /path/to/my/folder
#######
tls_high_cipherlist = HIGH:!aNULL:!MD5:!ADH:!RC4:!DH
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = myhostname
masquerade_domains = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
mydomain = mydomain.com
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
virtual_alias_domains = $mydomain
virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_non_fqdn_helo_hostname,reject_invalid_helo_hostname,reject_unknown_helo_hostname
disable_vrfy_command = yes
smtpd_delay_reject = yes
virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_default_action = accept
smtpd_milters = inet:127.0.0.1:11332
non_smtpd_milters = inet:127.0.0.1:11332
Here is my Dovecot 10-mail.conf file configuration:
mail_location = maildir:/var/mail/vmail/%d/%n
mail_location = mbox:~/mail:INBOX=/var/mail/%u
namespace inbox {
inbox = yes
}
mail_uid = vmail
mail_gid = vmail
mail_privileged_group = vmail
first_valid_uid = 2222
last_valid_uid = 2222
mail_plugins = quota
protocol !indexer-worker {
}
Here are the logs to mail.log while receiving a email:
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: connect from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: Anonymous TLS connection established from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: 7302821751: client=mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]
Aug 20 10:23:21 mx01 postfix/cleanup[19649]: 7302821751: message-id=<PR2PR03MB51467D300790BA8A85B1635F93AB0@PR2PR03MB5146.eurprd03.prod.outlook.com>
Aug 20 10:23:21 mx01 postfix/qmgr[14704]: 7302821751: from=<email@sender.com>, size=5685, nrcpt=1 (queue active)
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/local[19651]: 7302821751: to=<email@sender.com>, relay=local, delay=0.48, delays=0.45/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Aug 20 10:23:21 mx01 postfix/qmgr[14704]: 7302821751: removed
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: disconnect from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7
Mail.log file while connecting to my roundcube account:
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<myuser@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20772, secured, session=<IIApCYmQzKV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap(myuser@mydomain.com)<20772><IIApCYmQzKV/AAAB>: Logged out in=82 out=676 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<myuser@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20774, secured, session=<ghcrCYmQ0KV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap(myuser@mydomain.com)<20774><ghcrCYmQ0KV/AAAB>: Logged out in=70 out=697 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<myuser@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20780, secured, session=<PxQxCYmQ1KV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap(myuser@mydomain.com)<20780><PxQxCYmQ1KV/AAAB>: Logged out in=156 out=819 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<myuser@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20781, secured, session=<8WAxCYmQ1qV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap(myuser@mydomain.com)<20781><8WAxCYmQ1qV/AAAB>: Logged out in=76 out=667 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
If you need more configuration feel free to ask!