Debian Sid, latest postfix from Sid.
I need to invoke bash script after user reveive mail. So, what I did:
create file /etc/postfix/transport, for example: mail@domain.com myscript
run command to create database: postmap transport
add to main.cf: transport_maps = hash:/etc/postfix/transport
add to master.cf: myscript unix - n n - - pipe user=michal flags=FR argv=/home/michal/test.sh
reload postfix
What's the problem? If I configure it this way, after mail is received, script "test.sh" will be executed, but incoming mail will not be delivered to mailbox and it will be deleted immediatelly after receiving.
So - how to avoid this? I need the script to be executed, but incoming mail should be also delivered to my mailbox.