Having a problem with piping emails from postfix to shell script. Here's the setup:
Ubuntu 12.10, Postfix with MySQL Virtual Users (followed
this guide)
I have domain example.com which I am hosting email for. When an email comes in for example.com, if a virtual user exists for the to address then send the email normally. If the user doesn't exist, pipe the email to a script.
I have set up a transport for example.com and defined it in master.cf to pipe the email to the script. The script checks if a user exists for the To address and acts accordingly. The problem is that if the user doesn't exist, the email never makes it to my transport. Instead I get "user unkown in virtual alias table" in mail.log.
So the question is, how can I tell postfix not to reject email for unkown users on a specific domain, or is that even possible?
btw, I know that adding a catchall alias for the domain will solve this, but it doesn't work in my setup as I need to preserve the To address, and a catchall alias changes the to address to the catchall.
Thanks in advance for any help
Recent comments
1 day 19 hours ago
1 day 21 hours ago
2 days 9 hours ago
2 days 12 hours ago
2 days 16 hours ago
2 days 22 hours ago
3 days 7 hours ago
3 days 9 hours ago
3 days 17 hours ago
3 days 19 hours ago