How to configure Postfix to send specific error code for a domain?

Henno asked:

I need to configure Postfix to send 451 4.7.0 Temporary problem, please try again later for a specific domain.

I have tried to google for returning custom error codes for a domain with no luck so far.

My answer:


You should be able to add the domain and desired text to access.

For example:

example.com 451 4.7.0 Temporary problem, please try again later

Remember to run postmap on it after editing it and reload Postfix.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.