523 Encryption Needed: Invalid Unencrypted Mail

I’m trying to set up a chatmail account so I can use it with both a Deltachat client and a classic client, (neomutt).

(There are other posts here on Chatmail servers, so I hope my problems with getting Neomutt talking to nine.testrun.org won’t be considered offtopic.)

I had little trouble getting Neomutt talking to Nine over IMAP. So now my Deltachat messages are backed up in Maildir format (I intend to post a howto once it’s all working).

The SMTP is more of a problem. Neomutt certainly thinks it is encrypting my outgoing messages, and the keys seem correct. But the server complains the messages are unencrypted:

msmtp: the server did not accept
the mail
msmtp: server message: 523
Encryption Needed: Invalid
Unencrypted Mail
msmtp: could not send mail
(account
xxxxxxxx@nine.testrun.org from
/home/mobian/.msmtprc)

The relevant bits I’m trying in my muttrc config file:

set crypt_replysign
set crypt_replysignencrypted
set pgp_show_unusable=no
set crypt_use_gpgme=yes
set crypt_opportunistic_encrypt=yes
set pgp_self_encrypt=yes
set crypt_autoencrypt=yes
set crypt_replyencrypt=yes

If anyone has any pointers, I’d appreciate them!

I’ve now had this problem with other mailclients. Encryption with the recipient’s key seems to be working fine. I suspect that it is the OpenDKIM that I’m not managing right.

I’m not sure where I’d find my DKIM keys or config in Deltachat. Any advice welcome.

edit: Don’t think this is DKIM after all, would be more likely to get a 5.7.1 No valid DKIM signature found message.

The code that filters mails on a chatmail server returns this error on a fall-through condition.

I’ll poke at this some more and post any useful results.