[DEBIAN] How to properly remove sendmail completely

  • Last time I posted here, I had an issue where I couldnt get mail to be sent or received. At the time I was working on a fresh Debian Squeeze install on a VPS, and i-mscp was the only thing on it. The issue was that sendmail was using port 25, and it couldnt be used for postfix. Hence roundcube have an error :


    Code
    1. SMTP Error (-1): Connection to server failed.


    At that time it was fixed by nuxwin who helpfully remote logged into my session, and removed sendmail, fixed my hostname, and it was all good.


    Currently I am in the exact same situation. netstat shows that sendmail is hogging port 25, however I'm quite unable to completely remove it. I did an apt-cache search for anything beginning with sendmail, and accordingly purged these packages: sendmail-base, sendmail-bin, sendmail-cf and sendmail-doc. apt reports that the package sendmail isnt installed either. However even after everything, an apache restart and a cold reboot later, sendmail still occupies port 25, and I have no clue how to go about removing it.


  • Can you post the details of:
    aptitude search sendmail


    Here it is:


    [hr]
    It seemed to have been 'libmail-sendmail-perl'


    Doing a 'apt-get remove sendmail*' seems to have done the trick


    Edit2: I also had to unset the exec permission on the sendmail startup file in /etc/init.d/sendmail

    Edited once, last by dzchimp ().