How does postfix send mail without smtp settings?

6,556

The primary duty of any mail server is to route mails to their destination. When you send an email to [email protected], using sendmail [email protected] the following happens.

  • Your mail is handed over to SMTP server on your local machine.

  • If you had configured your mail server to route mails (for eg. Send mails of example.org to example.net server) then your email server will honour it.

  • If you had never configured your email server, it will do an MX lookup for the domain example.org and deliver the mail to the MX server of the domain. If MX record doesn't exist for that domain, it will try to deliver the mail to A record, if available.

You will need an SMTP server (postfix,sendmail,qmail or exim) to send emails without configuring any SMTP settings. Hope that helps.

Share:
6,556

Related videos on Youtube

Zabba
Author by

Zabba

Updated on September 18, 2022

Comments

  • Zabba
    Zabba almost 2 years

    I am running vagrant. In it, I have Ubuntu 14.04 server and installed postfix. I am able to send email using sendmail [email protected] (after typing in body etc.) This works.

    How is postfix able to send email to gmail even though I configured nothing about postfix (did not specify any smtp settings for my gmail accoun, for example)

    Also, postfix looks like a full-fledged email server? What can I install so that I can send email without having to install postfix (and without giving any smtp settings for this program X)?