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
