I have been using Dovecot with great success for several months now with one problem:
I have received several messages (3 to date out of a much larger number) which cause Dovecot LMTP to drop the connection with sendmail after only receiving the first part of the message.
Dovecot saves the first part to INBOX, and then drops the link with sendmail as it sees the rest of the data from sendmail as new (and invalid) commands
Sendmail sees the delivery as unsuccessful and requeues the message, so the cycle continues until i kill the queue
Finally, I have kept one such message from the sendmail queue (df and qf) should this be useful, but prefer not to post here as not sanitised
Dec 9 12:00:10 phone dovecot[179]: lmtp(20774): Connect from local
Dec 9 12:00:10 phone sm-mta-rx[20764]: STARTTLS=client, relay=localhost, version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Dec 9 12:00:10 phone dovecot[179]: lmtp(20775): Connect from local
Dec 9 12:00:10 phone sm-mta-rx[20763]: STARTTLS=client, relay=localhost, version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Dec 9 12:00:10 phone dovecot[179]: lmtp(20775): Disconnect from local: Too many invalid commands. (state=READY)
Dec 9 12:00:10 phone sm-mta-rx[20763]: STARTTLS: write error=syscall error (-1), errno=32, get_error=error:00000000:lib(0):func(0):reason(0), retry=1, ssl_err=5
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: SYSERR(root): timeout writing message to localhost: Broken pipe
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 0: fl=0x0, mode=20666: CHR: dev=30/1306024, ino=301, nlink=1, u/gid=0/0, size=0
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 1: fl=0x1, mode=20666: CHR: dev=30/1306024, ino=301, nlink=1, u/gid=0/0, size=0
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 2: fl=0x1, mode=20666: CHR: dev=30/1306024, ino=301, nlink=1, u/gid=0/0, size=0
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 3: fl=0x4002, mode=100600: dev=1/2, ino=26089780, nlink=1, u/gid=0/23, size=2041
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 4: fl=0x0, mode=20666: CHR: dev=30/1306024, ino=575, nlink=1, u/gid=0/0, size=0
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 5: fl=0x2, mode=140666: SOCK localhost->[[UNIX: /var/run/mDNSResponder]]
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 6: fl=0x0, mode=100640: dev=1/2, ino=25887976, nlink=1, u/gid=0/23, size=12288
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 7: fl=0x0, mode=100640: dev=1/2, ino=25887976, nlink=1, u/gid=0/23, size=12288
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 8: fl=0x0, mode=100600: dev=1/2, ino=26088246, nlink=1, u/gid=0/23, size=58024
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 9: fl=0x6, mode=140444: SOCK localhost->(Invalid argument)
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 10: fl=0x6, mode=140444: SOCK localhost->(Invalid argument)
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 11: fl=0x0, mode=100640: dev=1/2, ino=25768590, nlink=1, u/gid=0/23, size=12288
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: 12: fl=0x0, mode=100640: dev=1/2, ino=25768590, nlink=1, u/gid=0/23, size=12288
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: MCI@0x0: NULL
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: MCI@0x7fae2c814818: flags=26404c<CACHED,ESMTP,8BITMIME,INMIME,ENHSTAT,PIPELINED,TLSACT>, errno=32, herrno=0, exitstat=75, state=8, pid=0, maxsize=0, phase=client DATA 354, mailer=dovecot, status=4.4.2, rstatus=(null), host=localhost, lastuse=Wed Dec 9 12:00:10 2020\n
Dec 9 12:00:10 phone sm-mta-rx[20763]: 0B89mOON016803: to=<s****************>, delay=1+01:11:31, xdelay=00:00:00, mailer=dovecot, pri=4787366, relay=localhost, dsn=4.4.2, reply=75, stat=Deferred