> On 30/03/2020 20:01 Aki Tuomi <aki.tu...@open-xchange.com> wrote: > > > On 30/03/2020 19:39 Roy Lemmon <r...@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