A client's server, I had been helping, crashed and I quickly reconstructed a server with the configuration, as much as possible, the same as the old one. Still having trouble with mail. Everything looks in place, but something is off. How can I find what the problem is and fix it? ubuntu 16.04 main.cf (below replaced actual server name with xxx) smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = noreadme_directory = /usr/share/doc/postfix smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = xxx alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = localhost.$mydomain, localhost, xxx relayhost = mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all html_directory = /usr/share/doc/postfix/html virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_mailbox_base = /home/vmail virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf 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 smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination directories: $ ll /home/vmail drwx------ 4 5000 5000 4096 Oct 28 14:35 xxx/ # ll /home/vmail/xxx/ drwx------ 14 5000 5000 4096 Oct 28 14:35 user1/ # ll /home/vmail/xxx/user1/ total 292 drwx------ 14 5000 5000 4096 Oct 28 14:35 ./ drwx------ 4 5000 5000 4096 Oct 28 14:35 ../ drwx------ 6 5000 5000 4096 Oct 28 14:35 .Archives/ drwx------ 2 5000 5000 4096 Oct 28 14:35 courierimapkeywords/ -rw-r--r-- 1 5000 5000 137 Oct 28 14:35 courierimapsubscribed -rw-r--r-- 1 5000 5000 72919 Oct 28 14:35 courierimapuiddb -rw-r--r-- 1 5000 5000 38517 Oct 28 14:35 courierpop3dsizelist drwx------ 2 5000 5000 118784 Oct 28 14:35 cur/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .Drafts/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .&eg50BljrTtaRzYmB-/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .ID&MABRTYoxdWpT9zAATtY-/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .Junk/ drwx------ 2 5000 5000 12288 Nov 6 10:37 new/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .Sent/ drwx------ 2 5000 5000 4096 Nov 6 10:37 tmp/ drwx------ 6 5000 5000 4096 Oct 28 14:35 .Trash/ mysql authentication seemiingly ok. cat mysql-virtual_mailboxes.cf user = mail_admin password = NotTheActualPassword_91 dbname = mail query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s' hosts = 127.0.0.1 mysql -u mail_admin --password=NotTheActualPassword_91 mysql> use mail mysql> show tables; +----------------+ | Tables_in_mail | +----------------+ | domains | | forwardings | | transport | | users | +----------------+ $ cat /etc/courier/authmysqlrc MYSQL_SERVER localhost MYSQL_USERNAME mail_admin MYSQL_PASSWORD NotTheActualPassword_91 MYSQL_PORT 0 MYSQL_DATABASE mail MYSQL_USER_TABLE users MYSQL_CRYPT_PWFIELD password MYSQL_UID_FIELD 5000 MYSQL_GID_FIELD 5000 MYSQL_LOGIN_FIELD email MYSQL_HOME_FIELD "/home/vmail" MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') MYSQL_QUOTA_FIELD quota Trying telnet imap.xxx 143: 0 login user1@xxx NotRealPassword Gets disconnected /var/log/mail.log show the interaction as: Nov 6 14:58:56 ubuntu imapd: Connection, ip=[::ffff:123.4.567.89] Nov 6 14:59:12 ubuntu imapd: authdaemon: s_connect() failed: No such file or directory Nov 6 14:59:12 ubuntu imapd: LOGIN FAILED, user=user1@xxx, ip=[::ffff:123.4.567.89] Nov 6 14:59:12 ubuntu imapd: authentication error: No such file or directory Anything else I can show?