Programmatic provisioning Thunderbird / Add IMAP account, SMTP server and CalDAV from shell script
Hi,
I use Thunderbird on Debian Linux 11. I'm a developer, so I'm not scared of JS files, JSON etc. ;)
I want my custom-built user workplace provisioning scripts to setup Thunderbird, as part of a larger deployment process.
My aims, to be done using Thunderbird command line parameters or by file modification operations in file system: 0) Initial cleanup: rm -r ~/.thunderbird 1) Setup a new empty profile 2) Create an IMAP account: User's email address, user's name, IMAP server host, IMAP server port, IMAP server username, IMAP server password, always TLS 3) Create default SMTP entry: User's email address, user's name, SMTP server host, SMTP server port, SMTP server username, SMTP server password, always TLS 4) Delete device-local default Lightning calendar 5) Use CalDAV calendar on Internet server: CalDAV URL, username, password
Step 0 is easy. :D
Can you give some advice how to get steps 1 - 5 done?
Is there maybe a ready to use tool for provisioning / bootstrapping Thunderbird? Or an addon?
If I have to do it myself: Concerning steps 2/3: I guess the first step is modifying the "prefs.js". For example, for SMTP, I can write properties like
user_pref("mail.smtp.defaultserver", "smtp1"); user_pref("mail.smtpserver.smtp1.authMethod", 4); user_pref("mail.smtpserver.smtp1.clientid", "...UUID..."); // What is this UUID used for?? user_pref("mail.smtpserver.smtp1.description", "some description"); user_pref("mail.smtpserver.smtp1.hostname", "smtp.server.local"); user_pref("mail.smtpserver.smtp1.port", 465); user_pref("mail.smtpserver.smtp1.try_ssl", 3); user_pref("mail.smtpserver.smtp1.username", "user@server.local");
But how and where to store the password? (Same problem for IMAP.)
Thanks a lot! Sebastian