title: Private only dovecot, local docker configuration for one user fails login for Apple Mail
body: <p>I'm trying to make a local docker-dovecot machine to archive my e-mails. I would like to query them with Apple Mail. I have a simple ubuntu docker machine (on an VM with parallels, because I'm on a Mac).</p>
  
  <p>I have this local.conf:</p>
  
  <pre><code># A comma separated list of IPs or hosts where to listen in for connections.
  # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
  # If you want to specify non-default ports or anything more complex,
  # edit conf.d/master.conf.
  listen = *,::
  
  # Protocols we want to be serving.
  protocols = imap
  
  # Static passdb.
  
  # This can be used for situations where Dovecot doesn't need to verify the
  # username or the password, or if there is a single password for all users:
  passdb {
    driver = static
    args = password=dovecot
  }
  
  # Location for users' mailboxes. The default is empty, which means that Dovecot
  # tries to find the mailboxes automatically. This won't work if the user
  # doesn't yet have any mail, so you should explicitly tell Dovecot the full
  # location.
  #
  # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
  # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
  # kept. This is called the "root mail directory", and it must be the first
  # path given in the mail_location setting.
  #
  # There are a few special variables you can use, eg.:
  #
  #   %u - username
  #   %n - user part in user@domain, same as %u if there's no domain
  #   %d - domain part in user@domain, empty if there's no domain
  #   %h - home directory
  #
  # See doc/wiki/Variables.txt for full list. Some examples:
  #
  #   mail_location = maildir:~/Maildir
  #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
  #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
  #
  # &lt;doc/wiki/MailLocation.txt&gt;
  #
  mail_location = maildir:/var/mail/%n
  
  # System user and group used to access mails. If you use multiple, userdb
  # can override these by returning uid or gid fields. You can use either numbers
  # or names. &lt;doc/wiki/UserIds.txt&gt;
  # mail_uid = CHANGE_THIS_to_your_short_user_name_or_uid
  # mail_gid = admin
  
  # SSL/TLS support: yes, no, required. &lt;doc/wiki/SSL.txt&gt;
  ssl = no
  
  # Login user is internally used by login processes. This is the most untrusted
  # user in Dovecot system. It shouldn't have access to anything at all.
  # default_login_user = _dovenull
  
  # Internal user is used by unprivileged processes. It should be separate from
  # login user, so that login processes can't disturb other processes.
  # default_internal_user = _dovecot
  
  # Setting limits.
  default_process_limit = 10
  default_client_limit = 50
  </code></pre>
  
  <p>and I'm getting this from Apple Mail</p>
  
  <pre><code>May 23 07:15:58  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16f021cd0:[Non-authenticated]&gt; Wrote: 1.11 ID ("name" "Mac OS X Mail" "version" "9.3 (3124)" "os" "Mac OS X" "os-version" "10.11.5 (15F34)" "vendor" "Apple Inc.")
  May 23 07:15:58  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16f021cd0:[Non-authenticated]&gt; Read: * ID {
          name = Dovecot;
      }
  May 23 07:15:58  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16f021cd0:[Non-authenticated]&gt; Read: 1.11 OK
  May 23 07:15:58  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16f021cd0:[Non-authenticated]&gt; Wrote: 3.11 LOGOUT
  May 23 07:16:00  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16aa14590:[Disconnected]&gt; Read: * OK [CAPABILITY (
          IMAP4REV1,
          "LITERAL+",
          "SASL-IR",
          "LOGIN-REFERRALS",
          ID,
          ENABLE,
          IDLE,
          "AUTH=PLAIN",
          "AUTH=LOGIN"
      )]
  May 23 07:16:00  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16aa14590:[Non-authenticated]&gt; Wrote: 1.23 ID ("name" "Mac OS X Mail" "version" "9.3 (3124)" "os" "Mac OS X" "os-version" "10.11.5 (15F34)" "vendor" "Apple Inc.")
  May 23 07:16:00  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16aa14590:[Non-authenticated]&gt; Read: * ID {
          name = Dovecot;
      }
  May 23 07:16:00  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16aa14590:[Non-authenticated]&gt; Read: 1.23 OK
  May 23 07:16:00  Mail[87524] &lt;Debug&gt;: &lt;0x7fe16aa14590:[Non-authenticated]&gt; Wrote: 3.23 LOGOUT
  </code></pre>
  
  <p>and this from dovecot (mail.log):</p>
  
  <pre><code>May 23 05:07:22 f8ab3e20742f dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)
  May 23 05:07:22 f8ab3e20742f dovecot: ssl-params: Generating SSL parameters
  May 23 05:07:29 f8ab3e20742f dovecot: ssl-params: SSL parameters regeneration completed
  May 23 05:07:52 f8ab3e20742f dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=&lt;&gt;, rip=10.211.55.2, lip=172.17.0.2, session=&lt;IJwtbHszbgAK0zcC&gt;
  May 23 05:07:54 f8ab3e20742f dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=&lt;&gt;, rip=10.211.55.2, lip=172.17.0.2, session=&lt;qsRNbHszdgAK0zcC&gt;
  </code></pre>
  
  <p>The output of <code>doveconf -n</code> is (so "disable_plaintext_auth = no" is active): </p>
  
  <pre><code># 2.2.9: /etc/dovecot/dovecot.conf
  # OS: Linux 4.4.8-boot2docker x86_64 Ubuntu 14.04.4 LTS aufs
  auth_mechanisms = plain login
  default_client_limit = 50
  default_process_limit = 10
  disable_plaintext_auth = no
  listen = *,::
  mail_location = maildir:/var/mail/%n
  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 {
    args = password=dovecot
    driver = static
  }
  protocols = imap
  ssl = no
  </code></pre>
  
  <p>Any suggestions why this login isn't working?</p>
  
  <p>Thanks!</p>