[SOLVED] sendMail using encrypted password

After reading the different guidance to setup the mail action I am wondering if it is possible to store the username and password in base64 encoded way in the mail.cfg file? I rather would not like to store any password in clear text.

Thanks a lot.

There is not but if you set the permissions on that file to 0600 only the openhab user (and root of course) can open and read that file.

It is pretty standard to have that sort of information in config files and the mitigation is always to restrict the file permissions. Most of the mail programs I’ve used on Linux (e.g. ssmtp) store username and password in this way. Of course since I use it with gmail and I have 2-factor auth turned on, I have to generate a special application specific password. So it’s not like even if the password were compromised they could suddenly log into my account and I can easily revoke the password.

1 Like

ok - thanks a lot