Fix Debian Exim4 Broken By Upgrade

Thought I’d just post this since I didn’t find an author­it­at­ive answer on the web. Those using exim4 on a Debian test­ing or unstable sys­tem might recently have found their sys­tem broken after doing a dist-upgrade to ver­sion 4.67−7, with exim4-config fail­ing to con­fig­ure with a mes­sage sim­ilar to the following:

Exim con­fig­ur­a­tion error in line 28 of /var/lib/exim4/config.autogenerated.tmp: mal­formed macro definition.

This is caused by the installer being unable to handle cus­tom­ised sec­tions of your con­fig files as it attempts to migrate them to the new ver­sion. In my case it was a bunch of con­fig­ur­a­tion to sup­port mail­man that was caus­ing the trouble. All I did was copy my entire /etc/exim4/ dir­ect­ory to another sys­tem, remove all exim4 pack­ages (and --purge), rein­stall exim4 and restore the rel­ev­ant parts of my con­fig (if you’re using mail­man, use this guide). Mail ser­vice restored in about 2 minutes.

For those yet to do the upgrade to 4.67−7, copy your con­fig files (/etc/exim4/) some­where else, do a dist-upgrade, and accept the changes to your files the installer recom­mends. I haven’t done this so I don’t know if it will suc­ceed in adapt­ing your cus­tom­ised set­tings, but it should stop the pack­age break­ing. If neces­sary you can restore your set­tings 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 unin­stalling exim4, even with the --purge option.

3

Comment

You can also Register for more profile options.