I am having problems comfiguring Postfix and Dovecot to communicate via lmtp on 
Ubuntu.

The following is an excerpt of my Dovecot configuration:

protocols = imap lmtp

protocol lmtp {
  postmaster_address = postmas...@wiskit.com    # required
  mail_plugins = quota sieve
  lmtp_rawlog_dir = /var/log/dovecot-lmtp
}

service lmtp {
  inet_listener lmtp {
    address = *
    port = 24
    }

  unix_listener /var/spool/postfix/private/lmtp {
    group = postfix
    mode = 0660
    user = postfix
    }
}

The following is an exceprt of my Postfix configuration:

virtual_transport = lmtp:unix:private/lmtp
mailbox_transport = lmtp:unix:private/lmtp

The following are the lmtp sockets that got created automatically when I 
started Dovecot. (I am not sure why the first socket is getting created.)

srw-rw-rw- 1 root    root    0 Mar 31 13:44 /var/run/dovecot/lmtp
srw-rw---- 1 postfix postfix 0 Mar 31 13:44 /var/spool/postfix/private/lmtp

I have successfully used socat to submit an email to Dovecot using lmtp, and 
Thunderbird showed this email in my Inbox, so I am fairly sure that Dovecot is 
correctly configured and that the problem is with Postfix.

# socat - UNIX-CONNECT:/var/spool/postfix/private/lmtp
220 Pluto Dovecot (Ubuntu) ready.
lhlo wiskit.com
250-Pluto
250-8BITMIME
250-CHUNKING
250-ENHANCEDSTATUSCODES
250-PIPELINING
250 STARTTLS
mail from:<he...@wiskit.com>
250 2.1.0 OK
rcpt to:<herbw>
250 2.1.5 OK
data
354 OK
From: Herb Weiner <he...@wiskit.com>
To: Herb Weiner <he...@wiskit.com>
Subject: Testing lmtp using socat

This is a test email
.
250 2.0.0 <herbw> ABkiC7MJ62daCwAARkBUVA Saved
quit
221 2.0.0 Bye

The verbose logs in /var/log/dovecot-lmtp all show the same pattern:

-rw------- 1 root root   0 Mar 31 15:32 20250331-153257.3510.7.in
-rw------- 1 root root  53 Mar 31 15:32 20250331-153257.3510.7.out

# cat 20250331-153257.3510.7.out

1743460377.751537 220 Pluto Dovecot (Ubuntu) ready.
1743460677.851664 421 4.4.2 Pluto Disconnected for inactivity

The following is an excerpt from my /var/log/mail.log:

2025-03-31T15:32:57.690248-07:00 Pluto postfix/qmgr[2346]: BCA7B2B41147: 
from=<he...@pluto.wiskit.com>, size=612, nrcpt=2 (queue active)
2025-03-31T15:32:57.696541-07:00 Pluto postfix/qmgr[2346]: 947212B406A4: 
from=<he...@pluto.wiskit.com>, size=581, nrcpt=2 (queue active)
2025-03-31T15:32:57.696791-07:00 Pluto postfix/local[3507]: BCA7B2B41147: 
passing <he...@pluto.wiskit.com> to transport=lmtp
2025-03-31T15:32:57.731171-07:00 Pluto postfix/local[3508]: warning: unexpected 
end-of-input from private/lmtp socket while reading input attribute name
2025-03-31T15:32:57.731248-07:00 Pluto postfix/local[3508]: warning: 
private/lmtp socket: malformed response
2025-03-31T15:32:57.750433-07:00 Pluto postfix/local[3508]: F1FF52B407F4: 
to=<he...@pluto.wiskit.com>, relay=none, delay=249764, 
delays=249464/0.07/0/300, dsn=4.3.0, status=deferred (mail transport 
unavailable)
2025-03-31T15:32:57.751092-07:00 Pluto postfix/local[3508]: 947212B406A4: 
passing <he...@pluto.wiskit.com> to transport=lmtp
2025-03-31T15:37:57.798352-07:00 Pluto postfix/local[3507]: warning: unexpected 
end-of-input from private/lmtp socket while reading input attribute name
2025-03-31T15:37:57.834555-07:00 Pluto postfix/local[3507]: warning: 
private/lmtp socket: malformed response
2025-03-31T15:37:57.834782-07:00 Pluto postfix/qmgr[2346]: 1CA0B2B407EF: 
from=<he...@pluto.wiskit.com>, size=608, nrcpt=2 (queue active)
2025-03-31T15:37:57.851977-07:00 Pluto postfix/local[3508]: warning: unexpected 
end-of-input from private/lmtp socket while reading input attribute name
2025-03-31T15:37:57.852038-07:00 Pluto postfix/local[3508]: warning: 
private/lmtp socket: malformed response
2025-03-31T15:37:57.853270-07:00 Pluto postfix/local[3507]: BCA7B2B41147: 
to=<he...@pluto.wiskit.com>, relay=none, delay=72387, delays=72087/0.01/0/300, 
dsn=4.3.0, status=deferred (mail transport unavailable)

I'd be happy to supply any other configuration details or log output, test any 
configuration changes, or enable any additional debugging. Thanks for your 
assistance.

Herb


_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to