After Action Hooks

James A. Pattie james at
Mon Sep 13 15:11:22 EDT 2004

Hash: SHA1

Drew Morris wrote:
| Hello all,
| I was wondering if it would be possible to add after action hooks into
| Cyrus-IMAP/POP so that upon any change to a mailbox (folder move,
| folder rename, folder deletion, message addition, message deletion,
| message move, etc.) I would be able to fire an action like a perl
| script or some other program. The script would need to know which user
| this was performed on, the command, the element type (folder or
| message), and the unique ID of the element. This feature would be
| extremely useful for mail automation.
| In my case, I want to mainain a cache of message metadata that is kept
| in synch with the Cyrus message store pro-actively without having to
| keep calling synch functions on each mailbox. The idea would be for
| these "after action hooks" to fire off an asynchronous process that
| would be able to update the cache so that if a user looked at the
| cache they would see an up-to-date version of their data.
| Thanks in advance for your thoughts.

You could also use MailScanner and have it archive the e-mails using the
MailWatch program (writes the headers to a mysql database).

Or if MailWatch is doing too much or not enough for you, just use it as
a template for a Custom Function to plug into MailScanner to do the
archiving you are looking to do.

- --
James A. Pattie
james at

Linux  --  SysAdmin / Programmer
Xperience, Inc.

GPG Key Available at
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list