How to find out what email program is running on my server.

Is there anyway to find out what email program is being used on a server whether it's sendmail, postfix, exim or whatever?

3 Replies

Try running telnet localhost 25 on the server. The mail server should reply saying what software it is. For example, sendmail would reply with this:

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 zeus.example.com ESMTP Sendmail 8.14.4/8.14.4; Tue, 24 Jul 2012 23:37:32 -0500

If that doesn't work you can run ps -ef to get a list of running processes, and look through the list for exim, sendmail, postfix, etc. You can pipe that to the grep command to search for a particular process, like this:

$ ps -ef |grep sendmail
root      1672     1  0 Jun10 ?        00:00:39 sendmail: accepting connections       
smmsp     1675     1  0 Jun10 ?        00:00:00 sendmail: Queue runner@00:25:00 for /var/spool/clientmqueue
root     13028  1672  0 21:37 ?        00:00:00 sendmail: server localhost [127.0.0.1] cmd read

You could also run netstat -lpnt and see what's listening on port 25

netstat -lpnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2026/master     
tcp6       0      0 ::1:25                  :::*                    LISTEN      2026/master    

In this case postfix shows as master

Thank you Agwa, that was very helpful.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct