[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kolab-users
Subject:    Fwd: Re: again freebusy
From:       Bo Thorsen <bo () sonofthor ! dk>
Date:       2004-09-28 9:46:39
Message-ID: 200409281146.40071.bo () sonofthor ! dk
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Hi all,

There have now been three cases of people with a problem on the kolab 
lists within the last week. All of them have a freebusy server that is 
called machine.domain.x, but the email address on the users is domain.x. 
The code in freebusymanager will not accept downloading these freebusy 
lists, since the email domain is not identical to the hostname.

We've been here before, and I'm not about to open that discussion right 
now. However, I have a workaround that solves the problem for every 
single person on the kolab lists: Add checks for one of the domains being 
a subdomain of the other. See the attached patch.

Since this solves one of the problems users have, I would like to check it 
into HEAD and 3.3 branch (attached patch is against HEAD). Is that a 
reasonable compromise for now?

Bo.

Here is the last of the problem mails:

----------  Forwarded Message  ----------

Subject: Re: again freebusy
Date: Monday 27 September 2004 16:12
From: Andreas Gungl <Andreas.Gungl@osp-dd.de>
To: kolab-users@kolab.org

Am Montag, 27. September 2004 16:01 schrieb Stefan:
> IMHO that isn't true......or didn't I understand this thing?
> I had this problem in my setup, too!
> My mail@addresses are: user@organet.com
> My machinename is: machinename.organet.com
> These are identical domains.
> Or do you mean the mailaddres has to be:
> user@machinename.organet.com??? In real life this would be seldom the
> case!

Here we are again. Bo, AFAICS you didn't get an answer to your question
on the kdepim list. But this option in KOrganizer is really useless
without your patch (at least for all installations I know). I think it's
time for another attempt to get this changed to a way most of the users
and admins do it expect to work like.

Andreas

-------------------------------------------------------

-- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark

["freebusymanager-domain-fix.patch" (text/x-diff)]

Index: freebusymanager.cpp
===================================================================
RCS file: /home/kde/kdepim/korganizer/freebusymanager.cpp,v
retrieving revision 1.27
diff -u -3 -p -w -r1.27 freebusymanager.cpp
--- freebusymanager.cpp	13 Sep 2004 16:01:39 -0000	1.27
+++ freebusymanager.cpp	28 Sep 2004 09:44:59 -0000
@@ -391,14 +391,20 @@ KURL FreeBusyManager::freeBusyUrl( const
     return KURL();
 
   // Cut off everything left of the @ sign to get the user name.
-  QString emailName = email.left( emailpos );
+  const QString emailName = email.left( emailpos );
+  const QString emailHost = email.mid( emailpos + 1 );
 
   // Build the URL
   KURL sourceURL;
   sourceURL = KOPrefs::instance()->mFreeBusyRetrieveUrl;
 
   // Don't try to fetch free/busy data for users not on the specified servers
-  if ( sourceURL.host() != email.mid( emailpos + 1 ) ) return KURL();
+  // This tests if the hostnames match, or one is a subset of the other
+  const QString hostDomain = sourceURL.host();
+  if ( hostDomain != emailHost && !hostDomain.endsWith( emailHost )
+       && !emailHost.endsWith( hostDomain ) )
+    // Host names do not match
+    return KURL();
 
   if ( KOPrefs::instance()->mFreeBusyFullDomainRetrieval )
     sourceURL.setFileName( email + ".ifb" );

[Attachment #6 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic