📜 ⬆️ ⬇️

Ideal corporate email client

When it becomes necessary to set up a mail system for a company, first of all it comes to mind to use solutions from Microsoft - Exchange and Outlook. Unfortunately, these solutions do not provide sufficient flexibility and many do not fit in different parameters.

Well, but what to use instead of them, because you want the same beautiful and transparent for the user to work with mail, which provides the MAPI protocol? A small shuffle and the light gives rise to a completely obvious and in fact no alternative solution - IMAP . IMAP, thank God, in the modern world almost all email clients support one or another degree, so our choice is huge. But if you take a closer look, it narrows to a very modest set of one or two titles.

So, we would like to:
A brief search on the Internet can tell that the only option that could be considered closer is Mozilla Thunderbird . But the question is: can Thunderbird provide all the necessary functionality so that you can easily replace Exchange and Outlook with it? It turns out not only can, but also allows you to achieve much more than just a banal imitation of Microsoft products.

To begin with, of course, you need to decide on the server, but something I was too smartly going to replace the entire infrastructure with the mail client. I use Dovecot because it is one of the most reliable and flexible products in its field, but most importantly, Dovecot is the only widely used server that fully implements IMAP support . You can use any other server, but for maximum efficiency, your server should at least support IMAP ACL.
')

In the wilds of configs


Now let's go directly to Thunderbird. All settings Thunderbird stores in the form of many favorite text-based configuration files, but in a somewhat unusual manner. Thunderbird configs are JavaScript scripts. And Thunderbird does not just read them, but executes them. A very funny conclusion follows from this: one can use many possibilities of JS to dynamically generate the necessary parameters. Of course, JS support in Thunderbird is far from complete, but we will have enough of it with interest.

The main Thunderbird configuration file is stored in the user profile and is called prefs.js . Just in case: the Thunderbird profile is located either in the home folder (for Linux), or in AppData (for Windows), or in the program folder (for Thunderbird Portable).

The format of the specified file is quite simple, it consists entirely of lines of the form

user_pref("app.update.auto", false);

, .

prefs.js , Thunderbird. , prefs.js. ->..., , ...

, . - , .

Mozilla AutoConfig (aka Mission Control)


. , prefs.js , , Thunderbird , prefs.js.

JavaScript , , JavaScript .

Thunderbird. greprefs/all.js, /usr/lib/thunderbird-xxx/ Ubuntu Linux Thunderbird.exe Windows. :

pref("general.config.obscure_value", 0);
pref("general.config.filename", "thunderbird.cfg");

, Thunderbird, . , 0.

thunderbird.cfg. , Thunderbird. , Thunderbird Linux

which thunderbird

Windows , , .

thunderbird.cfg? JavaScript , Thunderbird. - , :

function pref(prefName, value) 
function defaultPref(prefName, value)
function lockPref(prefName, value) 
function unlockPref(prefName) 
function getPref(prefName)
function clearPref(prefName)
function getenv(envName)

, . , , .

, ?
  1. pref — . Thunderbird, thunderbird.cfg, .
  2. defaultPref — . .
  3. lockPref — , , . , .
  4. unlockPref — , .
  5. getPref — .
  6. clearPref — .
  7. getenv — .
LDAP, , . , .

thunderbird.cfg, «» Thunderbird:

