At times it was noted that sendmail on my Debian system was not getting completely removed.
Thing tried:
apt-get remove sendmail*
It worked at times, and didnt at others.
But I were to try:
netstat -tulpn | grep :25 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 27878/sendmail: MTA
I’d find it again.
To find where it came from, I did:
ls -l /proc/27878/ total 0 -r-------- 1 root root 0 Mar 5 12:47 auxv -r--r--r-- 1 root root 0 Mar 5 11:58 cmdline -rw-r--r-- 1 root root 0 Mar 5 12:47 coredump_filter -r--r--r-- 1 root root 0 Mar 5 12:47 cpusete lrwxrwxrwx 1 root root 0 Mar 5 12:47 cwd -> (deleted) /var/spool/mqueue -r-------- 1 root root 0 Mar 5 12:47 environ lrwxrwxrwx 1 root root 0 Mar 5 11:58 exe -> (deleted) /usr/lib/sm.bin/sendmail
Note that it shows /usr/lib/sm.bin/sendmail
However there is no /usr/lib/sm.bin, but there sure is a /usr/lib/sendmail
So I deleted them, and restarted the apache2 server.
service apache2 restart [ ok ] Restarting web server: apache2 ... waiting . [email protected]:~/imscp# netstat -tulpn | grep :25 [email protected]:~/imscp# netstat -tulpn | grep 'sendmail'
Another thing that worked once was doing this:
chmod ugo=rw /etc/init.d/sendmail
In other words, I prevented it from running. But in the earlier instance there was no entry for sendmail under init.d
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.