[CalendarServer-changes] [2923] CalendarServer/trunk/twistedcaldav/mail.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 2 10:49:59 PDT 2008


Revision: 2923
          http://trac.macosforge.org/projects/calendarserver/changeset/2923
Author:   sagen at apple.com
Date:     2008-09-02 10:49:58 -0700 (Tue, 02 Sep 2008)
Log Message:
-----------
If mail gateway is on the same host as calendar server, use 'localhost' to inject messages

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/mail.py

Modified: CalendarServer/trunk/twistedcaldav/mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/mail.py	2008-09-01 02:17:00 UTC (rev 2922)
+++ CalendarServer/trunk/twistedcaldav/mail.py	2008-09-02 17:49:58 UTC (rev 2923)
@@ -245,7 +245,11 @@
         useSSL = False
         port = config.HTTPPort
 
-    host = config.ServerHostName
+    # If we're running on same host as calendar server, inject via localhost
+    if config.Scheduling['iMIP']['MailGatewayServer'] == 'localhost':
+        host = 'localhost'
+    else:
+        host = config.ServerHostName
     path = "inbox"
     scheme = "https:" if useSSL else "http:"
     url = "%s//%s:%d/%s/" % (scheme, host, port, path)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080902/b1debe4b/attachment.html 


More information about the calendarserver-changes mailing list