//   Thunderbird   Mozilla AutoConfig
try {
        //   , Thunderbird  (  ,      )
        if(getenv("USER") != "") {
                // *NIX 
                var env_user    = getenv("USER");
                var env_home    = getenv("HOME");
        } else {
                // Windows 
                var env_user    = getenv("USERNAME");
                var env_home    = getenv("HOMEPATH");
        }
        
        //     account1
        defaultPref("mail.accountmanager.defaultaccount", "account1");
        //        account1
        defaultPref("mail.accountmanager.accounts", "account1");
        //    account1  server1 (IMAP)
        lockPref("mail.account.account1.server", "server1");
        //        IMAP  ,
        //        
        lockPref("mail.accountmanager.localfoldersserver", "server1");
        
        //   "   "   
        lockPref("mail.rights.version", 1);
        //   .   ,      
        // all.js     Mozilla AutoConfig .
        lockPref("app.update.enabled", false);
        lockPref("extensions.update.enabled", false);

        //  IMAP 
        lockPref("mail.server.server1.type", "imap");
        lockPref("mail.server.server1.hostname", "mail.domain.com");      // ,   ,   ,
        lockPref("mail.server.server1.realhostname", "mail.domain.com");  //       
        lockPref("mail.server.server1.port", 143);                        //  
        lockPref("mail.server.server1.socketType", 2);                    //  STARTLS
        lockPref("mail.server.server1.name", env_user);
        lockPref("mail.server.server1.userName", env_user);               //  ,
        lockPref("mail.server.server1.realuserName", env_user);           //     hostname
        lockPref("mail.server.server1.login_at_startup", true);           //   !      ;)
        lockPref("mail.server.server1.isSecure", true);                   //  

        //  SMTP 
        lockPref("mail.smtpserver.smtp1.hostname", "mail.domain.com");
        lockPref("mail.smtpserver.smtp1.port", 25);
        lockPref("mail.smtpserver.smtp1.description", "SMTP   «  »");
        lockPref("mail.smtpserver.smtp1.try_ssl", 2);
        lockPref("mail.smtpserver.smtp1.auth_method", 1);
        lockPref("mail.smtpserver.smtp1.username", env_user);

        //   -    ..
        defaultPref("mail.identity.id1.fullName", env_user);            //     ,       
        lockPref("mail.identity.id1.useremail", env_user + "@domain.com");
        lockPref("mail.identity.id1.reply_to", env_user + "@domain.com");
        lockPref("mail.identity.id1.valid", true);
        lockPref("mail.identity.id1.smtpServer", "smtp1");
        lockPref("mail.identity.id1.organization", " «  »");
        
        //  ID  
        lockPref("mail.account.account1.identities", "id1");

        //   LDAP
        lockPref("ldap_2.servers.domain.uri", "ldap://dc.domain.com/OU=,OU=domain,DC=DOMAIN,DC=COM??sub?(mail=*)");
        lockPref("ldap_2.servers.domain.auth.dn", "DOMAIN\\" + env_user);
        lockPref("ldap_2.servers.domain.auth.saslmech", "");
        lockPref("ldap_2.servers.domain.description", " '  '");
        lockPref("ldap_2.servers.domain.filename", "empl.mab");
        lockPref("ldap_2.servers.domain.maxHits", 300);
        
        //     
        lockPref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.domain");
        lockPref("ldap_2.autoComplete.useDirectory", true);
        
} catch(e) {
    displayError("lockedPref", e);
}

, , . try , ( Thunderbird ). , , . , , , mail.server.server.socketType .

: - Thunderbird , Thunderbird .

Thunderbird ( all.js!), , Thunderbird , , LDAP .

Thunderbird. , lockPref(), «». — - .

, , localfoldersserver IMAP . IMAP , , , , .

, JavaScript , . , thunderbird.cfg . , .


Thunderbird URL. — , general.config.filename all.js ( thunderbird.cfg) :

lockPref("autoadmin.global_config_url", "http://mail.domain.com/thunderbird.cfg");
lockPref("autoadmin.append_emailaddr", false);

, . — , .

: Thunderbird. , JavaScript, , . — , SQL LDAP . .

, . HTTP , PHP Perl , , .

— , Thunderbird, , - . Thunderbird getent, URL GET-. : Thunderbird - URL GET- autoadmin.global_config_url. , mod_rewrite URL URL c GET- URL .

, . thunderbird.cfg, Thunderbird, :

//    Thunderbird   
if(getenv("USER") != "") {
// *NIX settings
        var env_user = getenv("USER");
        var env_home = getenv("HOME");
} else {
// Windows settings
        var env_user = getenv("USERNAME");
        var env_home = getenv("HOMEPATH");
}

lockPref("autoadmin.global_config_url", "http://mail.domain.com/tb/user/"+env_user);
lockPref("autoadmin.append_emailaddr", false);

malamut Thunderbird

http://mail.domain.com/tb/user/malamut

mail.domain.com Apache mod_rewrite mod_perl, . tb/ mail.domain.com Perl- conf.pl, Thunderbird, .htaccess :

Options -Indexes +ExecCGI
AddHandler cgi-script .pl

RewriteEngine on
RewriteBase /tb
RewriteRule ^user/(.*)                conf.pl?user=$1   [L]

URL

http://mail.domain.com/tb/user/malamut

URL

http://mail.domain.com/tb/conf.pl?user=malamut

Perl , GET- Thunderbird.

:

#!/usr/bin/perl

use 5.010;
use CGI qw/:standard/;

