-1

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!)

2
  • 1
    How did you configure Postfix to do email forwarding? Jun 20, 2019 at 0:20
  • @MichaelHampton I added these two lines to the main.cf file: virtual_alias_domains = fwd.example.com and virtual_alias_maps = hash:/etc/postfix/virtual and then added the forwarding rules to the virtual file as such: [email protected] [email protected]. Finally, I ran the command sudo postmap /etc/postfix/virtual. As I said, I'm a newbie to all of this, but I tested it and it seemed to work fine.
    – Noah
    Jun 20, 2019 at 1:21

1 Answer 1

1

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.

3
  • Thank you, so it's safe to assume their email won't be cached anywhere once it's rejected?
    – Noah
    Jun 20, 2019 at 1:36
  • @Noah Cached somewhere? What do you mean? Postfix won't even save a copy of a rejected email. Jun 20, 2019 at 1:41
  • Perfect, just checking to make sure. Thanks!
    – Noah
    Jun 20, 2019 at 1:42

You must log in to answer this question.

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