CapnBry / HeaterMeter

HeaterMeter and LinkMeter Arduino BBQ Controller
https://tvwbb.com/forums/heatermeter-diy-bbq-controller.85/
MIT License
499 stars 83 forks source link

msmtp configuration broken for PLAIN LOGIN authentication #58

Closed jefw closed 3 years ago

jefw commented 3 years ago

When creating an SMTP Client configuration where:

The admin interface creates /etc/msmtptc with "auth on". This causes msmtp to fail with "cannot use a secure authentication method" error.

For SMTP servers supporting only PLAIN LOGIN, the appropriate directive is "auth login".

@CapnBry - I have attached a lightly tested patch to openwrt/package/luci-app-msmtp/luasrc/model/cbi/admin_services/msmtp.lua, feel free to use if you wish or I can make a PR if you prefer.

patch.txt

CapnBry commented 3 years ago

Nice work finding this. I think I just looked at the auth xxx section of the msmtprc file and thought that "on" was the only option. Your patch overlooks that LOGIN and CRAM-MD5 are also valid auth options so instead of forcing it to PLAIN, I now just let the user select which auth mechanism they want (including "Auto" which is what the old version did).

jefw commented 3 years ago

That's the better solution, for sure. I didn't really want to noodle with the UI, but an option list is surely more usable in the end.