[SOLVED] sendMail using encrypted password

(Bernd) #1

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.

0 Likes

(Rich Koshak) #2

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

(Bernd) #3

ok - thanks a lot

0 Likes