Why use both Dovecot and Postfix?

17,484

Postfix and Dovecot do different things.

Postfix is an MTA, or Mail Transfer Agent. It accepts mail from the outside world and from local sources, and routes it to its destination. This may involve an smtp connection to another machine, or it may involve delivering it to a local delivery agent or writing it directly to an mbox. When an MTA goes wrong, things get ugly; your machine may be used to bounce huge amounts of spam, for instance. However, because of the way that our email system works, an MTA has to interact constantly with both legitimate and unwanted mail sources.

Dovecot is mailbox interface software. Specifically, it allows users to access their mailboxes using the IMAP interface. If configured correctly, it only interacts with authenticated users. This means that in general, dovecot doesn't have to "talk to the bad guys."

The view from 50,000 feet: Postfix "knows about" smtp. Dovecot "knows about" IMAP.

(Yes, postfix can use dovecot to perform authentication, and dovecot's lda to put mail in mboxes, so there's definitely more to the story.)

Share:
17,484

Related videos on Youtube

Alan
Author by

Alan

CEO ReminderDental.com. Part time dentist, full time developer. Developer in: C++, C#, PHP, HTML, CSS, Javascript Managing services in: MySQL, Apache, Ubuntu, Linux, SMS hardware and software, online video delivery with RTMP and HTML5 Setup, install and maintain servers in multiple datacenters around the country creating a independent CDN with failover to Amazon Expert in hardware and software troubleshooting. Spent 15 years in desktop support, networking, webmaster. I tend to learn anything and everything needed to get the job done. I work with very talented developers, but try to make sure I am capable of stepping in anywhere needed, as well as doing the research into product selections and initial development for many solutions prior to handing off to others.

Updated on September 18, 2022

Comments

  • Alan
    Alan over 1 year

    Just out of curiosity, there are dozens / hundreds of tutorials helping you setup a dovecot - postfix mail server. On the surface, both of them are email servers, why use both? Mail servers are complicated enough, why have 2 things to manage and troubleshoot?

    Makes about as much sense on the surface as running CentOS inside Ubuntu and always wondering why ./configure is confused :)

    http://www.dovecot.org/

    Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory.

    http://www.postfix.org/

    What is Postfix? It is Wietse Venema's mail server that started life at IBM research as an alternative to the widely-used Sendmail program. Now at Google, Wietse continues to support Postfix.

    I followed one of those many guides and got it all working with TLS authentication to Postfix and ISPConfig, then realized at the end that I really never had to touch Dovecot, but wasn't sure if it had to be there for the spam filters, antivirus or some other thing I am not thinking of.