source: trunk/debathena/config/thunderbird-config/debian/debathena.cfg @ 23727

Revision 23727, 4.9 KB checked in by broder, 16 years ago (diff)
In thunderbird-config, default to saving templates, drafts, and sent mail to the IMAP server.
Line 
1
2/*
3 * debathena.cfg
4 *
5 * Mozilla Thunderbird MIT/Athena Autoconfig Script
6 * Copyright © 2006 Charles Dominguez
7 * Copyright © 2009 Evan Broder
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 *
23 */
24
25
26try
27{
28        // Kerberos Authentication
29        // defaultPref("network.negotiate-auth.trusted-uris", "imap://po*.mit.edu,imaps://po*.mit.edu");
30        // defaultPref("network.negotiate-auth.using-native-gsslib", true);
31        // defaultPref("network.negotiate-auth.allow-proxies", true);
32        // defaultPref("network.auth.use-sspi", false);
33       
34        var username = getenv("ATHENA_USER");
35        if(username == "")
36        {
37                username = getenv("USER");
38        }
39        // Check that username is sane
40        if(username == null || username == '' || username == 'root')
41        {
42                throw "Failed to retrieve user name (environment corruption)";
43        }
44
45        var fullname = getenv("NAME");
46        if(fullname == null || fullname == "")
47        {
48                throw "Failed to retrieve full name";
49        }
50
51        var pobox = getenv("POBOX");
52        if(pobox == null || username == '')
53        {
54                throw "Failed to retrieve the PO box";
55        }
56       
57       
58        // Construct additional user settings
59        email = username+'@mit.edu';
60        imapURI='imap://'+username+'@mit.edu';
61        imapRoot='imap://'+username+'@'+pobox+'/INBOX';
62       
63        // Register accounts
64        defaultPref("mail.account.account1.identities", "id1");
65        defaultPref("mail.account.account1.server", "server1");
66        defaultPref("mail.account.account2.server", "server2");
67        defaultPref("mail.accountmanager.localfoldersserver", "server2");
68        defaultPref("mail.accountmanager.accounts", "account1,account2");
69        defaultPref("mail.accountmanager.defaultaccount", "account1");
70        defaultPref("mail.smtp.defaultserver", "smtp1");
71        defaultPref("mail.smtpservers", "smtp1");
72               
73        // Setup MIT Mail Server
74        defaultPref("mail.server.server1.hostname", pobox);
75        defaultPref("mail.server.server1.name", email);
76        defaultPref("mail.server.server1.port", 993);
77        defaultPref("mail.server.server1.serverFilterName", "SpamAssassin");
78        defaultPref("mail.server.server1.socketType", 3);
79        defaultPref("mail.server.server1.type", "imap");
80        defaultPref("mail.server.server1.userName", username);
81
82        defaultPref("mail.server.server1.manualMark", true);
83        defaultPref("mail.server.server1.moveTargetMode", 1);
84        defaultPref("mail.server.server1.spamActionTargetAccount", imapURI);
85        defaultPref("mail.server.server1.spamActionTargetFolder", imapRoot+'/Spamscreen');
86        defaultPref("mail.server.server1.useServerFilter", true);
87       
88        // Setup Local Folders Server
89        defaultPref("mail.server.server2.directory-rel", "[ProfD]Mail/Local Folders");
90        defaultPref("mail.server.server2.hostname", "Local Folders");
91        defaultPref("mail.server.server2.name", "Local Folders");
92        defaultPref("mail.server.server2.type", "none");
93        defaultPref("mail.server.server2.userName", "nobody");
94
95        // Setup Outgoing (SMTP) Server
96        defaultPref("mail.smtpserver.smtp1.auth_method", 1);
97        defaultPref("mail.smtpserver.smtp1.description", "MIT SMTP Server");
98        defaultPref("mail.smtpserver.smtp1.hostname", "outgoing.mit.edu");
99        defaultPref("mail.smtpserver.smtp1.port", 465);
100        defaultPref("mail.smtpserver.smtp1.try_ssl", 3);
101        defaultPref("mail.smtpserver.smtp1.username", username);
102       
103        // Setup MIT Email Identity
104        defaultPref("mail.identity.id1.fullName", fullname);
105        defaultPref("mail.identity.id1.useremail", email);
106        defaultPref("mail.identity.id1.valid", true);
107        defaultPref("mail.identity.id1.directoryServer", "ldap_2.servers.MITCampusDirectory");
108        defaultPref("mail.identity.id1.smtpServer", "smtp1");
109       
110        defaultPref("mail.identity.id1.fcc", true);
111        defaultPref("mail.identity.id1.fcc_folder_picker_mode", "0");
112        defaultPref("mail.identity.id1.fcc_folder", imapRoot+"/Sent");
113        defaultPref("mail.identity.id1.drafts_folder_picker_mode", "0");
114        defaultPref("mail.identity.id1.draft_folder", imapRoot+"/Drafts");
115        defaultPref("mail.identity.id1.tmpl_folder_picker_mode", "0");
116        defaultPref("mail.identity.id1.stationery_folder", imapRoot+"/Templates");
117       
118        // Setup LDAP Servers & Addressbooks
119        defaultPref("ldap_2.servers.MITCampusDirectory.auth.savePassword", false);
120        defaultPref("ldap_2.servers.MITCampusDirectory.description", "MIT LDAP");
121        defaultPref("ldap_2.servers.MITCampusDirectory.filename", "MIT_LDAP.mab");
122        defaultPref("ldap_2.servers.MITCampusDirectory.uri", "ldaps://ldap.mit.edu:636/dc=mit,dc=edu??sub?(objectclass=*)");
123}
124catch(e)
125{
126        displayError("Error in Autoconfig", e);
127}
Note: See TracBrowser for help on using the repository browser.