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?

(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.

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