Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

How to setup Kontact clients

I connect to my GNU/Linux office server PC (a sort of "black box" without monitor and keyboard) from 2 Windows� 2000 PC with Cygwin/X, using them as a X-Window server (in the near future I hope to replace both with 2 mini-itx thin clients using the LTSP). With this setup every user runs Kontact on the same machine where Cyrus is installed and running (localhost).

To have Kontact work with IMAP, there are these steps to complete:

  1. Create an IMAP account on the Cyrus for fake groupware user (already previously done!)

  2. Create/configure an IMAP account in KMail for login as that user

  3. Use kresources to make Kontact components work with data taken from IMAP source

  4. Enable groupware functionality and make related subfolders of that IMAP INBOX (if not already)

  5. Enjoy Kontact and shared data through Cyrus IMAP

So login to KDE with the first “real user” account you want to provide groupware functionality to.

Let's create the IMAP account in KMail.

Run Kontact and select Mail (the KMail component). From the menu choose Settings -> Configure KMail + Accounts + Receiving tab, press the Add... button. You will then be prompted for the type of your email account, and select disconnected IMAP (not just IMAP ). Then in the General tab enter the following data:

Account Name: office_gwdata

A name that will be used for the “local” folder that points to this IMAP account.

Login: groupware

The Cyrus user we have chosen as “owner” of all of the office data

Password:

The password of the groupware user.

Host: localhost

Remember for our example, the Kontact client runs on the same computer as the IMAP server

Port: 143

The default

Check store IMAP password so you will not be asked for it next time you run Kontact. Check the Enable interval mail checking and set a value in minutes.

Note that we have checked the disconnected IMAP type account. This has the effect that a copy of the groupware data is stored “locally” to the client (under the home folder), and it is synchronized every time the client connects. This seems very inefficient, since your data is duplicated many times (i.e. if you have 10 users that use Kontact, you have 10+1 times the data), but it is the only way to make things run fast, because at every connection Kontact has to fetch all data and have KOrganizer and KAddressBook interpret it. If you use “disconnected IMAP” data is cached locally, and only the “delta” (i.e. the data that has changed) is sent.

On the other end, if your users run KOrganizer on the same PC that runs the IMAP server, it seems reasonable to use IMAP (that is called “online IMAP”) to save space, since transfer speed should not be an issue. But unfortunately this does not work because Kontact does not update automatically the Calendar folder in “online IMAP”, so you are not updated when someone adds events (you must manually switch to KMail application and click on the Calendar folder). In addition, at start up when it does read Calendar folders, you may see a tremendous flicker and slow data updates.

Now we have to tell Kontact to use IMAP as the data source for its various components. From the K menu, choose Run command , run kcmshell kresources . In the combo box select Contacts , then press the Add... button, and choose Addressbook on IMAP Server via KMail . Then select that new line and press Use as Standard button. Do the same for Calendar and Notes .

Now we have to enable the KMail (and as a consequence, the whole Kontact) groupware functionality:

  1. Choose from the menu Settings -> Configure KMail + Misc + Groupware

  2. Check Enable IMAP resource functionality

  3. Choose English as Language of the groupware folders (this is in case you already have the folders in the IMAP server created by a different program in a different language).

  4. Now move to Resource folder are in account and select the the Inbox subfolder of the office_gwdata folder.

    Leave Hide groupware folders unchecked for now, so we can see that happens. You can return here and check it once everything is clear.

  5. When you press OK you are prompted with: KMail will now create the required folders for the IMAP resource as subfolders of Inbox

    If you do not want this, press No , and the IMAP resource will be disabled. Press Yes (this happens only the first time with the first “real user”). You will immediately see that in the KMail folder tree, under office_gwdata + Inbox these subfolders are created:

    Calendar
    Contacts
    Notes
    Tasks
    Journal

    if you now do a:

    # 
    
    ls
    
     
    -l /var/spool/cyrus/mail/g/user/groupware/
    
    drwx------ 2 cyrus mail 144 Oct 31 16:36 Calendar
    drwx------ 2 cyrus mail 144 Oct 31 16:36 Contacts
    drwx------ 2 cyrus mail 144 Oct 31 16:36 Journal
    drwx------ 2 cyrus mail 144 Oct 31 16:36 Notes
    drwx------ 2 cyrus mail 144 Oct 31 16:36 Tasks
    -rw------- 1 cyrus mail      4 Oct 31 15:28 cyrus.cache
    -rw------- 1 cyrus mail 155 Oct 29 20:55 cyrus.header
    -rw------- 1 cyrus mail 76 Oct 31 15:28 cyrus.index
    

    As you see, the office_gwdata Inbox is stored not local to the Kontact current user home, but in the IMAP groupware user's folders.

Now Kontact is ready to work and store data there. In the calendar application, if KMail IMAP account was of type “disconnected”, the resource window should display the item Imap resource with 3 subitems, that are paths to local home files. Instead, the Contacts application does not show subitems below the Imap resource .

You can now login to KDE with a different username and set up his/her Kontact client in a very similar manner:

  1. Open Kontact and in the Mail component add an IMAP account specifying as host the computer where Cyrus server runs (in my case: 192.168.1.3).

    Remember to check the Enable interval mail checking and set a value in minutes. When you confirm, you are not prompted for the subfolder creation (since they are found in the IMAP server), and you see them in the folder tree.

  2. Activate the groupware functionality to be able to save data in the IMAP server.

Beware that in “disconnected IMAP ”, data are transmitted from a client to IMAP server only when the clients connects to check for new mail. So if you have your Kontact clients with an interval mail checking of, for instance, 5 minutes, in the worst case you have a 10 minutes delay between the event being written and its appearance to the other users.




 
 
  Published under the terms of the GNU General Public License Design by Interspire