LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Remove Exim4 Completely? (http://www.linuxquestions.org/questions/debian-26/remove-exim4-completely-651312/)

carlosinfl 06-24-2008 11:13 AM

Remove Exim4 Completely?
 
I am building a new email server on Debian (Etch) and notice that when I do install Postfix, it removes the conflicting MTA (Exim4) however when I do a search, there is a bunch of config files and trash left behind pertaining to Exim4 all over the system. Is there a way to either:

1 - Install Debian (Netinst) w/o the default MTA or replace in from the start with Postfix?

2 - Remove all traces of Exim4 from the system?

Dutch Master 06-24-2008 11:43 AM

1) IIRC not. Your system needs an MTA to deliver error messages. Maybe in the 'expert' setting of the installer?
2) Did you just uninstall Exim, or did you purge it? The latter should leave no trace of the purged package on the system...

carlosinfl 06-24-2008 11:49 AM

When you do apt-get install postfix, it removes exim4 automatically but I don't think it purges it.

Are you suggesting:

Code:

apt-get -y remove --purge exim4

Dutch Master 06-24-2008 11:58 AM

No. Try
Code:

apt-get --purge exim4

souneedalink 06-24-2008 11:59 AM

Quote:

1 - Install Debian (Netinst) w/o the default MTA or replace in from the start with Postfix?
minimal install - unselect ALL the software selection choices

Quote:

2 - Remove all traces of Exim4 from the system?
aptitude purge
apt-get remove --purge

carlosinfl 06-24-2008 12:02 PM

Quote:

Originally Posted by souneedalink (Post 3193761)
minimal install - unselect ALL the software selection choices

Including base system? Are you indicating that will NOT install Exim4?


Quote:

Originally Posted by souneedalink (Post 3193761)
aptitude purge
apt-get remove --purge

This conflicts with what was suggested above...

Telemachos 06-24-2008 01:00 PM

When I install msmtp-mta, aptitude removes the base pieces of exim4, but leaves a few others. Edit - Meaning that the aptitude purge command won't get everything, since those packages (apparently) aren't orphaned dependencies. In any case, this is what I do to get rid of everything exim4:
Quote:

aptitude purge ~nexim4
But if you ordinarily use apt-get, do it this way instead:
Quote:

aptitude keep-all
aptitude purge ~nexim4
Edit again: and if you want to purge all packages that have ever been removed but not purged on your system, do this:
Quote:

aptitude purge ~c
Again, use the aptitude keep-all command first, if you normally use apt-get.

Final edit: for old-time's sake, why not check out these posts?
http://forums.debian.net/viewtopic.php?t=17612
http://forums.debian.net/viewtopic.php?t=16951
http://forums.debian.net/viewtopic.php?t=3258

slackhack 06-24-2008 01:47 PM

I do:

apt-get remove exim4 exim4-base exim4-config exim4-daemon-light

and maybe one or two others that I'm not thinking of. Usually I like to do purge, but with the RC3 installer, it says purge isn't an option for some reason. But if you have purge, definitely do that instead of just remove.

carlosinfl 06-24-2008 03:24 PM

Code:

email:~# apt-get --purge exim4 exim4-base exim4-config exim4-daemon-light
E: Invalid operation exim4
email:~# apt-get remove --purge exim4 exim4-base exim4-config exim4-daemon-light
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  at* exim4* exim4-base* exim4-config* exim4-daemon-light* mailx* mutt*
0 upgraded, 0 newly installed, 7 to remove and 1 not upgraded.
Need to get 0B of archives.
After unpacking 9396kB disk space will be freed.
Do you want to continue [Y/n]?

Looks like that worked but this looked concerning and like something my system needs...

Code:

Stopping deferred execution scheduler: atd.
Purging configuration files for at ...

Anyone know if this is important?

Telemachos 06-24-2008 03:57 PM

Have you already installed Postfix? At is a tool to schedule jobs (see aptitude show at). It depends on mail-transport-agent, which is a virtual item that can be met by any of a number of mtas:
Quote:

root /home/telemachus # aptitude show mail-transport-agent
No current or candidate version found for mail-transport-agent
Package: mail-transport-agent
State: not a real package
Provided by: citadel-mta, courier-mta, esmtp-run, exim4-daemon-heavy,
exim4-daemon-light, masqmail, msmtp-mta, nbsmtp, nullmailer,
postfix, sendmail-bin, ssmtp, xmail
If you have Postfix installed, at shouldn't have been removed. The same goes for mailx and mutt, I think. They depend on mail-transport-agent - not exim4 per se. You might want to reinstall at and mailx once you have a new mta. Mutt you may not need if you don't want a command line email client.

JackieBrown 06-24-2008 05:35 PM

Quote:

Originally Posted by Carlwill (Post 3193765)
Including base system? Are you indicating that will NOT install Exim4?

The base system is what installs exim4.

No reason to install it.

Telemachos 06-24-2008 06:24 PM

Quote:

Originally Posted by JackieBrown (Post 3194008)
The base system is what installs exim4.

No reason to install it.

Just to clarify: the base system must be installed (it has dpkg, apt, the kernel, libc6 etc). I think what we are talking about is the "Standard system" choice in the tasksel menu that comes up after the base system has been installed.

You can choose to skip it, but in my experience you will end up missing a bunch of little programs you will actually want. If the only problem is exim4, I think it's easier to remove that, but ymmv.

If you're curious, on a recent installation of Lenny, here's what I got when I installed only "Standard system" in tasksel. Most people are going to want 10-30 of these packages pretty regularly.
Quote:

