mbsync (isync)
UseKeychain yes
Add the above to mbsync configuration and create the keychain item with:
msmtp
Use the exact host
and user
configured in .msmtprc
. The process is automatic if you got these right and have compiled msmtp with macOS Keychain support.