[SOLVED] Sending email no longer works with 24.10.0

Hi all,

sending email using msmtp as described here https://forum.openwrt.org/t/solved-sending-email-with-msmtp-and-gpg/220780 no longer works after I upgraded to OpenWrt 24.10.0.

The command from CLI echo -e "Subject: Test Email\n\nThis is a test email" | msmtp myemail@myemail.com gives:

msmtp: TLS handshake failed: The encryption algorithm is not supported.
msmtp: could not send mail (account default from /etc/msmtprc)

The same command with exactly the same msmtprc settings runs with success on my Linux Mint PC.

Double checked vs 23.05.5, and the only difference is that 23.05.5 had msmtp - 1.8.25-1 while 24.10.0 has msmtp 1.8.26-r1.

Thanks in advance for your help.

Works here running OpenWRT One with 24.10.0 ...

1 Like

Here follows the /etc/msmtprc that worked with 23.05.5, works with Linux Mint PC (just checked) and no longer works with 24.10.0

account myemail
host smtp.myemail.com
port 465
auth on
tls on
tls_starttls off 
tls_certcheck off

from_full_name ...
from ...
user ...
password ...

account default : myemail

logfile /tmp/msmtp.log

Also tried with the following but It doesn't work, the command simply doesn't terminate its execution, so no logs too...:

account myemail
host smtp.myemail.com
port 465
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

from_full_name ...
from ...
user ...
password ...

account default : myemail

logfile /tmp/msmtp.log

I would change the port to 587 an try again ...

This is my setup running 24.10.0

# Set default values for all following accounts.

defaults

auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt



account        myaccount
host           mail.somewhere.there
port           587
from           webmaster@somewhere.there
user           webmaster@somewhere.there
password       tooweakbutfancy


# Set a default account
account default : myaccount

Do you remember to fix this?

1 Like

Tried, but unfortunately it doesn't work; nevertheless, double checked and found that smtp.myemail.com allows 465 only.

Sorry... what do you mean?

The GUI says my post can't be empty...

You... turned... TLS... Certificiate VALIDATION... off, and ask me what I mean? :no_mouth:

Fortunately I've just found another smtp with which my initial msmtprc still works:

account thisworks
host smtp.thisworks.it
port 465
auth on
tls on
tls_starttls off
tls_certcheck off
from_full_name ...                 
from ...         
user ...         
password ...
account default : thisworks                                        
                                                                
logfile /tmp/msmtp.log

Thanks anyway.

Please fix your local tls validation chain and turn these knobs on again.

Not sure if the following https://openwrt.org/docs/guide-user/services/tls/pki is the right procedure, but:

  1. Got the root CA cert of smtp.thisworks.it
  2. Installed and added it to my system's trust store
  3. Modified msmtprc as follows:
     account thisworks
     host smtp.thisworks.it
     port 465
     auth on
     tls_starttls off
     tls on
     tls_trust_file /etc/ssl/certs/ca-certificates.crt
     from_full_name ...                 
     from ...         
     user ...         
     passwordeval gpg --homedir /root/.gnupg -qda /etc/msmtp-pass.gpg
     account default : thisworks
     logfile /tmp/msmtp.log

Moreover, changed password with passwordeval and it works.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.