--As of August 25, 2014 4:00:15 AM +0000, Eric Wong is alleged to have said:

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.

I've never actually found it worth the effort to set up, personally. I archive the old spam into another folder, but basically the same idea.

You could use `ls -t` + `head` to only get new files... (I was mostly pointing out that the info is in the filename.) Or you could resort to a script I wrote ages ago that simplifies some of that. ;)

<https://github.com/DanStaal/Arcfind>

(I really should finish cleaning it up for CPAN at some point...)

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.

You probably could do it using famd, I think... (Though it's a bit less widespread.)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

Reply via email to