Daniel Staal <dst...@usa.net> wrote: > Good points, but inotify might still be overkill. `ls maildir/cur/ > | grep ',.*S` will give you all messages that have been seen in the > mailbox, so you can run on a periodic schedule fairly easily. I'm > not sure whether you need the immediate notification inotify gives.
I used to use `find' in a similar way you use `ls', but that redundantly trains old ham messages. That's slow for large ham folders, but fine for spam, though (combined with `rm'). But maybe training ham is overkill? I'm not sure about that. > inotify won't work for me - I'm on a BSD where inotify doesn't exist > - but it's an interesting approach. Yeah, I wonder if there's something like incron for kqueue, since I know kqueue supports FS notifications.