Page 1 of 1

How to Re-Install Exim4

Posted: Mon Sep 28, 2015 9:44 pm
by geekplaya
I made a big Uh-Oh.

I uninstalled and purged exim4 to install sendmail, as exim4 wasn't sending e-mails via the PHP mail() function.

Well, that fixed nothing, and so I uninstalled sendmail and did "apt-get install exim4".

Unfortunately, this error is thrown:

Code: Select all

apt-get install exim4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libperl5.18 libpq5 sendmail-cf
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  exim4
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
3 not fully installed or removed.
Need to get 0 B/7,876 B of archives.
After this operation, 45.1 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package exim4.
(Reading database ... 86814 files and directories currently installed.)
Preparing to unpack .../exim4_4.82-3ubuntu2_all.deb ...
Unpacking exim4 (4.82-3ubuntu2) ...
Setting up exim4-config (4.82-3ubuntu2) ...
/usr/sbin/update-exim4.conf: Error, missing /var/lib/exim4, exiting.
dpkg: error processing package exim4-config (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of exim4-base:
 exim4-base depends on exim4-config (>= 4.30) | exim4-config-2; however:
  Package exim4-config is not configured yet.
  Package exim4-config-2 is not installed.
  Package exim4-config which provides exim4-config-2 is not configured yet.

dpkg: error processing package exim4-base (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of exim4-daemon-light:
 exim4-daemon-light depends on exim4-base (>= 4.82); however:
  Package exim4-base is not configured yet.

dpkg: error processing package exim4-daemon-light (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of exim4:
 exim4 depends on exim4-base (>= 4.82); however:
  Package exim4-base is not configured yet.
 exim4 depends on exim4-daemon-light | exim4-daemon-heavy | exim4-daemon-custom; however:
  Package exim4-daemon-light is not configured yet.
  Package exim4-daemon-heavy is not installed.
  Package exim4-daemon-custom is not installed.

dpkg: error processing package exim4 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 exim4-config
 exim4-base
 exim4-daemon-light
 exim4
E: Sub-process /usr/bin/dpkg returned an error code (1)
I no longer have the config file for exim4 that came with VestaCP either, so that complicates things. Thankfully I never set up a domain with its own mail server, so nothing from that was lost.

How do I go about reinstalling just exim4? Right now I can send no e-mails, not even with PHP mail().

Thanks.

Re: How to Re-Install Exim4

Posted: Tue Sep 29, 2015 6:10 pm
by geekplaya
The solution was to delete the paniclog file for exim4, then download the auto config file from VestaCP, then install exim4-daemon-heavy to replace exim4-daemon-light, and then restart exim4 from Vesta.