# 
$smtp_server = "mail.domain.com";
$imap_server = "mail.domain.com";
$organization = " «  »";

#  
print header(
	-type=>'application/javascript'
);

# Username -  GET 
$user = param('user');
unless ($user) { die "We need a user, please!\n" }

#   user  lovercase,       IMAP .  username 
#    ,          .
$user = lc $user;

#########################################################################
#      

#     .   
# FIXME:       
@mails = getEmails($user);

#    
# FIXME:       
$name = getName($user);

#########################################################################
#    

print <<HEAD;
//  Thunderbird   $user ($name)
try {
HEAD

#  
#   SMTP         SMTP  
#       JavaScript.
#    ,          . 
#  mail.accountmanager.accounts  mail.smtpservers,     .
print <<SERVERS;
	//    
	
	//       ,     
	var accounts = getPref("mail.accountmanager.accounts");
	var accounts_s = accounts + ",";
	if (! (accounts_s.indexOf("account1,")+1) ) {
		accounts = accounts + ",account1";
	}
	pref("mail.accountmanager.accounts",accounts);

	//  IMAP 
	lockPref("mail.server.server1.type", "imap");
        lockPref("mail.server.server1.hostname", "$imap_server");     // ,   ,   ,
        lockPref("mail.server.server1.realhostname", "$imap_server"); //       
        lockPref("mail.server.server1.port", 143);                    //  
        lockPref("mail.server.server1.socketType", 2);                //  STARTLS
        lockPref("mail.server.server1.name", "$name");
        lockPref("mail.server.server1.userName", "$user");            //  ,
        lockPref("mail.server.server1.realuserName", "$user");        //     hostname
        lockPref("mail.server.server1.login_at_startup", true);       //   !      ;)
        lockPref("mail.server.server1.isSecure", true);               //  

        //   IMAP   
        lockPref("mail.account.account1.server", "server1");

        //  SMTP 
        lockPref("mail.smtpserver.smtp1.hostname", "$smtp_server");
        lockPref("mail.smtpserver.smtp1.port", 25);
        lockPref("mail.smtpserver.smtp1.description", "SMTP  $organization");
        lockPref("mail.smtpserver.smtp1.try_ssl", 2);
        lockPref("mail.smtpserver.smtp1.auth_method", 1);
        lockPref("mail.smtpserver.smtp1.username", "$user");

        //  SMTP  
	var smtp = getPref("mail.smtpservers");
	var smtp_s = smtp + ",";
	if (! (smtp_s.indexOf("smtp1,")+1) ) {
		smtp = smtp + ",smtp1";
	}
	pref("mail.smtpservers", smtp);	

SERVERS

#   
print <<MISC;
        //   "   "   
	lockPref("mail.rights.version", 1);
	//  
	lockPref("app.update.enabled", false);
	lockPref("extensions.update.enabled", false);
        //        IMAP  ,
        //        
        lockPref("mail.accountmanager.localfoldersserver", "server1");
	//         TB
	lockPref("mail.accountmanager.defaultaccount", "account1");
        //        IMAP  ,
        //        
        lockPref("mail.accountmanager.localfoldersserver", "server1");

MISC

#     
#    ,     .
$i=0;
@ids = ();
foreach $mail (@mails) {	
	$i++;
	$id = <<ID;
	//  $mail   $user ($name)
	defaultPref("mail.identity.id$i.fullName", "$name");
	lockPref("mail.identity.id$i.useremail", "$mail");
	lockPref("mail.identity.id$i.reply_to", "$mail");
	lockPref("mail.identity.id$i.valid", true);
	lockPref("mail.identity.id$i.smtpServer", "smtp1");
	lockPref("mail.identity.id$i.organization", "$organization");
	lockPref("mail.identity.id$i.archive_folder", "imap://$user\@$imap_server/Archives");
	lockPref("mail.identity.id$i.draft_folder", "imap://$user\@$imap_server/Drafts");
	lockPref("mail.identity.id$i.drafts_folder_picker_mode", 0);
	lockPref("mail.identity.id$i.fcc_folder", "imap://$user\@$imap_server/Sent");
	lockPref("mail.identity.id$i.fcc_folder_picker_mode", 0);
	lockPref("mail.identity.id$i.stationery_folder", "imap://$user\@$imap_server/Templates");

ID
	print $id;
	push @ids, "id$i";		
}
#    TB,       
$ids = join ',', @ids;
print <<IDS;
	//      
	lockPref("mail.account.account1.identities", "$ids");

IDS

#   LDAP
print <<BOOKS;
        //   
	lockPref("ldap_2.servers.domain.uri", "ldap://dc.domain.com/OU=,OU=domain,DC=DOMAIN,DC=COM??sub?(mail=*)");
        lockPref("ldap_2.servers.domain.auth.dn", "DOMAIN\\\\$user");
        lockPref("ldap_2.servers.domain.auth.saslmech", "");
        lockPref("ldap_2.servers.domain.description", " '  '");
        lockPref("ldap_2.servers.domain.filename", "empl.mab");
        lockPref("ldap_2.servers.domain.maxHits", 300);
	
	//     
	lockPref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.domain");
	lockPref("ldap_2.autoComplete.useDirectory", true);

BOOKS

#################################################
#      #

if ($user eq 'malamut') {
	yandex('yandex',50);
}

#################################################

print <<TAIL;
} catch(e) {
    displayError("lockedPref", e);
}
TAIL

