To avoid saving the password in cleartext in the configuration file, it should be possible to call an external program that prints the necessary password to stdout.
stdout