Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up dovecot server and I'm currently using offline imap to sync my gmail to the dovecot imap running on the localhost.

Currently I'm using plain text authentication, but this results in every single mail client to ask & remember my user name password just to access mail from localhost.

Is there a way to set up dovecot such that it will not ask me for authentication when I'm trying to log in to it from gnus from localhost for example? Or make it ask pam/gnomekeyring/anything to not ask me?

ps. there are no plans to allow accessing dovecot server not from localhost. Not even from local network.

share|improve this question
up vote 2 down vote accepted

Three options come to my mind:

  • First, if you are on the same machine, you could just use the underlying mail store directly, without going thru IMAP. Depending on the store and client used, this may result in some troubles reflecting changes back to IMAP, though.

  • Second, use Dovecot's mechanism for pre-authenticated sessions, together with an inetd or ucspi-tcp's tcpserver if you need to listen on a TCP port for you client of choice.

  • Finally, you could setup Kerberos ticket authentication and use that with Dovecot via GSSAPI. But that's probably overkill for your scenario.

share|improve this answer
On mutt (and possibly other MUAs), preauth'd sessions can be used by setting tunnel or similar variable to "dovecot --exec-mail imap". – grawity Jul 31 '10 at 20:24
I'm using gnus and it works wonderful (setq gnus-select-method '(nnimap "localmail" (nnimap-stream shell))) (setq imap-shell-program "/usr/sbin/dovecot --exec-mail imap") – Dima Aug 1 '10 at 22:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.