How to remove sendmail with Ubuntu

If you want to remove sendmail from your Ubuntu server, you can execute these commands :

sudo /etc/init.d/sendmail stop
sudo apt-get remove sendmail sendmail-bin

Procmail can be uninstalled with sendmail :

sudo apt-get remove procmail
sudo apt-get remove sendmail-base m4 sendmail-cf libdb4.8
sudo apt-get purge sendmail sendmail-bin

And finally :

sudo reboot