Something weird:

I get this error sending an email:

fatal: bind port 25: Address already in use

So I check and sendmail is running:

sudo netstat -lnp |grep :25
tcp        0      0  *               LISTEN      18968/sendmail: MTA

But can't uninstall:

apt-get remove sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'sendmail' is not installed, so not removed

Any help?

  • Are you sure you installed sendmail with apt-get?
    – arne.z
    Jan 27 '17 at 15:48

Sendmail was uninstalled while you have installed Postfix.

You must kill sendmail with kill 18968


The package name for sendmail may not actually be sendmail. Try verifying how you got sendmail (which package installed it).

Running which sendmail will provide you the full path of sendmail which you can then plug into dpkg -S to find the package that provides it.


$ which sendmail
$ dpkg -S /sbin/sendmail
sendmail: /sbin/sendmail

Please note, I don't have a Debian based system available to me so the command outputs are just educated guesses, but the idea is the same.

From there, you can uninstall the appropriate package if you so desire. That being said, it might just be worth it to stop and disable the sendmail service, that will vary by distro/version but should be easy enough to figure out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.