imported patch login-info
authorAndrew Sutherland <asutherland@asutherland.org>
Tue, 13 Jan 2009 23:50:05 -0800
changeset 21 0ee5c0e954f888faf5e59b6a35af45fc8525e388
parent 20 fe9242d6394863645da8066cb9ce7b69b9bad36c
child 22 e54f35620881eedccdae43b4d96e807a9a3dd3ca
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
imported patch login-info
server/python/junius/bootstrap.py
server/python/junius/getmail.py
--- a/server/python/junius/bootstrap.py
+++ b/server/python/junius/bootstrap.py
@@ -10,18 +10,18 @@ import os, os.path, mimetypes, base64, p
 import junius.model as model
 
 def setup_account(dbs):
     if len(model.Account.all(dbs.accounts)):
         print 'Account presumably already exists, not adding it!'
         return
     
     account = model.Account(
-        kind='imap', host='localhost', port=10143, ssl=False,
-        username='test', password='bsdf',
+        kind='imap', host='mail.visophyte.org', port=993, ssl=True,
+        username='junius@visophyte.org', password='keepFallin',
     )
     account.store(dbs.accounts)
 
 def path_part_nuke(path, count):
     for i in range(count):
         path = os.path.dirname(path)
     return path
     
@@ -67,9 +67,9 @@ def main():
 
     dbs = model.fab_db(update_views='updateviews' in sys.argv)
 
     setup_account(dbs)
     install_client_files(dbs)
     
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()
--- a/server/python/junius/getmail.py
+++ b/server/python/junius/getmail.py
@@ -11,17 +11,18 @@ import junius.model as model
 Fetch new mail.
 '''
 
 class JuniusAccount(object):
     def __init__(self, dbs, account_def):
         self.dbs = dbs
         self.account_def = account_def
         self.imap_account = Account(account_def.host, account_def.port,
-                                    account_def.username, account_def.password)
+                                    account_def.username, account_def.password,
+                                    account_def.ssl)
     
     def sync(self):
         self.considerFolders(self.imap_account.folders)
     
     def considerFolders(self, folders):
         for folder in folders.values():
             self.syncFolder(folder)
             self.considerFolders(folder.folders)