Hi all, I need to parse some mails I receive with a postfix server. I want: the server to receive "mydomain.com" as local addresses (here no problem). the server to send to a bash script the mail addressed to "*@ script.mydomain.com"
I have, on /etc/postfix/transport: *script.mydomain.com myhook: * on /etc/postfix/master.cf *myhook unix - n n - 1 pipe user=nobody argv=/usr/bin/script ${sender} ${recipient} **But* I have some problems. 1) If I set: mydestination = mydomain.com, script.mydomain.com, every mail I receive on script.mydomain.com isn't redirected to script, and I receive "*Recipient address rejected*: *User unknown in local recipient table" *2) If I set: mydestination = mydomain.com, postfix doesn't accept mail for script.mydomain.com, unless I set "mynetworks = 0.0.0.0/0", and I became an open relay. How would you solve the problem? Where is my error? I think configuration 1) is the exact one, but how do I say to postfix that domain is not local and to redirect it to the script (accepting all IPs)? Thanks, Andrea