I'd like to configure an SMTP MTA to accept all mail addressed to any domain and deliver it to my local user account.
It would be very useful for debugging mail sent in some code I'm working on. I'll be running the server locally – no outside world interaction required.
To be clear:
user@gmail.com -> delivered to -> cam8001@localhost
dogs@live.com -> delivered to -> cam8001@localhost
anything@any.domain.co.uk -> delivered to -> cam8001@localhost
Best Answer
I found this article explaining how to do it with postfix.
The key is:
as explained in the article: