Hi! Have been using Fedora as my dovecot server for some time and am struggling with systemd at every update. Fedora insists on setting ProtectSystem=full in both dovecot.service and postfix.service at every update of the packages. This makes my mailstore which is in /usr/local/var/mail Read-only. And this makes the incoming emails delivered through dovecot-lda disappear into /dev/null until I notice the problem and we lose incoming emails. My question is: Is there any way to set up a failback mailstore for these occasions? PS! I really hate systemd - Destroys the UNIX way of doing things with a heavy axe.... Best Dag
14.08.2017 09:24 Dag Nygren kirjutas:> > Hi! > > Have been using Fedora as my dovecot server for > some time and am struggling with systemd > at every update. > Fedora insists on setting > ProtectSystem=full in both dovecot.service and postfix.service > at every update of the packages. > > This makes my mailstore which is in /usr/local/var/mail > Read-only. > > And this makes the incoming emails delivered through > dovecot-lda disappear into /dev/null until I notice > the problem and we lose incoming emails. > > My question is: > Is there any way to set up a failback mailstore > for these occasions? > > PS! I really hate systemd - Destroys the UNIX way of > doing things with a heavy axe....Don't hate it, better learn to use it: https://wiki.archlinux.org/index.php/systemd#Drop-in_files Just override the default conf and update won't break it. Also, maybe it's time to move Your mailstore under /var/something... I guess even more restrictions will be applied on /usr in the future. If You want to do things in the UNIX way then first make sure You know what should go under /usr and what not ;) -- Sander
On Monday 14 August 2017 10:22:54 Sander Lepik wrote:> 14.08.2017 09:24 Dag Nygren kirjutas: > > > > Hi! > > > > Have been using Fedora as my dovecot server for > > some time and am struggling with systemd > > at every update. > > Fedora insists on setting > > ProtectSystem=full in both dovecot.service and postfix.service > > at every update of the packages. > > > > This makes my mailstore which is in /usr/local/var/mail > > Read-only. > > > > And this makes the incoming emails delivered through > > dovecot-lda disappear into /dev/null until I notice > > the problem and we lose incoming emails. > > > > My question is: > > Is there any way to set up a failback mailstore > > for these occasions? > > > > PS! I really hate systemd - Destroys the UNIX way of > > doing things with a heavy axe.... > > Don't hate it, better learn to use it: > https://wiki.archlinux.org/index.php/systemd#Drop-in_files > > Just override the default conf and update won't break it.Will have a look on that thanks...> Also, maybe it's time to move Your mailstore under /var/something... I > guess even more restrictions will be applied on /usr in the future. If > You want to do things in the UNIX way then first make sure You know what > should go under /usr and what not ;)Local mods/repositories etc. should go under /usr/local... /usr/local/spool, /usr/local/var etc.... Has been like that for 40 years now and there is no reason to break it by a noob programmer (LP) that wants UNIX to behave like Windows... Systemd is really a misnomer and a constant source of problems. Dag
On Monday 14 August 2017 10:22:54 Sander Lepik wrote:> 14.08.2017 09:24 Dag Nygren kirjutas:> > PS! I really hate systemd - Destroys the UNIX way of > > doing things with a heavy axe.... > > Don't hate it, better learn to use it: > https://wiki.archlinux.org/index.php/systemd#Drop-in_filesCannot find a way to "remove" the ProtectSystem setting as there is no option to set ProtectSystem=none . At least not according to the systemd manual... Dag
? 14 ao?t 2017 09:24 +0300, Dag Nygren <dag at newtech.fi>?:> Have been using Fedora as my dovecot server for > some time and am struggling with systemd > at every update. > Fedora insists on setting > ProtectSystem=full in both dovecot.service and postfix.service > at every update of the packages. > > This makes my mailstore which is in /usr/local/var/mail > Read-only. > > And this makes the incoming emails delivered through > dovecot-lda disappear into /dev/null until I notice > the problem and we lose incoming emails. > > My question is: > Is there any way to set up a failback mailstore > for these occasions? > > PS! I really hate systemd - Destroys the UNIX way of > doing things with a heavy axe....In /etc/systemd/system/dovecot.service.d/10-mailboxes.conf, put: [Service] ReadWritePaths=/usr/local/var/mail Same for Postfix. This won't be overwritten on updates. -- Don't stop at one bug. - The Elements of Programming Style (Kernighan & Plauger)
Thanks for all the advice on how to configure systemd not to loose my emails after every update. Much appreciated. But there could be other reasons for the mailboxes not being writable and what I am really asking for is for dovecot-lda not to loose the incoming emails into thin air in these cases. Could we have some kind of collective place/places where they would be saved in this case and then reintroduced into the system after the problem is fixed? One file for example? Best Dag
hmm if message cannot be written to disk surely it remains on mda queue as not delviered and does not just disappear ? or am i reading this wrong ?!> Dag Nygren <mailto:dag at newtech.fi> > 16 August 2017 at 7:14 am > Thanks for all the advice on how to configure systemd > not to loose my emails after every update. Much appreciated. > > But there could be other reasons for the mailboxes not being > writable and what I am really asking for is for > dovecot-lda not to loose the incoming emails into thin air > in these cases. > > Could we have some kind of collective place/places where they would > be saved in this case and then reintroduced into the system > after the problem is fixed? One file for example? > > Best > Dag > Dag Nygren <mailto:dag at newtech.fi> > 14 August 2017 at 4:24 pm > Hi! > > Have been using Fedora as my dovecot server for > some time and am struggling with systemd > at every update. > Fedora insists on setting > ProtectSystem=full in both dovecot.service and postfix.service > at every update of the packages. > > This makes my mailstore which is in /usr/local/var/mail > Read-only. > > And this makes the incoming emails delivered through > dovecot-lda disappear into /dev/null until I notice > the problem and we lose incoming emails. > > My question is: > Is there any way to set up a failback mailstore > for these occasions? > > PS! I really hate systemd - Destroys the UNIX way of > doing things with a heavy axe.... > > > Best > Dag