I have:
postfix->dovecot-> new mail go to [[email protected]] mailbox
postfix->dovecot-> new mail go to [[email protected]] mailbox
postfix->dovecot-> new mail go to [[email protected]] mailbox
I need run script when incoming mail comes and be saved by dovecot for domain 22222.xemple.com
how to make when the new email comes to [email protected] dovecot run script: sh /my/script/run/after/new/email/in/22222_xemple_com/run.sh
use incron
/var/spool/incron:
--------------------- stop read! older solution is not good ---- I use ather programs for do it https://github.com/rvoicilas/inotify-tools/wiki#info
server: centos 6
script postfix-parser.sh to test if new letter comes to folder:
script checker_postfix-parser.sh to check if script run:
add to startup: add this line:
to file:
run checker in cron every 5 min: