1

I am running this command:

telnet 87.106.xxx.xxx 25

And it says

Trying 87.106.xxx.xxx...
telnet: Unable to connect to remote host: Connection refused

But telnet localhost is running properly.

Then I ran this command

sudo netstat -plntu

and it gave me:

tcp   0   0 127.0.0.1:25    0.0.0.0:*     LISTEN      9518/sendmail: MTA:

But the problem is I don't have Sendmail. I am using postfix.

I tried to uninstall sendmail with apt-get purge sendmail But it gives error:

Package sendmail is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I am looking for a way so that the post 25 should be used by Postfix.

Kamran
  • 109

3 Answers3

1

sendmail is still installed*, the package is called sendmail-bin, sendmail-base, opensmtpd etc.

apt-get purge sendmail-bin sendmail-base opensmtpd

Found using the package search on packages.ubuntu.com: Content search for sendmail

*) Your which sendmail gave as output /usr/sbin/sendmail. which returns the path of an executable, which would be executed if typed on the command line. This means, the sendmail binary was still existing.

sebix
  • 4,432
1

Step 1:

apt-get purge sendmail*

This will remove all its files and configurations.

Step 2:

kill 9518 # or 
killall sendmail

This should kill the sendmail process that's using your port.

Ashley
  • 11
0

seems like your postfix is just listening it on localhost, so all you gotta do is change inet_interfaces from localhost to all.

[root@wcmisdlin02 ~]# grep ^inet_interfaces /etc/postfix/main.cf 
inet_interfaces = all
[root@wcmisdlin02 ~]# 

don't forget to restart postfix after that.

* UPDATE *

It looks like you have you're running sendmail and not postfix, so you probably have something like this inside of your sendmail.mc file:

# grep -E '^DAEMON_OPTIONS.*Addr' /etc/mail/sendmail.mc 
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
# 

you need to remove Addr part, rebuild your sendmail.cf and restart sendmail.

alexus
  • 13,667