What does postfix do when receiving emails?

Noah asked:

Okay, so here’s the situation: I’m new to this, but after a few days of Googling I finally managed to successfully setup postfix on a server. I use two subdomains for email. The first subdomain is used by the server just to send email, and the second subdomain is used to forward email. In other words, let’s say one email is [email protected], and the other subdomain is used to create forwarders, i.e. [email protected] gets forwarded to [email protected] and [email protected] gets forwarded to [email protected]

Now that you understand the basic setup, my question is: What does postfix do when it receives an email to an address that isn’t setup for receiving, or an address that isn’t setup to forward email? On the server, I have no MDA or MUA installed, just postfix, as that is all that’s necessary to send and forward emails. Normally, if the server was just sending emails, I’d edit the main.cf file to listen only on the loopback interface, but I can’t do that since I also need to receive emails in order to forward them. My concern is that if someone replies to the [email protected] email, because there is no MDA, postfix will cache the email somewhere. On a server that has just enough memory and diskspace to work with, I want to make sure that the email will simply be ignored or discarded by postfix, instead of retained in memory or written to a hard disk.

TLDR When postfix receives an email that it can’t “hand off,” does it discard the email? If not, is there a way to make it ignore those emails?

Thanks!
(By the way, if you need any more or simply more-specific info, let me know!)

My answer:


Unless you set up a catch-all address in your virtual maps, email sent to nonexistent users will simply be rejected with the error “user unknown”. The sender’s mail server will usually send a bounce email to the sender, but that is beyond your control.


View the full question and any other answers on Server Fault.


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
{"cc_re__cc_re__cc_by_sa_3_0": ["ic info, let me know!)</p>\n</div>\n<h2>My answer:</h2>\n<hr />\n<div class=\"se-answer\">\n<p>Unless you set up a catch-all address in your virtual maps, email sent to nonexistent users will simply be rejected with the error &#8220;user unknown&#8221;. The sender&#8217;s mail server will usually send a bounce email to the sender, but that is beyond your control.</p>\n</div>\n<hr>\n<p><a href=\"http://serverfault.com/a/972174/126632\">View the full question and any other answers on Server Fault</a>.</p>\n<p><a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://licensebuttons.net/l/by-sa/3.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p>\n\t</div><!-- .entry-content -->\r\n    \t<footer class=\"entry-footer\">\r\n\t\t<div class=\"tags\" itemprop=\"about\"><a href=\"https://www.ringingliberty.com/tag/postfix/\" rel=\"tag\">postfix</a></div>\t</footer><!-- .e", "ser unknown&#8221;. The sender&#8217;s mail server will usually send a bounce email to the sender, but that is beyond your control.</p>\n</div>\n<hr>\n<p><a href=\"http://serverfault.com/a/972174/126632\">View the full question and any other answers on Server Fault</a>.</p>\n<p><a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://licensebuttons.net/l/by-sa/3.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p>\n\t</div><!-- .entry-content -->\r\n    \t<footer class=\"entry-footer\">\r\n\t\t<div class=\"tags\" itemprop=\"about\"><a href=\"https://www.ringingliberty.com/tag/postfix/\" rel=\"tag\">postfix</a></div>\t</footer><!-- .entry-footer -->\r\n\t</article><!-- #post-10549 -->\r\n\r\n\t\t</main><!-- #main -->\r\n        \r\n                    \r\n            <nav class=\"navigation pagination\" role=\"navigation\">\r\n    \t\t\t<h2 class=\"screen-reader-text\">Post Navigati"], "copyright__copyright__copyright": ["y the way, if you need any more or simply more-specific info, let me know!)\n\nMy answer:\n\n\nUnless you set up a catch-all address in your virtual maps, email sent to nonexistent users will simply be rejected with the error \u201cuser unknown\u201d. The sender\u2019s mail server will usually send a bounce email to the sender, but that is beyond your control.\n\n\nView the full question and any other answers on Server Fault.\n\n\nThis work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.", "y the way, if you need any more or simply more-specific info, let me know!)\n\nMy answer:\n\n\nUnless you set up a catch-all address in your virtual maps, email sent to nonexistent users will simply be rejected with the error \u201cuser unknown\u201d. The sender\u2019s mail server will usually send a bounce email to the sender, but that is beyond your control.\n\n\nView the full question and any other answers on Server Fault.\n\n\nThis work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License."]}