Hi, I am trying to setup a dovecot server on my laptop to serve my emails to emacs gnus. The emails are pulled from the mail server using isync into particular directories. I am using a Guix system. The dovecot service is running. I can telnet into it with: telnet localhost 143 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready. However if I then do: b select inbox b BAD Error in IMAP command received by server I have not logged in as I have not set any username or password. I assumed that access was open on localhost. Is this not correct ? I am not sure how to check further. I have checked the configuration and it is pointing to my email directories, imap is enabled etc. Thanks Roy. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200330/1eb1a85d/attachment.html>
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> <br> </div> <blockquote type="cite"> <div> On 30/03/2020 19:39 Roy Lemmon <roy@roylemmon.com> wrote: </div> <div> <br> </div> <div> <br> </div> <div dir="ltr"> <div> Hi, </div> <div> <br> </div> <div> I am trying to setup a dovecot server on my laptop to serve my emails to emacs gnus. The emails are pulled from the mail server using isync into particular directories. I am using a Guix system. </div> <div> <br> </div> <div> The dovecot service is running. I can telnet into it with: </div> <div> <br> </div> <div> telnet localhost 143 </div> <div> Trying 127.0.0.1... <br>Connected to localhost. <br>Escape character is '^]'. <br>* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready. </div> <div> <br> </div> <div> However if I then do: </div> <div> <br> </div> <div> b select inbox </div> <div> b BAD Error in IMAP command received by server </div> <div> <br> </div> <div> I have not logged in as I have not set any username or password. I assumed that access was open on localhost. Is this not correct ? </div> <div> <br> </div> <div> I am not sure how to check further. I have checked the configuration and it is pointing to my email directories, imap is enabled etc. </div> <div> <br> </div> <div> Thanks </div> <div> Roy. <br> </div> <div> <br> </div> </div> </blockquote> <div> <br> </div> <div> <br> </div> <div> Hi! </div> <div> <br> </div> <div> You can use ANONYMOUS mechanism if you want to allow public access. Clients might get confused with no authentication at all. </div> <div> <br> </div> <div> But even then you need some user to access as </div> <div> <br> </div> <div> See <a href="https://doc.dovecot.org/configuration_manual/authentication/authentication_mechanisms/">https://doc.dovecot.org/configuration_manual/authentication/authentication_mechanisms/ </a> </div> <div> <br> </div> <div> and </div> <div> <br> </div> <div> <a href="https://doc.dovecot.org/settings/core/#auth-anonymous-username">https://doc.dovecot.org/settings/core/#auth-anonymous-username</a> <br> </div> <div> <br> </div> <div> <br> </div> <div class="io-ox-signature"> <pre>--- Aki Tuomi</pre> </div> </body> </html>
> On 30/03/2020 20:01 Aki Tuomi <aki.tuomi at open-xchange.com> wrote: > > > On 30/03/2020 19:39 Roy Lemmon <roy at roylemmon.com> wrote: > > > > Hi, > > > > I am trying to setup a dovecot server on my laptop to serve my emails to emacs gnus. The emails are pulled from the mail server using isync into particular directories. I am using a Guix system. > > > > The dovecot service is running. I can telnet into it with: > > > > telnet localhost 143 > > > > Trying 127.0.0.1... > > Connected to localhost. > > Escape character is '^]'. > > * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready. > > > > However if I then do: > > > > b select inbox > > > > b BAD Error in IMAP command received by server > > > > I have not logged in as I have not set any username or password. I assumed that access was open on localhost. Is this not correct ? > > > > I am not sure how to check further. I have checked the configuration and it is pointing to my email directories, imap is enabled etc. > > > > Thanks > > > > Roy. > > > > Hi! > > You can use ANONYMOUS mechanism if you want to allow public access. Clients might get confused with no authentication at all. > > But even then you need some user to access as > > See https://doc.dovecot.org/configuration_manual/authentication/authentication_mechanisms/ > > and > > https://doc.dovecot.org/settings/core/#auth-anonymous-username > > --- > Aki Tuomi >And here is simple config based on what we use to expose mailman archives. It should work, but as I removed settings there is small risk of mistake. You need /srv/dovecot/anonymous directory with mail, control and index directories. control and index need to be writable for vmail. Then we symlink /var/lib/mailman/archives/private/dovecot.mbox/dovecot.mbox as /srv/dovecot/anonymous/mail/dovecot dovecot.mbox should not be, as this is read-only archive. ## dovecot.conf auth_mechanisms = anonymous # index and control need to be writable mail_home = /srv/dovecot/%Ln mail_location = mbox:%h/mail:INDEX=%h/index:CONTROL=%h/control passdb { args = /etc/dovecot/anon.passwd driver = passwd-file } userdb { args = /etc/dovecot/anon.passwd driver = passwd-file } ## anon.passwd anonymous:{PLAIN}:vmail:vmail::/srv/dovecot/anonymous::nopassword=y Aki