I cannot modify the mail.config file. Each time I restart openhab2 the file is re-written to its previous state. How do I make a permanent change to this file? Help please.
You should not modify /var/lib/openhab2/config/org/openhab/mail.config. That is a file automatically created by openHAB. You should modify /etc/openhab2/services/mail.cfg.
Or even better, when OH 2.5 M2 comes out install the Mail 2.5 Binding and use it instead of the now deprecated Mail Action.