<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
I’m trying a super basic config based upon <a href="https://wiki.dovecot.org/HowTo/PostfixDovecotLMTP">
https://wiki.dovecot.org/HowTo/PostfixDovecotLMTP</a> but before I work on shipping mail through Postfix to DoveCot, I wanted to make sure IMAP is working first, but I can’t even get a basic login to so I thought I’d see if the gurus on the list might be able
 to point out I’m doing wrong. The documentation is pretty good, but there were some gaps I had to guess at and I’m presuming that’s where I went wrong. I’ve turned SELinux to permissive mode, for now.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Here’s the doveconf -n:</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
# OS: Linux 3.10.0-1062.12.1.el7.x86_64 x86_64 CentOS Linux release 7.7.1908 (Core)
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
# Hostname: imap</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
first_valid_uid = 1000</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
listen = 192.168.1.207</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mail_gid = vmail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mail_home = /var/vmail/%d/%n</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mail_location = sdbox:~/mail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mail_uid = vmail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mbox_write_locks = fcntl</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
namespace inbox {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
inbox = yes</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
location = </p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mailbox Drafts {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
special_use = \Drafts</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mailbox Junk {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
special_use = \Junk</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mailbox Sent {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
special_use = \Sent</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mailbox "Sent Messages" {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
special_use = \Sent</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mailbox Trash {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
special_use = \Trash</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
prefix = </p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
separator = /</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
passdb {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
args = scheme=PLAIN username_format=%u /etc/dovecot/users</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
driver = passwd-file</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
protocols = imap lmtp</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
service lmtp {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
group = vmail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
unix_listener /var/spool/postfix/private/dovecot-lmtp {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
group = postfix</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
mode = 0600</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
user = postfix</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
user = vmail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
ssl = no</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
ssl_key = # hidden, use -P to show it</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
userdb {</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
args = username_format=%u /etc/dovecot/users</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
driver = passwd-file</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
}</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
I wasn’t sure how to set rights on the users file:</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
[sawozny@imap var]$ cat /etc/dovecot/users</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
test@test.com:{plain}test</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
[sawozny@imap var]$ ls -la /etc/dovecot/users</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
-rw-r--r--. 1 root root 26 Jun 3 23:31 /etc/dovecot/users</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Also, didn’t know what rights to set on the /var/vmail directoy so I did this:</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
drwxrwx---. 3 vmail vmail 4096 Jun 3 20:52 vmail</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
This directory is also empty except for the lost+fond directory that comes with a disk mount point. My understanding is that the mail home and maildir will manifest automagically on first login, but if I need to prime the pump, please let me know what I need
 to do.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
For my test, I did:</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
[sawozny@imap var]$ telnet 192.168.1.207 143</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Trying 192.168.1.207...</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Connected to 192.168.1.207.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Escape character is '^]'.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
01 LOGIN test@test.com test</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
01 NO [UNAVAILABLE] Internal error occurred. Refer to server log for more information.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Connection closed by foreign host.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
And the results in the /var/log/maillog file are:</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Jun 3 23:35:34 imap dovecot: auth: Error: passwd-file /etc/dovecot/users: User test@test.com is missing userdb info</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Jun 3 23:35:44 imap dovecot: auth: Error: passwd-file(test@test.com,192.168.1.207,<DBqafDan7ODAqAHP>): user not found from userdb</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Jun 3 23:35:44 imap dovecot: imap: Error: Authenticated user not found from userdb, auth lookup id=843055105 (auth connected 0 msecs ago, handshake 0 msecs ago, request took 0 msecs, client-pid=12047 client-id=1)</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Jun 3 23:35:44 imap dovecot: imap-login: Internal login failure (pid=12047 id=1) (internal failure, 1 successful auths): user=<test@test.com>, method=PLAIN, rip=192.168.1.207, lip=192.168.1.207, mpid=12049, secured, session=<DBqafDan7ODAqAHP></p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
I’m not sure where I’ve gone wrong. From my understanding of the documentation, all I need in the userdb is name and password. UID, GID and HOME are also indicated as required, but I set them at the system level, so why is the system telling me the user was
 not found? This definitely isn’t my first rodeo with Linux, but I know almost nothing about messaging so in that regard I’m a totally n00b and would really appreciate some guidance.</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Thanks,</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
<br>
</p>
<p style="margin-bottom: 0.1in; line-height: 115%; margin-bottom: 0.1in; margin-bottom: 0in; line-height: 100%">
Scott</p>
<br>
</div>
</body>
</html>