I have a python script that monitors a folder for changes, using inotify via the pyinotify library.
This works - any changes are refected as inotify events and reported by the script. Mostly. One of the folders I am monitoring is a Maildir folder with emails in it, and courier imap puts them there.
None of the file activities carried out by courier are notified by inotify. This makes me think that courier is somehow putting the files there bypassing whatever mechanism the kernel is using inotify to monitor.
If I watch an email come into a maildir nothing appears in inotify. If I rename that same file, an inotify event is generated. If I copy it, an event happens. If I delete it an event happens. If courier does any of these things, no event is generated.
Does anyone know how I can get courier's file activities to show up as inotify events? This is on ubuntu btw.