2

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:

[email protected] -> delivered to -> cam8001@localhost

[email protected] -> delivered to -> cam8001@localhost

[email protected] -> delivered to -> cam8001@localhost

1 Answer 1

4

I found this article explaining how to do it with postfix.

The key is:

luser_relay = cam8001@localhost
local_recipient_maps =

as explained in the article:

luser_relay is the local user on the machine to catch all email that does not belong to an existing local user. luser_relay documentation.

local_recipient_maps is left blank to stop Postfix from checking if the user exists on the local machine. This is very important, without this line, Postfix will still reject the mail and send a bounce message.

After adding the above two lines to the configuration, apply the changes and restart Postfix.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .