OpenSMTPD and Thunderbird: smtp-in: Bad input on session 5.5.1 Invalid command: Pipelining not supported

While trying to connect to OpenSMTPD running on Debian Stretch Thunderbird couldn’t auto-configure the account and provided the following error in the logs:  
email smtpd[566]: smtp-in: Bad input on session 6567905e3020707c: 500 5.5.1 Invalid command: Pipelining not supported
  This is a Thunderbird config issue, not a server side issue. Change the settings from SSL/TLS to STARTTLS and that should sort it.

Thunderbird and Google Apps or Gmail – wrong password message despite correct password being entered

This is a frustrating issue – you have youreslf a shiny new Gmail or Google apps account, but for some reason when you try to add the account to Thunderbird it complains about your password being incorrect:  
Configuration could not be verified – is the user name or password wrong?
  After double checking that the password is indeed correct, the most common cause we have found for this is that IMAP is disabled in your gmail settings. Log into your gmail via a web browser and click on the gear in the top right, then select:  
Settings -> Forwarding and Pop/IMAP
  Once you are in the Forwarding and Pop/IMAP tab, scroll down until you see:
IMAP Access
  Hopefully the radio button for Disable IMAP is selected. If so, select “Enable IMAP”, save your settings and try again. Hopefully that ends your frustrating login attempts!