[GH-ISSUE #2589] Dovecot permisson denied error when trying to delete identities #1646

Closed
opened 2026-02-27 11:18:20 +03:00 by kerem · 7 comments
Owner

Originally created by @jcharles-cj on GitHub (Aug 30, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2589

Failed to retrieve mailbox location (b"doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 13: ssl_cert: Can't open file /etc/letsencrypt/live/mydomain.com/fullchain.pem: Permission denied\n")

This is a fresh install of Modoboa and I have tried changing the permissions and error still persists.

System:
Debian 11
Dovecot version: 2.3.13 (89f716dc2)

Originally created by @jcharles-cj on GitHub (Aug 30, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2589 `Failed to retrieve mailbox location (b"doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 13: ssl_cert: Can't open file /etc/letsencrypt/live/mydomain.com/fullchain.pem: Permission denied\n")` This is a fresh install of Modoboa and I have tried changing the permissions and error still persists. System: Debian 11 Dovecot version: 2.3.13 (89f716dc2)
kerem closed this issue 2026-02-27 11:18:21 +03:00
Author
Owner

@jcharles-cj commented on GitHub (Aug 30, 2022):

Update: I did this workound and it works now, but is it appropriate?
https://modoboa-wiki.herokuapp.com/en/dovecot-failed-to-retrieve-mailbox-location-error#fix-by-using-commands

<!-- gh-comment-id:1231091237 --> @jcharles-cj commented on GitHub (Aug 30, 2022): Update: I did this workound and it works now, but is it appropriate? https://modoboa-wiki.herokuapp.com/en/dovecot-failed-to-retrieve-mailbox-location-error#fix-by-using-commands
Author
Owner

@Spitfireap commented on GitHub (Aug 30, 2022):

Duplicate of #2570, the relevant PR is here modoboa/modoboa-installer#427 :)

<!-- gh-comment-id:1231191625 --> @Spitfireap commented on GitHub (Aug 30, 2022): Duplicate of #2570, the relevant PR is here modoboa/modoboa-installer#427 :)
Author
Owner

@ankeshanand1 commented on GitHub (Aug 4, 2023):

I am having the same issue. Any fixes? It was working so far until I tried deleting domain and mailboxes.

● dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-04 15:16:12 EDT; 7min ago
       Docs: man:dovecot(1)
             http://wiki2.dovecot.org/
   Main PID: 21184 (dovecot)
      Tasks: 6 (limit: 4660)
     Memory: 6.6M
        CPU: 537ms
     CGroup: /system.slice/dovecot.service
             ├─21184 /usr/sbin/dovecot -F
             ├─21187 dovecot/anvil
             ├─21188 dovecot/log
             ├─21189 dovecot/config
             ├─21799 dovecot/stats
             └─21908 dovecot/auth```
<!-- gh-comment-id:1666072977 --> @ankeshanand1 commented on GitHub (Aug 4, 2023): I am having the same issue. Any fixes? It was working so far until I tried deleting domain and mailboxes. ```root@mailserver:~# service dovecot status ● dovecot.service - Dovecot IMAP/POP3 email server Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2023-08-04 15:16:12 EDT; 7min ago Docs: man:dovecot(1) http://wiki2.dovecot.org/ Main PID: 21184 (dovecot) Tasks: 6 (limit: 4660) Memory: 6.6M CPU: 537ms CGroup: /system.slice/dovecot.service ├─21184 /usr/sbin/dovecot -F ├─21187 dovecot/anvil ├─21188 dovecot/log ├─21189 dovecot/config ├─21799 dovecot/stats └─21908 dovecot/auth```
Author
Owner

@Spitfireap commented on GitHub (Aug 4, 2023):

@ankeshanand1 Can you check that /etc/dovecot/conf.d/10-ssl.conf contains !include_try /etc/dovecot/conf.d/10-ssl-keys.try and that /etc/dovecot/conf.d/10-ssl-keys.try has 600 permission ?

<!-- gh-comment-id:1666078636 --> @Spitfireap commented on GitHub (Aug 4, 2023): @ankeshanand1 Can you check that `/etc/dovecot/conf.d/10-ssl.conf` contains ``!include_try /etc/dovecot/conf.d/10-ssl-keys.try`` and that `/etc/dovecot/conf.d/10-ssl-keys.try` has 600 permission ?
Author
Owner

@ankeshanand1 commented on GitHub (Aug 4, 2023):

@Spitfireap Here is the error coming from modoboa: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 52: ssl_cert: Can't open file /etc/letsencrypt/live/server.somehostname.com/fullchain.pem: Permission denied\n

10-ssl.conf does contain !include_try /etc/dovecot/conf.d/10-ssl-keys.try but it's commented out and /etc/dovecot/conf.d/10-ssl-keys.try is 600.

10-ssl.conf config for SSL:

ssl_cert = </etc/letsencrypt/live/server.somehostname.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/server.somehostname.com/privkey.pem

dovecot is able to start successfully without any permission denied errors but Modoboa shows error when deleting the domains or identities.

<!-- gh-comment-id:1666120146 --> @ankeshanand1 commented on GitHub (Aug 4, 2023): @Spitfireap Here is the error coming from modoboa: `doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 52: ssl_cert: Can't open file /etc/letsencrypt/live/server.somehostname.com/fullchain.pem: Permission denied\n` `10-ssl.conf` does contain `!include_try /etc/dovecot/conf.d/10-ssl-keys.try` but it's commented out and `/etc/dovecot/conf.d/10-ssl-keys.try` is 600. `10-ssl.conf` config for SSL: ``` ssl_cert = </etc/letsencrypt/live/server.somehostname.com/fullchain.pem ssl_key = </etc/letsencrypt/live/server.somehostname.com/privkey.pem ``` dovecot is able to start successfully without any permission denied errors but Modoboa shows error when deleting the domains or identities.
Author
Owner

@ankeshanand1 commented on GitHub (Aug 4, 2023):

Surprisingly, I am able to delete new domains that I just added but not the old ones!

<!-- gh-comment-id:1666123988 --> @ankeshanand1 commented on GitHub (Aug 4, 2023): Surprisingly, I am able to delete new domains that I just added but not the old ones!
Author
Owner

@ankeshanand1 commented on GitHub (Aug 4, 2023):

I logged into vmail user and found out that vmail was infact not able to access /etc/letsencrypt when user owners were dovecot:dovecot whereas it worked fine earlier. Created a new group ssl, added all relevant owners to the group, made vmail the owner of /etc/letsencrypt and all is well now!

<!-- gh-comment-id:1666200056 --> @ankeshanand1 commented on GitHub (Aug 4, 2023): I logged into vmail user and found out that vmail was infact not able to access /etc/letsencrypt when user owners were dovecot:dovecot whereas it worked fine earlier. Created a new group ssl, added all relevant owners to the group, made vmail the owner of /etc/letsencrypt and all is well now!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1646
No description provided.