debian: building custom exim packages

July 25, 2008 · Posted in Linux · 1 Comment 

This is a small howto that explains how to build custom exim4 packages on debian.

It was tested with both exim 4.63 ( on debian etch ) and exim 4.69 ( on debian testing/lenny ) .

I needed to build a custom exim email server that would be built with domainkeys and/or dkim support for signing outgoing messages.

So here are the 12 steps I took to get this done:

  1. Create a directory named exim where all activity will take place.
  2. Make sure you have the 'source' URIs in your source.list file.
    If you don't have them put them in  and then run apt-get update
  3. Install packages required for creating a custom package and building it:
     apt-get install dpatch fakeroot devscripts \
     grep-dctrl debhelper gcc libc6-dev libssl-dev pbuilder
     
  4. Install exim4 source package:
     cd exim
     apt-get source exim4
  5. unpack standard configuration files:
     cd exim4-4.63
     fakeroot debian/rules unpack-configs
  6. Define the new package name. In this step we just put the new package name in a variable and export it in the environment to make the next steps easier. You can use anything for the package name ( actually it's just a package name suffix ) but I recommend using 'custom' for the package name for one main reason: dependencies. Packages that depend on exim4-daemon-light or exim4-daemon-heavy (like sa-exim, mailx and maybe others ) already accept exim4-daemon-custom as a replacement so with this custom package you're not breaking any dependencies.
    Ex:

     export  my_pkg_name=custom
  7. Edit configuration files. There should be 3 EDITME configuration files for exim and one for eximon, one for each package that will be built. Copy one of the exim EDITME file to EDITME.exim4-$your_pkg_name then edit the new file to set up the new options you want.
    Ex:

     cp EDITME.exim4-heavy EDITME.exim4-$my_pkg_name
  8. pack the configuration files so your new configuration will be saved and used at build time:
     fakeroot debian/rules pack-configs
  9. Create the custom package. This is required only if you use a package name other then 'custom':
     sh debian/create-custom-package $my_pkg_name
  10. Activate the new package in debian/rules. Edit debian/rules and look for the line where the extradaemonpackages variable is defined and add your package name ( exim4-daemon-$my_pkg_name ) to the list of packages defined there.
  11. Install build dependencies. You can skip this step if this is not the first time you build this package.
     
    /usr/lib/pbuilder/pbuilder-satisfydepends
     
  12. Build the packages:
     
    debuild -us -uc
  13. Install the new package. if you already had some version of the exim4-daemon package installed you will have to remove it first and then you can install the custom package. The new package will be in the base directory created at step 1.
    Ex. (for amd64 etch exim 4.63-17 ) :

     cd ..
     dpkg -i exim4-daemon-${my_pkg_name}_4.63-17_amd64.deb

This process went pretty well for both exim 4.63 and 4.69 on lenny. Exim 4.63 only had experiemental support for domainkeys ( not dkim ) and exim 4.69 on lenny had support for both but I was only able to build it after applying a small patch to exim to make it work with the latest version of libdkim ( 1.0.19 ) .

This post was intended to be a general howto about building a custom exim package. I will write more details about actually building exim with domainkeys and/or dkim in a future post.

google apps: check mail

May 18, 2007 · Posted in General · Comment 

I went to google apps today and here is what I see on their page:

 With Google Apps, you and your colleagues can check email, schedule meetings, check email, chat in real time,....

So you can check email, schedule meetings, check email, chat, check email, share calendars, check email....hmm if that's how you're going to work I'm not sure how productive you're going to be with google apps. But yes I guess we are all addictive ( to some degree ) to checking our email and stats ... uhh they forgot to mention that, "check stats" - analytics, adsense, adwords, webmaster tools a lot of stats to check...gotta  go!  Have work to do. I haven't checked my email and stats in a long time.

qmail and DKIM

May 4, 2007 · Posted in Email, security · 79 Comments 

DomainKeys Identified Mail (DKIM) is a method for validating the identity associated with a message using using public-key cryptography and key server technology. DKIM is an enhanced version of Yahoo's Domain Keys and Cisco's Identified Internet Mail methods. As of February 2007 an IETF draft was accepted as "Proposed standard", it may take some more time till this will be a standard but the current version is stable ( according to dkim.org ).

Implementations of DKIM in email servers is not available as much as DomainKeys.
For qmail there is a patch that uses libdomainkeys to implement a replacement for qmail-queue that will verify and sign messages but this only works for DomainKeys not DKIM. I have developed a solution for qmail to be able to verify and sign messages with DKIM. Read more

Email folders and message filters in thunderbird

January 25, 2007 · Posted in Email · Comment 

I really love using folders on my imap account. This is ( I think ) one of the main reasons why I don't use gmail, labels are just not as good as folders.

I have tens of folders and message filters for each folder, I'm subscribed to various email lists from the freebsd project, Linux kernel, gentoo, postfix, qmail and some others and I use thunderbird with filters to put messages from each list in it's own folder. When you go in thunderbird to set a new filter and you want to move messages that match a certain criteria in some folder, you get a list of all folders in all thunderbird accounts. This is really a pain if you have more then one email account set up and in each account you have 20-30 or more folders.

My folders are well structured so I have just a few top level folders and then each has subfolders. In thunderbird 1.0.x you would get a list of top level folders that you could expand or colapse as you wanted, that was great but now in 1.5 when you
want to find a folder you see the whole list of folders in all accounts with every folder expanded and you can't colapse them. This is really annoing. I wonder why they changed the original behavior.