A
A
avp2017-02-19 17:03:17
linux
avp, 2017-02-19 17:03:17

How to find out which process is using port 25?

The netstat -atu command shows the following

tcp        0      0 localhost:smtp          *:*                     LISTEN

I want to understand what service is using port 25. I want to install postfix.
Yes, I still have exim4 installed on my system.
ii  exim4                           4.80-7+deb7u4              all          metapackage to ease Exim MTA (v4) installation
ii  exim4-base                      4.80-7+deb7u4              amd64        support files for all Exim MTA (v4) packages
ii  exim4-config                    4.80-7+deb7u4              all          configuration for the Exim MTA (v4)
ii  exim4-daemon-light              4.80-7+deb7u4              amd64        lightweight Exim MTA (v4) daemon

I want to install dovercot. I understand that exim4 is easy to remove. It's not even listening on a port.
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:smtp          *:*                     LISTEN
tcp        0      0 localhost:mysql         *:*                     LISTEN
tcp        0      0 *:http                  *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp6       0      0 ip6-localhost:smtp      [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Mirilaczvili, 2017-02-19
@2ord

netstat -tulpn | grep ':25 '

A
Axian Ltd., 2017-02-19
@AxianLTD

Like this: sudo lsof|grep :smtp

C
CityCat4, 2017-02-19
@CityCat4

Well, actually listening. Here is this line
just says that port 25 (if it is SMTP) is busy. As far as dovecot is concerned, it is NOT an SMTP server and will not replace exim. Exim can be replaced with postfix or sendmail. dovecot - IMAP/POP3 server for distributing mail on the local network.

V
Victor Taran, 2017-02-21
@shambler81

it's easier for me to telnet knock and see the greeting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question