Thanks for the swift response - see below. On Thu, 6 Dec 2018 at 16:10, Wietse Venema <wie...@porcupine.org> wrote:
> Dominic Raferd: > > I am using incrond to monitor an mbox file (in /var/mail) for changes, > but > > it is failing to trigger when postfix adds an incoming mail to the file. > > Possible causes: > > - Your file system does not set the file mtime when Postfix appends > to the file. Fix: don't disable mtime updates for append operations. > - it does set the mtime when Postfix appends to the file - There is a clock drift problem where the host with Postfix has > different time than the host with the file system. Fix: run NTP on > both hosts. > - Postfix is on the same host as the filesystem > > (It triggers fine however if I touch the file.) > > > > I may be barking up the wrong tree but I wonder if this is because > instead > > of merely appending to the existing mbox file, postfix/local rewrites the > > file so that its inode changes (which I know breaks incrond's ability to > > monitor a file). If so, is there a way to get postfix to append to the > file > > without changing the inode, and if so what are the disadvantages? > > Have you verified that the inode number changes? > no, I will check how to do this Postfix opens an mbox file with O_APPEND mode which is standardized > by the POSIX API. If that causes the file inode number to change, > then you need to use a different file system. > In this case I suspect that the inode issue is not the cause of incrond's problem.