I have already read Why use Dovecot AND Postfix/Sendmail?, Why use both Dovecot and Postfix?, Why use both Dovecot and Postfix? which give the general idea, but here I'm looking for more precise details to understand how email servers connect together.

Let's say I own the domain example.com with DNS configured like this:

example.com       MX     mail.example.com
mail.example.com  A

and postfix and dovecot are intalled on my Debian server of IP

Let's say I send an email:

What is the big picture of the different connections that will happen during this process?

Is the following correct:

  1. My local computer connects to smtp.myisp.com (port 25 or 587)
  2. My ISP's SMTP server (postfix?) queries the DNS of example.com and eventually will connect to mail.example.com, i.e. my own server where postfix is listening on port 25 or 587
  3. My server's postfix saves the email on disk (where, by default?)
  4. or postfix sends the email to dovecot (how do they connect together?)
  5. When eventually I want to fetch mail on [email protected] with another Thunderbird account, the computer will connect my server on port 110 or 995 (POP3).


In this case, postfix is the MTA, dovecot is the POP3/IMAP server, but what is the MDA/LDA (Delivery Agent)?

  • That's most likely a question for serverfault.com not unix.se. Sep 22, 2021 at 12:36
  • @Basj It does seem like there's no specific UNIX/Linux question here; would you like to move this question to SF?
    – Jeff Schaller
    Sep 22, 2021 at 13:00
  • @Artem if you think the question belongs on SF, I'm curious why you answered it here?
    – Jeff Schaller
    Sep 22, 2021 at 13:00
  • @JeffSchaller I'm specifically speaking about a setup in Debian machines, using postconf, etc. thus I posted here, but I agree it is located at the intersection of these different sites.
    – Basj
    Sep 22, 2021 at 13:07
  • 1
    Since it's using software on a Debian system, I'm OK with leaving it here. If you have further questions along the general mail transport line, please consider SF; if it goes towards specific configuration of the MTA/MDA, then I think U&L is appropriate. Thank you!
    – Jeff Schaller
    Sep 22, 2021 at 13:14

1 Answer 1

  1. That depends on how your SMTP client is set up but in general that's correct.
  2. Correct.
  3. Let's talk about qmail-compatible maildirs as no one really uses /var/mail/username UNIX-style mailboxes any longer (too many disadvantages, barely any advantages). Emails are stored where you specify your Maildir is, by "default" it's
sudo postconf -e "home_mailbox = Maildir/"
  1. By default postfix doesn't send emails to anyone or anything, it just stores them using the built-in delivery agent. There's no communication between dovecot and postfix per se AFAIK.
  2. You connect to dovecot, and it allows you to work with the user qmail-compatible maildir specified above, e.g.
mail_location = maildir:~/Maildir

In this case, postfix is the MTA, dovecot is the POP3/IMAP server, but what is the MDA/LDA (Delivery Agent)?

Postfix again: http://www.postfix.org/OVERVIEW.html : man 8 local.

  • Thanks for your detailed answer. Last thing: in 1., 2., 3., 4., 5., where is the MDA/LDA? I don't really see where the MTA and MDA differ, can you add precisions about this?
    – Basj
    Sep 22, 2021 at 12:53

You must log in to answer this question.

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