Solo wherecot privati, la configuration del docker locale per un utente non riesce ad accedere a Apple Mail

Sto cercando di creare una macchina locale docker-wherecot per archiviare le mie e-mail. Vorrei interrogarli con Apple Mail. Ho una semplice ubuntu docker machine (su un VM con paralleli, perché sono su un Mac).

Ho questo local.conf:

# 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=wherecot } # 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 [email protected], same as %u if there's no domain # %d - domain part in [email protected], 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 # # <doc/wiki/MailLocation.txt> # 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. <doc/wiki/UserIds.txt> # mail_uid = CHANGE_THIS_to_your_short_user_name_or_uid # mail_gid = admin # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt> 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 = _wherenull # 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 = _wherecot # Setting limits. default_process_limit = 10 default_client_limit = 50 

e lo sto ottenendo da Apple Mail

 May 23 07:15:58 Mail[87524] <Debug>: <0x7fe16f021cd0:[Non-authenticated]> 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] <Debug>: <0x7fe16f021cd0:[Non-authenticated]> Read: * ID { name = Dovecot; } May 23 07:15:58 Mail[87524] <Debug>: <0x7fe16f021cd0:[Non-authenticated]> Read: 1.11 OK May 23 07:15:58 Mail[87524] <Debug>: <0x7fe16f021cd0:[Non-authenticated]> Wrote: 3.11 LOGOUT May 23 07:16:00 Mail[87524] <Debug>: <0x7fe16aa14590:[Disconnected]> Read: * OK [CAPABILITY ( IMAP4REV1, "LITERAL+", "SASL-IR", "LOGIN-REFERRALS", ID, ENABLE, IDLE, "AUTH=PLAIN", "AUTH=LOGIN" )] May 23 07:16:00 Mail[87524] <Debug>: <0x7fe16aa14590:[Non-authenticated]> 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] <Debug>: <0x7fe16aa14590:[Non-authenticated]> Read: * ID { name = Dovecot; } May 23 07:16:00 Mail[87524] <Debug>: <0x7fe16aa14590:[Non-authenticated]> Read: 1.23 OK May 23 07:16:00 Mail[87524] <Debug>: <0x7fe16aa14590:[Non-authenticated]> Wrote: 3.23 LOGOUT 

e questo da wherecot (mail.log):

 May 23 05:07:22 f8ab3e20742f wherecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 23 05:07:22 f8ab3e20742f wherecot: ssl-params: Generating SSL parameters May 23 05:07:29 f8ab3e20742f wherecot: ssl-params: SSL parameters regeneration completed May 23 05:07:52 f8ab3e20742f wherecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=, lip=, session=<IJwtbHszbgAK0zcC> May 23 05:07:54 f8ab3e20742f wherecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=, lip=, session=<qsRNbHszdgAK0zcC> 

L'output di whereconf -n è (quindi "disable_plaintext_auth = no" è attivo):

 # 2.2.9: /etc/wherecot/wherecot.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=wherecot driver = static } protocols = imap ssl = no 

Quali suggerimenti per cui questo login non funziona?


La soluzione è quella di correggere e configurare correttamente la seguente row (da local.conf):

 # mail_uid = CHANGE_THIS_to_your_short_user_name_or_uid 

Come ho trovato? Grazie a @Kondybas per il puntatore per provare un altro cliente. Ho usato Thunderbird e ha prodotto voci di registro wherecot (perché Apple Mail non ha prodotto queste righe? Nessun indizio), dicendo che non poteva passare al context utente di mail_uid. Ho esteso Dockerfile wherecot e ho commutato correttamente l'utente. Successivamente ha lavorato con Thunderbird e poi con Apple Mail.