#     . id     , ya_name   -   
sub yandex {
	my ($ya_name, $id) = @_;
	
	print <<YANDEX;
	// SMTP   $ya_name\@yandex.ru
	lockPref("mail.smtpserver.smtp$id.hostname", "smtp.yandex.ru");
	lockPref("mail.smtpserver.smtp$id.port", 465);
	lockPref("mail.smtpserver.smtp$id.description", "SMTP  $ya_name\@yandex.ru");
	lockPref("mail.smtpserver.smtp$id.try_ssl", 3);
	lockPref("mail.smtpserver.smtp$id.auth_method", 1);
	lockPref("mail.smtpserver.smtp$id.username", "$ya_name\@yandex.ru");
	
	//  SMTP   
	var smtp = getPref("mail.smtpservers");
	var smtp_s = smtp + ",";
	if (! (smtp_s.indexOf("smtp$id,")+1) ) {
		smtp = smtp + ",smtp$id";
	}
	pref("mail.smtpservers", smtp);
	
	// IMAP   $ya_name\@yandex.ru
	lockPref("mail.server.server$id.type", "imap");
	lockPref("mail.server.server$id.hostname", "imap.yandex.ru");
	lockPref("mail.server.server$id.realhostname", "imap.yandex.ru");
	lockPref("mail.server.server$id.port", 993);
	lockPref("mail.server.server$id.socketType", 3);
	lockPref("mail.server.server$id.name", "$ya_name\@yandex.ru");
	lockPref("mail.server.server$id.userName", "$ya_name\@yandex.ru");
	lockPref("mail.server.server$id.realuserName", "$ya_name\@yandex.ru");
	lockPref("mail.server.server$id.check_new_mail", true);
	lockPref("mail.server.server$id.login_at_startup", true);
	lockPref("mail.server.server$id.isSecure", true);
	lockPref("mail.server.server$id.max_cached_connections", 5);
	
	//   $ya_name\@yandex.ru
	defaultPref("mail.identity.id$id.fullName", "$ya_name");
	lockPref("mail.identity.id$id.useremail", "$ya_name\@yandex.ru");
	lockPref("mail.identity.id$id.reply_to", "$ya_name\@yandex.ru");
	lockPref("mail.identity.id$id.valid", true);
	lockPref("mail.identity.id$id.smtpServer", "smtp$id");
	defaultPref("mail.identity.id$id.organization", "");
	
	lockPref("mail.account.account$id.identities", "id$id");
	lockPref("mail.account.account$id.server", "server$id");
	
	//   $ya_name\@yandex.ru  
	accounts = getPref("mail.accountmanager.accounts");
	accounts_s = accounts + ",";
	if (! (accounts_s.indexOf("account$id,")+1) ) {
		accounts = accounts + ",account$id";
	}
	pref("mail.accountmanager.accounts",accounts);
	
YANDEX
}

.

http://mail.domain.com/tb/user/malamut

, :

