I am curious as to how the mail
command works. My computer has postfix
server installed by default with red hat and is connected to a network that includes a mail server. I had assumed that when I tried to send an email with the mail
command it would fail and bounce the email back to me with a message like "Can't deliver to '[email protected]'" since the postfix
mail server was never set up by me.
However, to my surprise when I sent the email to [email protected]
with the mail
command, I received the email correctly and was told it came from root@localhost
. I am therefore wondering how this email was able to be sent without an email server. How could whichever server managed this know how to correctly deliver the mail with the correct protocols and such to the email address that was given?