Tag Archives: evolution

Fetchmail, Dovecot and OpenLDAP

The last few weeks I’ve been working on a server that I can access mail from regardless of which machine I’m on, what OS I load or where I’m at. Now yes the thoughts running through ones head is you can also do it with about any of the major email hosts google, yahoo, hotmail, not to mention a number of ISP’s. The difference is I wanted to have the data in a place that I could physically touch on my own equipment to modify as I see fit. Not to mention it sounded like a decent challenge too. Applications already exist to do this and since I’m not going with an all in one solution I’ll need a few separate programs to do the job. That’s where Fetchmail, Dovecot and LDAP will do all the work.

I’ve read about Fetchmail for years but never took the time to put it to work. The same would go for Dovecot (IMAP) and LDAP.

How they all work is Fetchmail will “fetch” mail from the various addresses I have and store all the messages in one place. To read the mail with a standard client I needed IMAP, this what Dovecot will do. Lastly, which is a bonus, is LDAP for contacts and for this we can use slapd to implement OpenLDAP.

Fetchmail

Their is plenty of resources on the net for this already one that helped me was this post, simple and straight forward. My setup barley scratches the surface of what this app can do, but for now simple does the trick.

Dovecot

Dovecot is an IMAP and POP3 package it will take care of the access, it can be configured for unsecure, secure or both. This setup was a little more tricky for me. After installing I was able to get access but no mail or folders would show up. It took me a little time, in the end it was this that solved the problem. I enabled the following line in dovecot.conf

default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u 

.. and I had access. What’s nice here is all I have to do is create a folder on the IMAP side and copy / paste the messages from the folder on my machine. Now they are all on the server and I can access them from any machine / device on my network or if I’m travelling.

OpenLDAP

The most challenging of these has been LDAP. This is another protocol I haven’t had an opportunity to do much with. For this I installed slapd and immediately began fighting with the setup. LDAP is one of those apps that is very robust and with so many options and ways to do things it’s difficult to weed your way through. This article was very helpful. When I got to the section that talks about ldapadd I could not execute it, that app was not part of the slapd package. It took me a little time to figure that out and once I added it, and loaded the ldif file things were better.

But then the problems started with Evolution and accessing the LDAP directory. Response was slow and would only work a few times until I restarted. I was hoping this was a configuration issue but then I found this bug and was immediately disappointed.

However I figured their had to be a resolution and since I was using version 2.22 I thought maybe 2.24 had a fix. Both Ubuntu Intrepid and Fedora 10 come with 2.24 and I have a drive that I just loaded F10 on. Before swapping I did some more googling I found reference to a patch that recently had been applied so I was hopeful 2.24 was ok. Unfortunately I can’t find the reference and didn’t make note of it at the time. But I believe it was a thread on the Gnome Evolution Hackers list and the fix is included in this release. So after putting in my drive with F10 and adding the LDAP address book response was much better and no time outs. So far it’s looking good.

That leaves me with a question, move to 2.24 or live with 2.22. I’d like to keep all contacts in a central location so I’ll have to look into upgrading Evolution to 2.24 on Lenny. Regardless I’m pleased and it was an excellent learning experience.

Evolution on Windows … interesting

I ran across Evolution on Windows this week, it’s interesting. Installed, imported contacts, and about 1.5 gig of email and so far so good. The email import was not easy as I had to take the mbox files, bring them into Evo on Linux then copy the files to the Windows box. Importing on Windows consistently crashed if more than 1500 emails were in the folder.

Nice thing is if it doesn’t work I can just take the mbox files back to Thunderbird.

Update: Sept. 7 It was a fun week with Evo on Windows. The UI and functionality is pretty much identical to Linux however it is slower which is to be expected. Only a couple crashes but it’s time to go back to Thunderbird.

Evolution contacts backup problem

I have used Novell Evolution for a few years now and it is an excellent PIM (Personal Information Manager). Other than a bone head move a few weeks ago, which killed all my email and contacts, I have not had any problems.

It had nothing to do with Evolution and I was able to restore from a backup. It was just frustrating more than anything. I guess that is a good argument for backing data up… ;)

Today however I loaded Ubuntu on a spare drive and when restoring .evolution one address book was gone. I thought that was very strange since /$HOME/.evolution/addressbook/local/ contained a folder other than system and it had addressbook.db and addressbook.db.summary. I tried creating the address book in Evolution and then manually copying the .db and .db.summary files into it, but no luck.

I did a little googling and came across a few posts that commented about shutting down the Evolution database server and restarting. This seemed like a logical thing to do, however I would have thought a reboot would have done the same but none the less I was game.
Find the PID of the server. Kill it and restart Evolution.

$ ps -ef | grep Evolution_DataServer
nobody     9657     1  0 20:02 ?        00:00:00 /usr/lib/evolution

/evolution-data-server-1.2
--oaf-activate-iid=OAFIID:GNOME_Evolution_DataServer_InterfaceCheck
 --oaf-ior-fd=50

$ kill -9 9657

Initially that did not do the trick so I decided to create the address book empty and then move addressbook.db and addressbook.db.summary into the new folder. After adding the address book I had to kill the DataServer again to get new folder to appear in .evolution/addressbook/local. Once I moved the new files to the new folder and restarted Evolution, both address books were there.