Postfix Email – Accept All Incoming Emails with Unknown Name and Redirect to Known User

emailpostfixredirect

when i send mail into my root@mydomain.com address, this works.

but when i send mail into another inexistent user mail address (like sdfsdfdsf@mydomain.com) this reject the e-mail:

Recipient address rejected: User unknown in local recipient table (state 13).

How can i accept all mails (and redirect the 'unknown addresses' into root@mydomain.com)?

Thanks!

Best Answer

Checkout the config parameter user_relay to set the catchall user. And to not block non-existing users local_recipient_maps must me empty. So in your case:

luser_relay = root@mydomain.com
local_recipient_maps =