Fix Debian Exim4 Broken By Upgrade
posted under I'm a Geek, Linuxism 2.8.2007
Thought I’d just post this since I didn’t find an authoritative answer on the web. Those using exim4 on a Debian testing or unstable system might recently have found their system broken after doing a dist-upgrade to version 4.67-7, with exim4-config failing to configure with a message similar to the following:
Exim configuration error in line 28 of /var/lib/exim4/config.autogenerated.tmp: malformed macro definition.

This is caused by the installer being unable to handle customised sections of your config files as it attempts to migrate them to the new version. In my case it was a bunch of configuration to support mailman that was causing the trouble. All I did was copy my entire /etc/exim4/ directory to another system, remove all exim4 packages (and --purge), reinstall exim4 and restore the relevant parts of my config (if you’re using mailman, use this guide). Mail service restored in about 2 minutes.

For those yet to do the upgrade to 4.67-7, copy your config files (/etc/exim4/) somewhere else, do a dist-upgrade, and accept the changes to your files the installer recommends. I haven’t done this so I don’t know if it will succeed in adapting your customised settings, but it should stop the package breaking. If necessary you can restore your settings from the backup you just took.

You may also wish to take a copy of your /etc/aliases file, though I found this wasn’t touched by apt when uninstalling exim4, even with the --purge option.


3 Comments
RSS feed for comments on this post | trackback
  1. Ray Burgemeestre wrote
     

    Had the same error due to changes made or not accepting the new configuration files the upgrade requested..
    Removing exim4 with “apt-get –purge remove exim4″ didn’t work for me, the exim4-config package kept giving “malformed macro …” error.
    Maybe –force would have worked as well, though I used “apt-get –purge remove exim4-config” to remove it (all the packages will be removed via dependencies) and than reinstalled using “apt-get install exim4″


  2. jep wrote
     

    I had to purge exim4-config by doing this:

    apt-get remove –purge exim4-config

    Order between “remove” and “–purge” is relevant.


  3. jep wrote
     

    …and moreover: the “purge” word has TWO hyphen characters before it. This posting place removes one of them!

    apt-get remove --purge exim4-config


Post a comment
You must be logged in to post a comment.