Dne po 13. února 2012 Louis-Philippe Gauthier napsal(a):
> Hi,
>
> I want to use secure IMAP (Imaps) with SOGo. The Imap servers are not
> on the same server and we use mail routing in ldap. In the
> .GNUstepDefaults, I have
> SOGoIMAPServer = imaps://localhost:993;
> and in the SOGoUserSources section,  we have
> IMAPHostFieldName = mailHost;
>
> With this config, a netstat -pantu on the imap server, I still see imap
> port 143...
>
> Any hint ?
>
> Thanks !

Hi.

I had the same problem. Because mailHost in LDAP is just a name of server, 
so it is not conceivable to write imaps scheme or port to this.

When I thought about the way the solution, it occurred to me use value of 
SOGoIMAPServer as a template in which the host name will be replaced by 
the value of IMAPHostFieldName. Therefore, I prepared a patch that 
changes the handling with IMAPHostFieldName to this way.

Proposed patch attached.
Please try it - for me it works well.

Slavek
-- 
-- 
users@sogo.nu
https://inverse.ca/sogo/lists
diff -ru sogo-1.3.16.orig/SoObjects/SOGo/SOGoUser.m sogo-1.3.16/SoObjects/SOGo/SOGoUser.m
--- sogo-1.3.16.orig/SoObjects/SOGo/SOGoUser.m	2012-06-07 19:05:31.000000000 +0200
+++ sogo-1.3.16/SoObjects/SOGo/SOGoUser.m	2012-06-27 16:14:42.000000000 +0200
@@ -576,7 +576,7 @@
 
 - (void) _appendSystemMailAccount
 {
-  NSString *fullName, *replyTo, *imapLogin, *imapServer, *signature,
+  NSString *fullName, *replyTo, *imapLogin, *imapServer, *ldapImapServer, *signature,
     *encryption, *scheme, *action, *query, *customEmail;
   NSMutableDictionary *mailAccount, *identity, *mailboxes, *receipts;
   NSNumber *port;
@@ -606,12 +606,13 @@
   // imaps://localhost:143/?tls=YES
   // imaps://localhost/?tls=YES
 
-  imapServer = [self _fetchFieldForUser: @"c_imaphostname"];
-  if (!imapServer)
-    imapServer = [[self domainDefaults] imapServer];
+  imapServer = [[self domainDefaults] imapServer];
   url = [NSURL URLWithString: imapServer];
   if ([url host])
     imapServer = [url host];
+  ldapImapServer = [self _fetchFieldForUser: @"c_imaphostname"];
+  if (ldapImapServer)
+    imapServer = ldapImapServer;
   [mailAccount setObject: imapServer forKey: @"serverName"];
 
   // 3. port & encryption

Reply via email to