Author Topic: Dovecot Permission Denied stats-writer  (Read 2999 times)

julyusito

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Dovecot Permission Denied stats-writer
« on: July 01, 2021, 06:01:13 pm »
Hi,

After upgrade, some errors ocurrs:

Jun 27 01:00:02 mail postfix/pipe[127914]: 6A6965F7B1: to=<user@domain.com>, relay=dovecot, delay=0.23, delays=0.08/0.01/0/0.14, dsn=2.0.0, st
atus=sent (delivered via dovecot service (lda(user@domain.com): Error: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permissi))

Only visible on outlook
0x800CCC0E


avosec

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +1/-0
    • View Profile
Re: Dovecot Permission Denied stats-writer
« Reply #1 on: August 13, 2021, 10:28:20 am »
You can change the mode to 666 to allow everyone access to the stats in /etc/dovecot/dovecot.conf, but i will not recommend it. It's better to use some default group like "mail" or "ebox" as is the case with Zentyal.

Please try to add the below to /etc/zentyal/stubs/mail/dovecot.conf.mas, more on stubs you can learn from https://doc.zentyal.org/6.1/en/appendix-c.html

service stats {
  unix_listener stats-reader {
    group = ebox
    mode = 0666
  }
  unix_listener stats-writer {
    group = ebox
    mode = 0666
  }
}
service anvil {
  unix_listener anvil {
    group = ebox
    mode = 0666
  }
}

Once you save the changes, please restart dovocot (zs mail restart).

scottdr

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +6/-0
  • Zentyal community edition 7.0.7
    • View Profile
Re: Dovecot Permission Denied stats-writer
« Reply #2 on: February 10, 2022, 10:17:12 pm »
FYI: I managed to cure this by the following:
# cp /usr/lib/dovecot/dovecot-lda /usr/lib/dovecot/dovecot-lda-orig <== Always make a backup
# chgrp dovecot dovecot-lda                                                        <== Change group permission to dovecot (this group has write permissions to lock file)
# chmod 2755 /usr/lib/dovecot/dovecot-lda                                   <== Sets sticky bit so dovecot-lda is run as group=dovecot
# zs mail restart                                                                          <== Restart mail (probably not needed as dovecot-lda is run on a per email basis.

See https://wiki2.dovecot.org/LDA/Postfix for details.
HTH

gabor.strama

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +5/-0
    • View Profile
Re: Dovecot Permission Denied stats-writer
« Reply #3 on: January 17, 2023, 08:11:14 pm »
Hi,

This solution has worked for me, THX guys!

BR,
GáborS