1

I would like to launch a specific command [1] on a mail server whenever a message is moved from one folder into another folder.

For example, a Thunderbird user moves a message from folder A to Folder B. I'd like to catch this move and launch a specific script on the server.

Is it possible ?

I'm using qmail with courier-imap.

[1] bash or python script, ...

1 Answer 1

2

inotify were created for this:

inotify is a Linux kernel subsystem that provides file system event notification.

You could use inotify-tools or incron for this. To be portable between systems that do not implement inotify you can use Gamin which will fallback to supported subsystem like dnotify etc.

2
  • Thanks very much. And with inotify it will be supported on every mail server, not just qmail.
    – Oli
    Sep 29, 2009 at 7:23
  • If all your users access their email via your Courier-IMAP server, then it would make sense to make a modification to that server instead of trying to watch 'outside' with inotify. (It will be simpler, and more portable.)
    – jrg
    Sep 30, 2009 at 23:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .