[CalendarServer-changes] [7871] CalendarServer/branches/users/glyph/imip-and-admin-html/ twistedcaldav/mail.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 11 21:34:45 PDT 2011
Revision: 7871
http://trac.macosforge.org/projects/calendarserver/changeset/7871
Author: glyph at apple.com
Date: 2011-08-11 21:34:45 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
allow directory to be specified directly rather than via config.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py 2011-08-12 04:34:34 UTC (rev 7870)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py 2011-08-12 04:34:45 UTC (rev 7871)
@@ -685,13 +685,16 @@
class MailHandler(LoggingMixIn):
- def __init__(self, dataRoot=None):
+ def __init__(self, dataRoot=None, directory=None):
if dataRoot is None:
dataRoot = config.DataRoot
+ if directory is None:
+ directory = directoryFromConfig(config)
self.db = MailGatewayTokensDatabase(dataRoot)
self.days = config.Scheduling['iMIP']['InvitationDaysToLive']
- self.directory = directoryFromConfig(config)
+ self.directory = directory
+
def purge(self):
"""
Purge old database tokens
@@ -699,6 +702,7 @@
self.db.purgeOldTokens(datetime.date.today() -
datetime.timedelta(days=self.days))
+
def checkDSN(self, message):
# returns (isDSN, Action, icalendar attachment)
@@ -747,6 +751,7 @@
except ValueError:
return None
+
def processDSN(self, calBody, msgId, fn):
calendar = ical.Component.fromString(calBody)
# Extract the token (from organizer property)
@@ -859,7 +864,6 @@
_reactor.connectTCP(settings["Server"], settings["Port"], factory)
return deferred
-
# Process the imip attachment; inject to calendar server
self.log_debug(calBody)
@@ -918,8 +922,6 @@
self.log_error("Failed to process message: %s" % (e,))
-
-
def outbound(self, originator, recipient, calendar, language='en', send=True):
# create token, send email
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/267d7416/attachment-0001.html>
More information about the calendarserver-changes
mailing list