//  Thunderbird   malamut (Malamut)
try {
	//    
	
	//       ,     
	var accounts = getPref("mail.accountmanager.accounts");
	var accounts_s = accounts + ",";
	if (! (accounts_s.indexOf("account1,")+1) ) {
		accounts = accounts + ",account1";
	}
	pref("mail.accountmanager.accounts",accounts);

	//  IMAP 
	lockPref("mail.server.server1.type", "imap");
        lockPref("mail.server.server1.hostname", "mail.domain.com");     // ,   ,   ,
        lockPref("mail.server.server1.realhostname", "mail.domain.com"); //       
        lockPref("mail.server.server1.port", 143);                    //  
        lockPref("mail.server.server1.socketType", 2);                //  STARTLS
        lockPref("mail.server.server1.name", "Malamut");
        lockPref("mail.server.server1.userName", "malamut");            //  ,
        lockPref("mail.server.server1.realuserName", "malamut");        //     hostname
        lockPref("mail.server.server1.login_at_startup", true);       //   !      ;)
        lockPref("mail.server.server1.isSecure", true);               //  

        //   IMAP   
        lockPref("mail.account.account1.server", "server1");

        //  SMTP 
        lockPref("mail.smtpserver.smtp1.hostname", "mail.domain.com");
        lockPref("mail.smtpserver.smtp1.port", 25);
        lockPref("mail.smtpserver.smtp1.description", "SMTP   «  »");
        lockPref("mail.smtpserver.smtp1.try_ssl", 2);
        lockPref("mail.smtpserver.smtp1.auth_method", 1);
        lockPref("mail.smtpserver.smtp1.username", "malamut");

        //  SMTP  
	var smtp = getPref("mail.smtpservers");
	var smtp_s = smtp + ",";
	if (! (smtp_s.indexOf("smtp1,")+1) ) {
		smtp = smtp + ",smtp1";
	}
	pref("mail.smtpservers", smtp);	

        //   "   "   
	lockPref("mail.rights.version", 1);
	//  
	lockPref("app.update.enabled", false);
	lockPref("extensions.update.enabled", false);
        //        IMAP  ,
        //        
        lockPref("mail.accountmanager.localfoldersserver", "server1");
	//         TB
	lockPref("mail.accountmanager.defaultaccount", "account1");
        //        IMAP  ,
        //        
        lockPref("mail.accountmanager.localfoldersserver", "server1");

	//  malamut@domain.com   malamut (Malamut)
	defaultPref("mail.identity.id1.fullName", "Malamut");
	lockPref("mail.identity.id1.useremail", "malamut@domain.com");
	lockPref("mail.identity.id1.reply_to", "malamut@domain.com");
	lockPref("mail.identity.id1.valid", true);
	lockPref("mail.identity.id1.smtpServer", "smtp1");
	lockPref("mail.identity.id1.organization", " «  »");
	lockPref("mail.identity.id1.archive_folder", "imap://malamut@mail.domain.com/Archives");
	lockPref("mail.identity.id1.draft_folder", "imap://malamut@mail.domain.com/Drafts");
	lockPref("mail.identity.id1.drafts_folder_picker_mode", 0);
	lockPref("mail.identity.id1.fcc_folder", "imap://malamut@mail.domain.com/Sent");
	lockPref("mail.identity.id1.fcc_folder_picker_mode", 0);
	lockPref("mail.identity.id1.stationery_folder", "imap://malamut@mail.domain.com/Templates");

	//  admin@domain.com   malamut (Malamut)
	defaultPref("mail.identity.id2.fullName", "Malamut");
	lockPref("mail.identity.id2.useremail", "admin@domain.com");
	lockPref("mail.identity.id2.reply_to", "admin@domain.com");
	lockPref("mail.identity.id2.valid", true);
	lockPref("mail.identity.id2.smtpServer", "smtp1");
	lockPref("mail.identity.id2.organization", " «  »");
	lockPref("mail.identity.id2.archive_folder", "imap://malamut@mail.domain.com/Archives");
	lockPref("mail.identity.id2.draft_folder", "imap://malamut@mail.domain.com/Drafts");
	lockPref("mail.identity.id2.drafts_folder_picker_mode", 0);
	lockPref("mail.identity.id2.fcc_folder", "imap://malamut@mail.domain.com/Sent");
	lockPref("mail.identity.id2.fcc_folder_picker_mode", 0);
	lockPref("mail.identity.id2.stationery_folder", "imap://malamut@mail.domain.com/Templates");

	//      
	lockPref("mail.account.account1.identities", "id1,id2");

        //   
	lockPref("ldap_2.servers.domain.uri", "ldap://dc.domain.com/OU=,OU=domain,DC=DOMAIN,DC=COM??sub?(mail=*)");
        lockPref("ldap_2.servers.domain.auth.dn", "DOMAIN\\malamut");
        lockPref("ldap_2.servers.domain.auth.saslmech", "");
        lockPref("ldap_2.servers.domain.description", " '  '");
        lockPref("ldap_2.servers.domain.filename", "empl.mab");
        lockPref("ldap_2.servers.domain.maxHits", 300);
	
	//     
	lockPref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.domain");
	lockPref("ldap_2.autoComplete.useDirectory", true);

	// SMTP   yandex@yandex.ru
	lockPref("mail.smtpserver.smtp50.hostname", "smtp.yandex.ru");
	lockPref("mail.smtpserver.smtp50.port", 465);
	lockPref("mail.smtpserver.smtp50.description", "SMTP  yandex@yandex.ru");
	lockPref("mail.smtpserver.smtp50.try_ssl", 3);
	lockPref("mail.smtpserver.smtp50.auth_method", 1);
	lockPref("mail.smtpserver.smtp50.username", "yandex@yandex.ru");
	
	//  SMTP   
	var smtp = getPref("mail.smtpservers");
	var smtp_s = smtp + ",";
	if (! (smtp_s.indexOf("smtp50,")+1) ) {
		smtp = smtp + ",smtp50";
	}
	pref("mail.smtpservers", smtp);
	
	// IMAP   yandex@yandex.ru
	lockPref("mail.server.server50.type", "imap");
	lockPref("mail.server.server50.hostname", "imap.yandex.ru");
	lockPref("mail.server.server50.realhostname", "imap.yandex.ru");
	lockPref("mail.server.server50.port", 993);
	lockPref("mail.server.server50.socketType", 3);
	lockPref("mail.server.server50.name", "yandex@yandex.ru");
	lockPref("mail.server.server50.userName", "yandex@yandex.ru");
	lockPref("mail.server.server50.realuserName", "yandex@yandex.ru");
	lockPref("mail.server.server50.check_new_mail", true);
	lockPref("mail.server.server50.login_at_startup", true);
	lockPref("mail.server.server50.isSecure", true);
	lockPref("mail.server.server50.max_cached_connections", 5);
	
	//   yandex@yandex.ru
	defaultPref("mail.identity.id50.fullName", "yandex");
	lockPref("mail.identity.id50.useremail", "yandex@yandex.ru");
	lockPref("mail.identity.id50.reply_to", "yandex@yandex.ru");
	lockPref("mail.identity.id50.valid", true);
	lockPref("mail.identity.id50.smtpServer", "smtp50");
	defaultPref("mail.identity.id50.organization", "");
	
	lockPref("mail.account.account50.identities", "id50");
	lockPref("mail.account.account50.server", "server50");
	
	//   yandex@yandex.ru  
	accounts = getPref("mail.accountmanager.accounts");
	accounts_s = accounts + ",";
	if (! (accounts_s.indexOf("account50,")+1) ) {
		accounts = accounts + ",account50";
	}
	pref("mail.accountmanager.accounts",accounts);
	
} catch(e) {
    displayError("lockedPref", e);
}

