[Dovecot] Execute Script on LMTP Deliver?
Edward Carraro
ednitido at gmail.com
Thu Dec 9 22:59:07 EET 2010
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
More information about the dovecot
mailing list