This site is now 100% read-only, and retired.

XML logo

Backporting Dovecot
Posted by redbeard on Mon 17 Apr 2006 at 21:08
Tags: none.

I'm working on setting up a new e-mail server. It will be handling two primary domains, as well as a few domains that will just forward to one or the other of the main domains. I want to use Dovecot to handle the IMAP services for the sites. So I found an interesting bit on the Dovecot wiki for setting up virtual users in multiple domains. I liked the Linuxconf configuration information so I plan to use it, sans Linuxconf. There is a corresponding article on the Exim wiki about setting Exim up for it.

So, why this post? Well, the Dovecot configuration claims to require version 1.0test79 or later. Sarge's version is in the 0.99 range. Version 1.0 Beta 2 is currently in testing. I'd try just installing it but it has dependencies that aren't in Sarge. The biggest one is libc6. I don't want to open that can of worms. So, I've decided to try backporting the Dovecot package. If all else fails, I can always back the package out.

Disclaimer. Before I go any further, please keep in mind that this might not be the "right" way of doing things. It might also melt your computer's processor, or do something else dastardly. I don't really know. But, so far, it works for me.


First thing I did was search Debain Administration for an article that might help. I found Rebuilding Debian packages by Steve. It's old, but has what I need to get started. The only issue is that I am pulling from a different repository. So rather than using the nice apt-get source and apt-get build-dep commands, I manually installed build dependencies (all but one were available in Sarge, thankfully) and downloaded the source package directly.

I had forgotten, though, that libpq-dev wasn't available. So when I ran debuild -us -uc I got an error saying I was missing a dependency. Since I won't be using PostgreSQL, I modified debian/control to remove that dependency (and the libldap2-dev dependency, since I won't be using LDAP, either). Then I edited debian/rules and changed the config.status rule so it runs configure without the --with-pgsql and --with-ldap options. After these two minor tweaks, running debuild was successful.


Since I don't have a custom repository set up yet (it's on the list :), I installed it using dpkg --install. The precise command was:

dpkg --install dovecot-common_1.0.beta2-1.1etch1_i386.deb dovecot-imapd_1.0.beta2-1.1etch1_i386.deb

In the process of running that, I discovered there is a new configuration file format. Ick. Of course, all I had really done originall is enable only IMAPS. So I used the distributed file and then tweaked the configuration to enable IMAPS, like I had originally.

Finally, started Dovecot with /etc/init.d/dovecot start and sent an e-mail to the server. I was then able to successfully read it using an IMAP client. Success!

What's next?

My next step is to set up the multiple server/virtual user configuration. Once I get that figured out, I'll post again.


Comments on this Entry

Re: Backporting Dovecot
Posted by JulienV (86.204.xx.xx) on Tue 18 Apr 2006 at 06:19
[ View Weblogs ]


I do not think you need such a recent version of dovecot. I have been running a virtual users setup with dovecot for a few weeks, and I am running the standard Sarge version.

I also wanted to backport dovecot from unstable because newer versions are able to deal with multiple user authentification sources (eg. pam, and if it fails MySQL), but I changed my mind and configure all my domains to be virtual.

As for backporting, you might want to use pbuilder which makes thinks a lot easier, preventing you from installing the build dependencies on your production server.

FYI you could have used postgresql-dev if you wanted to use a PostgreSQL backend (instead of libpq-dev) - if you want to distribute your backported package, make sure these changes are well documented as it may breaks the configuration of people wanting to use other backends.
And I think you forgot to mention that you had to change the build-dependency for libmysqlclient15-dev to something like libmysqlclient14-dev (libmysqlclient15-dev does not exist in Sarge).


[ Parent ]

Re: Backporting Dovecot
Posted by redbeard (64.218.xx.xx) on Tue 18 Apr 2006 at 15:48
[ View Weblogs ]

Thanks for the comment.

I know I probably could use the Sarge version of Dovecot, but the examples I've found (so far) use the newer versions. However, after thinking about it I believe I'm going to use a MySQL database for handling mail log ins. It will make maintenance easier, I believe.

As for build dependencies, I have a development server that is set up just for that sort of thing. However, I will probably look at pbuilder in the future. I don't plan on distributing my backport. Especially since I probably won't be using it.

Finally, the build dependency is just on libmysqlclient12-dev. I wish it was 14, since that is in Sarge, but not many developers migrated from client12 to client14 before Sarge came out. Now I just hope more migrate to 15 before etch.

Thanks again,

[ Parent ]