my experience upgrading from exim3 to 4
This is just a description of what I did to upgrade from exim3 to exim4.
I hope it's useful to someone.
I have an MX backup, so the first thing I did was to disable port 25 on
my router. The logic was that this way, I could test my mail server
internally without risking a loss of mail -- the MX backup would hold it
until I enabled the port again.
The router is a Linksys, and I found that, while enabling ports works as
expected, disabling ports through the web interface didn't work. I had
to disable the port through the web interface, *then* run down to the
basement and manually reboot the thing. I couldn't find a reboot option
on the web interface. Very annoying.
I tested whether the port was actually blocked by telnetting to port 25
from an external machine. I definitely suggest doing so -- it's how I
figured out the above bug.
Okay, so, next, I acquired the exim_convert4r4 script by copying it from
another machine, where exim4 was already installed. This script
attempts to convert your existing exim3 config file to a monolithic
exim4 config. I have a fairly simple configuration -- the only vaguely
interesting part is enabling the "-*" suffix for my users. Also, I have
a rule in there sending all mail addressed to unknown users to a single
account. I ran the script and read over the output. As near as I could
tell, everything looked fine -- though I doubt I would have noticed if
it hadn't. I placed the output in a safe place for later use.
On to the upgrade! In aptitude, I selected exim4, which automatically
marked exim (exim3) for removal. Good stuff. Out of paranoia, I put
all other pending changes on hold so that there would be no side
The upgrade gave me several options in regard to the configuration file.
I chose the "upgrade from exim3 manually" option. I'm guessing that
this -- the lack of an existing exim4.conf -- is why the installer
complained as it attempted to start exim4 up. I don't recall the exact
I cheerfully ignored this error and copied my new config file into
/etc/exim4/exim4.conf. I then restarted exim4. Now for testing.
Messages to myself from the same machine worked fine; messages from
elsewhere didn't. A quick check of the exim4 logs showed that it was
complaining that port 25 was already in use. Odd. Attempting to telnet
to port 25 resulted in a brief login message, then a closed connection.
No mention of any mail server.
While attempting to sort this out, I noticed that the start and kill
links for exim 3 were still present in /etc/rc?.d ... not good. I
scrapped those. In retrospect, I could have run purge instead of just
remove, but then again, I wanted to keep the exim3 configuration around
just in case I had to revert. So I dunno. I couldn't find a process
binding to port 25, so I took the coward's way out and just rebooted,
figuring that the port issue would sort itself out.
Kernel panics. Monique panics. Many reboots ensue. Some cause kernel
panics; some exhibit a complete failure to communicate with the monitor;
some cause urgent-sounding beep patterns. It is determined that some
portion of the hardware is dead -- probably just the CPU fan, which is
wobbling about in a sickly fashion, but there's an acrid smell that is a
tad worrying. Possibly just dust; possibly more. The hard drives are
nice and cool, though.
Fiance to the rescue! My kernel is hand-rolled, athlon-specific, and
only contains the drivers needed for that set of hardware. Fortunately,
he had a box with the exact same motherboard (including integrated NIC).
He was only using the machine for distcc compiles, so he suggested
giving it my server's identity by swapping hard drives.
"Would you really give up a machine for me?" I ask, trembling in
"Well, I'd rather give up this machine than have you be this upset," he
I knew I had a good reasons for marrying this guy!
So we give his machine a brain transplant and bring it up. Works
without a hitch! Unfortunately, the machine is underclocked to about
2/3 the speed of my server (something about the memory being flakey at
full bus speed), but at least it's *up*. That's the important part. It
gives us the chance to play the "swap parts till we find what's wrong"
game at our leisure, rather than having to deal with it immediately.
Once the machine was finally up again, exim4 worked just fine. It still
supported the user-blah extension, and it still redirected all mail for
unknown users to a single account. Good stuff. I re-enabled the port
on the router and started getting mail again, including a bunch of stuff
that proved that my backup MX had been doing its job.
In summary, the conversion itself was fairly painless. The only gotchas
were that the exim start links were not removed from /etc/rc?.d and that
for some reason something (presumably some undead form of exim3) was
holding on to port 25.