postfix problems
I had terrible problems with postfix, which finally culminated in postfix stopping working entirely. So I decided the best thing to do would be to start over from scratch, following the linode library article yet again. Therefore, I did apt-get purge postfix. I thought it worked, but apparently (as I later discovered) it didn't. Therefore, postfix was still installed when I, thinking that it had just left some files over that I needed to get rid of, did rm -rf /etc/postfix. That, however, means that postfix is basically crippled. That would not be a problem, as i could just purge it and reinstall, but whenever I do the command apt-get purge postfix, it does this:
The following extra packages will be installed:
exim4 exim4-base exim4-config exim4-daemon-light
Suggested packages:
eximon4 exim4-doc-html exim4-doc-info libmail-spf-query-perl swaks
The following packages will be REMOVED:
mail-stack-delivery postfix*
The following NEW packages will be installed:
exim4 exim4-base exim4-config exim4-daemon-light
0 upgraded, 4 newly installed, 2 to remove and 5 not upgraded.
1 not fully installed or removed.
Need to get 0B/1900kB of archives.
After this operation, 193kB of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Could not perform immediate configuration on 'exim4'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (
2)
This means, that for now, I can't purge or reinstall postfix. Any help would be greatly appreciated in resolving this matter.
Thanks,
-Michael.
P.S. I'm using Ubuntu 10.10.
3 Replies
You might try running a removal with aptitude since I think it warns about this stuff first and would let you know what package is involved. Alternatively something like "aptitude search ~i~Dmail-transport-agent" should show you installed packages with that dependency.
As to how to get around it, if the packages are simple stuff like mailx, you could probably just remove them at the same time and then reinstall after fixing your installation. If not, I think that dpkg can remove a package while ignoring specific dependencies (check the man page for an ignore option). So you could remove postfix yet leave a broken dependency, but you'll fix that by then reinstalling.
BTW, if you're just trying to fix postfix due to manually removing files, I think just reinstalling it should work, probably "apt-get –reinstall install postfix" or something close to that. You might also then want to dpkg-reconfigure postfix after the reinstallation.
-- David
Ok, I tried apt-get –reinstall install postfix, and it keeps failing with files not found, which, of course, I removed. Any way to tell it to just forget postfix was installed, delete all files and directories that were installed with it, and then re-do it? Also, it says one not fully installed or removed, any way to tell what that is?
Thanks,
-Michael.
But I'd probably just do the manual removal with dpkg at this point (dpkg –remove postfix or dpkg --purge postfix) which should hopefully flush the registration of the postfix package completely from the system after which you can do a new installation. I think dpkg will warn about the dependencies you are breaking but not do anything else automatically. If it looks like it will (use --dry-run to test), then you could try adding "--ignore-depends=postfix" to the command.
-- David