[Rspamd-Users] Strange behavior when modifying files (emails rejected until file is updated)

Gerald Galster list+rspamd at gcore.biz
Sun Apr 26 18:34:04 UTC 2020

> I think I understood, do you mean to rename the original file and then copy the new file?

no, the rename has to atomically overwrite the original file:

- copy body_reject.map.inc to body_reject.map.inc.tmp

- change what you want to change in body_reject.map.inc.tmp

- then overwrite body_reject.map.inc with
  mv -f body_reject.map.inc.tmp body_reject.map.inc

This way you avoid to open/truncate the file, write the data,
close the file and flush it to disk, which takes way longer than
just replacing one file with another in your filesystem.

Best regards

More information about the Users mailing list