[INSTALL, DEPENDENCIES] libedit2
[INSTALL, DEPENDENCIES] libgssglue1
[INSTALL, DEPENDENCIES] libisccc30
[INSTALL, DEPENDENCIES] libisccfg30
[INSTALL, DEPENDENCIES] libkeyutils1
[INSTALL, DEPENDENCIES] libpci3
[INSTALL, DEPENDENCIES] libsqlite3-0
[INSTALL, DEPENDENCIES] libustr-1.0-1
[INSTALL, DEPENDENCIES] python-sepolgen
[INSTALL, DEPENDENCIES] python2.5
[INSTALL, DEPENDENCIES] python2.5-minimal
[INSTALL, DEPENDENCIES] ucf
[HOLD] initramfs-tools
[INSTALL] at
[INSTALL] bash-completion
[INSTALL] bc
[INSTALL] bind9-host
[INSTALL] bsd-mailx
[INSTALL] dc
[INSTALL] dictionaries-common
[INSTALL] dnsutils
[INSTALL] doc-debian
[INSTALL] doc-linux-text
[INSTALL] exim4
[INSTALL] exim4-base
[INSTALL, DEPENDENCIES] ucf
[HOLD] initramfs-tools
[INSTALL] at
[INSTALL] bash-completion
[INSTALL] bc
[INSTALL] bind9-host
[INSTALL] bsd-mailx
[INSTALL] dc
[INSTALL] dictionaries-common
[INSTALL] dnsutils
[INSTALL] doc-debian
[INSTALL] doc-linux-text
[INSTALL] exim4
[INSTALL] exim4-base
[INSTALL] exim4-config
[INSTALL] exim4-daemon-light
[INSTALL] file
[INSTALL] finger
[INSTALL] ftp
[INSTALL] gettext-base
[INSTALL] iamerican
[INSTALL] ibritish
[INSTALL] ispell
[INSTALL] less
[INSTALL] libbind9-30
[INSTALL] libdb4.5
[INSTALL] libdns32
[INSTALL] libevent1
[INSTALL] libgc1c2
[INSTALL] libgpmg1
[INSTALL] libidn11
[INSTALL] libisc32
[INSTALL] libkrb53
[INSTALL] liblockfile1
[INSTALL] liblwres30
[INSTALL] libmagic1
[INSTALL] libnfsidmap2
[INSTALL] libpcre3
[INSTALL] librpcsecgss3
[INSTALL] libsemanage1
[INSTALL] lsof
[INSTALL] m4
[INSTALL] mime-support
[INSTALL] mlocate
[INSTALL] mpack
[INSTALL] mtools
[INSTALL] mtr-tiny
[INSTALL] mutt
[INSTALL] ncurses-term
[INSTALL] nfs-common
[INSTALL] openbsd-inetd
[INSTALL] openssh-client
[INSTALL] patch
[INSTALL] pciutils
[INSTALL] perl
[INSTALL] perl-modules
[INSTALL] pidentd
[INSTALL] policycoreutils
[INSTALL] portmap
[INSTALL] procmail
[INSTALL] python
[INSTALL] python-central
[INSTALL] python-minimal
[INSTALL] python-newt
[INSTALL] python-selinux
[INSTALL] python-semanage
[INSTALL] python-support
[INSTALL] reportbug
[INSTALL] selinux-policy-refpolicy-targeted
[INSTALL] sharutils
[INSTALL] strace
[INSTALL] tcsh
[INSTALL] telnet
[INSTALL] texinfo
[INSTALL] time
[INSTALL] w3m
[INSTALL] python-support
[INSTALL] reportbug
[INSTALL] selinux-policy-refpolicy-targeted
[INSTALL] sharutils
[INSTALL] strace
[INSTALL] tcsh
[INSTALL] telnet
[INSTALL] texinfo
[INSTALL] time
[INSTALL] w3m
[INSTALL] wamerican
[INSTALL] whois

JackieBrown 06-24-2008 07:57 PM

The wonderful thing about Debian is that those programs will comes as needed.

If I install a program that uses perl, it will be installed.

I can't think of many users that would want exim4, telinet, nfs-common, openssh, procmail, ftp, etc unless you have a home network.

And most of those add services that will be running in the background that may require additional steps to harden your system (telinet and openssh stand out.)

Out of that list, the only thing I would install - that might not be brought in automatically - is bash-completion and mlocate. bc and m4 might be usefully if g++ were installed with it. I prefer aspell to ispell.

Telemachos 06-24-2008 08:38 PM

Quote:

Originally Posted by JackieBrown (Post 3194117)
If I install a program that uses perl, it will be installed.

I can't think of many users that would want exim4, telinet, nfs-common, openssh, procmail, ftp, etc unless you have a home network.

And most of those add services that will be running in the background that may require additional steps to harden your system (telinet and openssh stand out.)

Fair enough, but I can't imagine a Linux system without perl, ssh, procmail, and ftp.

But while we are on the subject, the Debian installation only provides the client for each of the services (except exim4). That is the "Standard system" task provides the telnet, ftp and openssh clients for outgoing connections - not the daemons running and ready to receive attacks. So nothing to harden, in that sense. Every couple of weeks, someone writes here or at http://forums.debian.net to say, "I just installed Debian and I can ssh out. Why can't I log into the machine via ssh?"

Dutch Master 06-24-2008 08:48 PM

Quote:

Originally Posted by Telemachos (Post 3194137)
Fair enough, but I can't imagine a Linux system without perl, ssh, procmail, and ftp.

Ever heard of "embedded Linux"? ;) Things like mobile sat-nav (car!), NAS and phones don't need all kind of 'standard Linux app' and given the limited storagespace on such devices it's rather un-wise to install app's one won't need...


All times are GMT -5. The time now is 10:33 PM.