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_files
Cannot 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.08.2017 10:57 Dag Nygren kirjutas:
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_files
Cannot 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...
You can try with ProtectSystem= - if that doesn't work then copy the whole .service file to /etc/systemd/system/, remove the "offending" line, run systemctl daemon-reload and restart the service. From time to time You can run diff on original .service file to see if upgrade has made some important changes in it.
-- Sander
❦ 14 août 2017 09:24 +0300, Dag Nygren dag@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@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@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
On Wednesday 16 August 2017 07:56:13 Matt Bryant wrote:
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 ?!
That would be nice. ...
I have the delivery chain postfix -> lda-dovecot and when postfix has passed the message to lda it will delete it from the queue. Then when kda-fails it is nowhere to be found any more.
Could well be my dovecot or positfix config that is wrong...
Best Dag
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 16 Aug 2017, Matt Bryant wrote:
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 ?!
as Matt writes your MDA (aka dovecot-lda) returns with an exit code != 0 and your MTA should queue the message for later re-delivery.
IMHO, you should look there, if you call dovecot-lda correctly.
Dag Nygren mailto:dag@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@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
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBWZPZYXz1H7kL/d9rAQK/Fwf/TH+njNQhkcnL/Yf8hldhurycZDAmhHH9 VuGrSGpjPFHydEXvYisviWoePyW7SeAYuOo3a5AqAN3ixi+zUhWcL8SUfSEc8P7b QknOwGKyv8zhhi79FJCvE2Ko9j3WqXYZbzTfuz3xWupthl7nEwJWjppZh3Ldz9Xx AkeWp+8qN2I4iBt+rkWZV1mAt9Ae7MGzsy3B/wyeQquJroThzgCGsD3dJEGuo9xB Wk9o8O8VOQhkcpGPFwSPQ39RgbfjRB4RUd19ReeEO4v5iwLQ0EF1eGrz2NAyExN1 dRwx7RYxmnRRGjiBLyP0jYVNY+kWwvuU+/fc/IxPrSW3z/IlhieJ6w== =nfFm -----END PGP SIGNATURE-----
On Wednesday 16 August 2017 07:34:25 Steffen Kaiser wrote:
On Wed, 16 Aug 2017, Matt Bryant wrote:
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 ?!
as Matt writes your MDA (aka dovecot-lda) returns with an exit code != 0 and your MTA should queue the message for later re-delivery.
IMHO, you should look there, if you call dovecot-lda correctly.
You might be perfectly right here and to make it more complicated I forgot to tell you that procmail is also involved. I did debug a bit though and lda-deliver will return the proper return code 75
my .maildelivery files contains the recommended (?)
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75"
And the procamail recipe has:
| deliver -d $ LOGNAME -m inbox
As the action (just one example).
But still my postfix thinks the message is properly delivered at a read/write error in the mailstore ???
But this seems to be a postfix configuration problem instead of a dovecot one so sorry for choosing the wrong group.
Best Dag
participants (5)
-
Dag Nygren
-
Matt Bryant
-
Sander Lepik
-
Steffen Kaiser
-
Vincent Bernat