Hi, I'm trying to execute a script when a mail arrives in a given user's mailbox. Something like .dovecot.sieve. The reason I'm not using sieve itself is that I need to do stuff on mail arrival, which is beyond sieve's features. So is there a way to tell dovecot to run a script when a mail arrives in a certain mailbox? Optionally a solution to forward the whole mail to a script would be good too. -- Dennis Becker
Dennis Becker wrote:> I'm trying to execute a script when a mail arrives in a given user's > mailbox. Something like .dovecot.sieve. > The reason I'm not using sieve itself is that I need to do stuff on mail > arrival, which is beyond sieve's features.I am not totally sure, being very new to dovecot, but doesn't dovecot's "deliver" execute the .dovecot.sieve if the sieve plugin is installed and configured? protocol lda { # ... mail_plugins = cmusieve } Seeing when the .dovecot.sievec is created, it looks like that is done on delivery time, not when reading. Regards, Juergen.
This sounds like a better task to do at the MTA level. I know Postfix has the capability to do such things. You can write a Perl script for example and make entries in the main.cf and/or master.cf files and postfix will pass the e-mail to that script during the rest of it's processing. Tom Dennis Becker wrote:> Hi, > I'm trying to execute a script when a mail arrives in a given user's > mailbox. Something like .dovecot.sieve. > The reason I'm not using sieve itself is that I need to do stuff on mail > arrival, which is beyond sieve's features. > > So is there a way to tell dovecot to run a script when a mail arrives in > a certain mailbox? Optionally a solution to forward the whole mail to a > script would be good too. >
Possibly Parallel Threads
- sievec fails when last line is a comment without trailing \n
- recipient delimiter results in sieve errors
- deliver tries to compile already compiled sieve script
- Sieve and OX push_notification_drive seem to not work together
- Sieve: reject certain mime-types and notify recipient