Linode Forum
https://forum.linode.com/

Problem with removing postfix
https://forum.linode.com/viewtopic.php?f=11&t=2032
Page 1 of 1

Author:  chapterthree [ Sun Jan 01, 2006 4:45 pm ]
Post subject:  Problem with removing postfix

Hey All,

For some reason why I try to remove postfix, apt-get wants to remove the mysql-server package as well. Anybody know why this is? I use mysql-server so I can not afford to remove it. Seems odd that an MTA wants to remove a database package. I do not have postfix-mysql installed btw:

Code:
root@g [/etc]# apt-get --purge remove postfix
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
   maildrop* (1.5.3-1.1sarge1)
   mailx* (8.1.2-0.20040524cvs-4)
   mysql-server* (4.0.24-10sarge1)
   postfix* (2.1.5-9)
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 11.7MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Code:
root@g [/etc]# dpkg -l 'mysql-server'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  mysql-server   4.0.24-10sarge mysql database server binaries

Code:
root@g [/etc]# dpkg -l '*postfix*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name              Version           Description
+++-=================-=================-========================================
ii  postfix           2.1.5-9           A high-performance mail transport agent
un  postfix-doc       <none>            (no description available)
un  postfix-ldap      <none>            (no description available)
un  postfix-mysql     <none>            (no description available)
un  postfix-pcre      <none>            (no description available)
un  postfix-pgsql     <none>            (no description available)
un  postfix-tls       <none>            (no description available)

Any ideas?

Author:  Jay [ Sun Jan 01, 2006 8:11 pm ]
Post subject: 

apt-get install mysql-server

THEN do the postfix stuff.

Author:  chapterthree [ Sun Jan 01, 2006 8:56 pm ]
Post subject: 

Jay wrote:
apt-get install mysql-server

THEN do the postfix stuff.


My fault, I should have posted in my original post that mysql-server IS installed.

Code:
root@g [/etc]# dpkg -l 'mysql-server'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  mysql-server   4.0.24-10sarge mysql database server binaries


And on a side note, you can't remove a package unless it's installed, therefore apt-get can't remove mysql-server unless it is installed. So although implied, mysql-server is installed ;)

Author:  Xan [ Mon Jan 02, 2006 4:39 am ]
Post subject: 

dpkg will automatically remove packages required by a package you're removing, unless those packages are in use by something else (or have been installed specifically).

I believe what he was driving at is that if you tell the system you specifically want mysql-server, it won't automatically remove it.

Author:  SteveG [ Mon Jan 02, 2006 1:19 pm ]
Post subject: 

Actually, what you're probably hitting is a dependency chain: mysql-server depends on mailx, which depends on mail-transfer-agent, which is postfix. The
more surprising thing is that attempting to remove postfix doesn't cause a lot more fallout - an MTA is pretty much required to run Debian.

Trying using 'dpkg --remove postfix', it won't try to remove anything else automatically, but will complain about all the things you'll break with this removal.

Author:  chapterthree [ Mon Jan 02, 2006 2:17 pm ]
Post subject: 

Xan wrote:
I believe what he was driving at is that if you tell the system you specifically want mysql-server, it won't automatically remove it.
How do you tell the system I specifically want to keep mysql-server?
Code:
root@g [/etc]# apt-get install mysql-server
Reading Package Lists... Done
Building Dependency Tree... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


SteveG - Ahh, I think I understand what you mean now. For example mysql-server will occasionally check for corrupt tables (I think on daemon restart), and if it finds any, it emails me. Now that I think about it, it must be using postfix or mailx to send those mails. Now that makes sense as to why mysql-server depends on mailx and postfix. I also see your point about other things not depending on it, like apache2 or crond for example.

Well I have installed a different MailServer, although it is 3rd party software, not a standard mta such as postfix or exim. Does anybody know how to configure mysql-server to use a sendmail binary, or specifically tell it not to use postfix.

Edit: I did some more searching, and SteveG was exactly correct:
Quote:
Of course it should be removed. The 'mysql-server' package depends on 'mailx', which depends on 'mail-transfer-agent'. You removed Exim, which provides 'mail-transport-agent', but did not provide a replacement, so the only thing to do was to remove 'mailx', which meant that 'mysql-server' had to go too.

The fix, of course, is to install something else that provides 'mail-transfer-agent'.


Now my question is how can I make it so that my 3rd party mail server program 'provides' the mail-transfer-agent dependency?

Author:  tronic [ Mon Jan 02, 2006 7:21 pm ]
Post subject: 

If the third-party program is in apt, install it. It should provide this automatically as part of the installation.

If it is not in apt, you'll probably need to set up a 'stub' package to keep apt quiet about that kind of thing. (Meaning, you install it from sources but tell apt "pretend this is a real Debian package called xxx and provides yyy, and note it.")

The second approach will require:

http://www.debian.org/doc/manuals/apt-howto/ch-helpers.en.html#s-equivs

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/