Important Notice: We're experiencing email notification issues. If you've posted a question in the community forums recently, please check your profile manually for responses while we're working to fix this.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How to retrieve or change the smtp server by command line?

  • 2 답장
  • 4 이 문제를 만남
  • 46 보기
  • 최종 답변자: Elwoodb

more options

Imagine that 200 people in a company use Thunderbird. The SMTP server needs to be changed. So how is it possible to retrieve or change the smtp server by command line? So that we can update the smtp on every 200 account automatically.

Thanks.

Imagine that 200 people in a company use Thunderbird. The SMTP server needs to be changed. So how is it possible to retrieve or change the smtp server by command line? So that we can update the smtp on every 200 account automatically. Thanks.

선택된 해결법

I suggest you write a script to search prefs.js in the users' profiles for the relevant smtp server setting. You can then extract the internal numerical identifier and use that to locate the relevant settings.

e.g.

these are all the entries referring to the smtp server for my gmx account.

user_pref("mail.smtpserver.smtp21.authMethod", 3);
user_pref("mail.smtpserver.smtp21.description", "GMX SMTP");
user_pref("mail.smtpserver.smtp21.hostname", "mail.gmx.com");
user_pref("mail.smtpserver.smtp21.port", 465);
user_pref("mail.smtpserver.smtp21.try_ssl", 3);
user_pref("mail.smtpserver.smtp21.username", "???@gmx.co.uk");

I don't know what you wish to change. Grepping for the hostname and changing it in-situ is fairly easy; if you need to adjust other parameters, you'd also need to find all the relevant entries containing, in this example, "smtp21".

A few years ago I'd have done this in C; now I'd use Python. I suspect it could be done with grep, and most definitely with awk or sed, but I've never got to grips with them. ;-)

If you're changing authorization or security options, you'll need to do the homework to understand the relevance of the numerical arguments.

Please ensure Thunderbird is closed down whilst doing this, else it is likely to overwrite your changes.

문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (2)

more options

선택된 해결법

I suggest you write a script to search prefs.js in the users' profiles for the relevant smtp server setting. You can then extract the internal numerical identifier and use that to locate the relevant settings.

e.g.

these are all the entries referring to the smtp server for my gmx account.

user_pref("mail.smtpserver.smtp21.authMethod", 3);
user_pref("mail.smtpserver.smtp21.description", "GMX SMTP");
user_pref("mail.smtpserver.smtp21.hostname", "mail.gmx.com");
user_pref("mail.smtpserver.smtp21.port", 465);
user_pref("mail.smtpserver.smtp21.try_ssl", 3);
user_pref("mail.smtpserver.smtp21.username", "???@gmx.co.uk");

I don't know what you wish to change. Grepping for the hostname and changing it in-situ is fairly easy; if you need to adjust other parameters, you'd also need to find all the relevant entries containing, in this example, "smtp21".

A few years ago I'd have done this in C; now I'd use Python. I suspect it could be done with grep, and most definitely with awk or sed, but I've never got to grips with them. ;-)

If you're changing authorization or security options, you'll need to do the homework to understand the relevance of the numerical arguments.

Please ensure Thunderbird is closed down whilst doing this, else it is likely to overwrite your changes.

글쓴이 Zenos 수정일시

more options

Many thanks Zenos. I overlooked this file. :-) I'll do a login script that will be executed before TB starts.