HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix - don't reject unknown user for specific domain (http://www.howtoforge.com/forums/showthread.php?t=59745)

patrick3853 29th November 2012 20:22

Postfix - don't reject unknown user for specific domain
 
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

pititis 29th November 2012 22:46

Hello,

add @example.com to the relay recipient map,

Cheers!


All times are GMT +2. The time now is 02:16.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.