Is it possible to have dovecot 2.0.8 using LMTP run a shell script each time it delivers a message to a users mailbox? I see there's an "execute = script /path/to/script" but when i added it to lmtp service in 10-master.conf, it didnt do anything and stopped delivering mail altogether service lmtp { executable = script /usr/local/bin/test.sh u% unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix user = postfix } inet_listener lmtp { port = 24 } } $ ls -lh | grep test -rwxrwxrwx 1 root staff 270 2010-12-09 18:05 test.sh $ cat test.sh #!/bin/sh USER=$1 echo $USER > /tmp/newfile basically when a message arrives, it will execute a shellscript which will notify another service that mail has arrived in their inbox
On Thu, 2010-12-09 at 15:59 -0500, Edward Carraro wrote:> Is it possible to have dovecot 2.0.8 using LMTP run a shell script each time > it delivers a message to a users mailbox?Nope.> basically when a message arrives, it will execute a shellscript which will > notify another service that mail has arrived in their inboxMaybe with Sieve enotify extension? I think you can cause it to send another mail :) Then point it to some address where MTA is configured to execute your script.