dovecot-lmtp does not exist

Solution 1:

The answers and responses already given contain all the parts of the solution, here's my attempt to tie that info together, having struggled with and now fixed the same problem:

Overview: Dovecot only acts upon the service lmtp section if lmtp appears in the protocols setting. Especially if you have a custom dovecot.conf file you may have omitted something.

Detail (for Debian, and by extension Ubuntu): Here's the key steps,

  • apt-get install dovecot-lmtpd
  • Check that dovecot.conf (in /etc/dovecot) includes the line !include_try /usr/share/dovecot/protocols.d/*.protocol: This is where protocols is set (specifically the lmtp.protocol file contains protocols = $protocols lmtp
  • Now to the service lmtp section: This should be in conf.d/10-master.conf but may be empty; the original question has settings in this section (adjust accordingly if you're doing the same thing):

    service lmtp {
      unix_listener /var/spool/postfix/private/dovecot-lmtp {
        mode = 0600
        user = postfix
        group = postfix
      }
    }
    
  • Make sure that the above conf.d/10-master.conf is included by your dovecot.conf (typically with !include conf.d/*.conf)

  • Reload Dovecot (service dovecot reload) for this configuration change to take effect
  • Double-check the running configuration with dovecot -n: Check that protocols is set and includes lmtp; check that the above service lmtp stanza appears too.
  • If you're specifying the dovecot-lmtp socket name as above, it should now exist (that service ltmp stanza tells Dovecot to create it when running), check with ls -l /var/spool/postfix/private/dovecot-lmtp
  • This should now play nicely with Postfix.

Solution 2:

I've discovered that though I have protocols = lmtp pop3 imap in /etc/dovecot/dovecot.conf, it's overridden by /etc/dovecot/conf.d/01-mail-stack-delivery.conf which contains only protocols = pop3 imap sieve. I've modified this file and the lmtp protocol is up.