On Wed, 12 Jul 2006, Romeo Theriault wrote:
Hi, I have dovecot installed and working fine. I would like (server side) a rule runs on all messages and if it finds certain words in the message it will run a script which will send a new email.
It depends on what the "new email" is and what to do if a mail has more than one recipient and if you also want to do something, if an user uploads a message via IMAP.
If the latter is required, go with an script, but use some heuristic, in order to skip already processed mails, unless you have only few users. (Might be good to favour Maildir over mbox, too.)
Otherwise, I'd tend to perform this action during or even before delivery. New Dovecot LDA has Sieve support, procmail is capable of doing anything (except to prepare coffee), Sendmail/MIMEDefang combo can do so during SMTP time. If you already run a SPAM detection filter, maybe you can configure it accordingly.
Actually, you can use any script or program, that can run as filter, in chain before any LDA, hence, the possibilities are wide open.
Bye,
-- Steffen Kaiser