I am trying to set up Gnus 5.13 to access a local maildir (created by OfflineIMAP) via Dovecot. I know I could access OfflineIMAP's maildir directly, but as far as I know, this causes problems with syncing Gnus' flags. So I set up OfflineIMAP (it works) and I have this in my ~/.gnus.el:

(setq gnus-select-method '(nnimap "Mail" (nnimap-stream shell)))
(setq nnimap-shell-program "/usr/lib/dovecot/imap")

I also tried this instead of the second line:

(setq imap-shell-program "/usr/lib/dovecot/imap")

However, when I start Gnus, I get the following error message:

Couldn't open server on Mail

Warning: Unable to open server nnimap+Mail due to: Buffer *nnimap Mail nil *nntpd** has no process

Does anyone know how to get this working or at least how to figure out what that error message means?

1 Answer 1


I was able to find the solution after all. I figured out that the variable nnimap-shell-programm was always back to the default after starting gnus. And the process list showed

ssh Mail imapd

The Gnus manual was only partially helpful because it says this about nnimap-stream shell


If you need to tunnel via other systems to connect to the server, you can use this option, and customize nnimap-shell-program to be what you need.

Since the manual describes only options for nnimap, I figured that maybe nnimap-shell-programm was such an option as well. So I tried the following in my ~/.gnus.el and it works:

(setq gnus-select-method '(nnimap "Mail"
                              (nnimap-stream shell)
                              (nnimap-shell-program "/usr/lib/dovecot/imap -o mail_location=maildir:~/Maildir/:LAYOUT=fs")))

The other change about the call to the Dovecot preauth executable is just to make sure it finds the correct mail directory and so that it uses regular Maildir format (supported by OfflineIMAP) instead of Maildir++.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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