Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: julyusito on July 01, 2021, 06:01:13 pm

Title: Dovecot Permission Denied stats-writer
Post by: julyusito 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

Title: Re: Dovecot Permission Denied stats-writer
Post by: avosec 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).
Title: Re: Dovecot Permission Denied stats-writer
Post by: scottdr 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
Title: Re: Dovecot Permission Denied stats-writer
Post by: gabor.strama on January 17, 2023, 08:11:14 pm
Hi,

This solution has worked for me, THX guys!

BR,
GáborS