, Thunderbird, Perl .

, Thunderbird, , . , — , .


, , Thunderbird, .

Thunderbird . , , SMTP , Thunderbird . - , , , . - , . — , 1.

, - , , , Thunderbird , . :

lockPref("mail.account.account1.identities", "id1,id2");

Thunderbird (account), , (identity). , , mail.account.accountN, N — . , , mail.identity.idN, N — .

Thunderbird mail.accountmanager.accounts. , Thunderbird. , Thunderbird, , .

N mail.account.accountN.identities. IMAP mail.account.accountN.server, SMTP mail.identity.idN.smtpServer.

, , - , , .


-, JavaScript , . , :

//       ,     
	var accounts = getPref("mail.accountmanager.accounts");
	var accounts_s = accounts + ",";
	if (! (accounts_s.indexOf("account1,")+1) ) {
		accounts = accounts + ",account1";
	}
	pref("mail.accountmanager.accounts",accounts);

, , . , .

, Perl . , Yandex , . Thunderbird , , Yandex ! .

, - yandex . , , , , , , . , , .

, . Thunderbird , , - , . , , .

Thunderbird


Thunderbird . , Thunderbird , . .

, IMAP ACL . Thunderbird Lightning, , , .

, , , extensions/, Thunderbird.

, . default/profile. , , .

!

Source: https://habr.com/ru/post/101905/


All Articles