I have root access to a Linux server (CentOS 5.10). I want to see the email server's settings such as whether SMPT is working, wheter there is an email server, port number, does it require SSL, what authentication method is required, the list of email addresses, if possible the passwords for the email addresses. And where should I look for documentation?

Here's netstat -ntlp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0    *                   LISTEN      4796/java
tcp        0      0      *                   LISTEN      4796/java
tcp        0      0      *                   LISTEN      21409/mysqld
tcp        0      0       *                   LISTEN      3332/rpc.statd
tcp        0      0        *                   LISTEN      6765/sshd
tcp        0      0     *                   LISTEN      4796/java
tcp        0      0       *                   LISTEN      3271/portmap
tcp        0      0        *                   LISTEN      4700/httpd
tcp        0      0      *                   LISTEN      4796/java
tcp        0      0      *                   LISTEN      4768/postgres
tcp        0      0      *                   LISTEN      4338/sendmail
tcp        0      0     *                   LISTEN      4796/java
  • netstat -ntlp on your server and post the output here. Your question is too broad. Did you mean smtp/imap/pop? Need more details.
    – GMaster
    Sep 27, 2014 at 8:49
  • I can only see 1 mail related port opened, 25. So I am assuming this is a smtp server only. Do you use this server for pop/imap?
    – GMaster
    Sep 27, 2014 at 10:36
  • 2
    First you should find out which mail transport agent (MTA) is running on your system. For that, see netstat -lnapt | grep ":25". The last thing is PID/process name, so continue by doing man <whatever that process name was> to see if that leads you somewhere. Most likely you're running sendmail or postfix, so I'd begin by looking into directories /etc/mail and /etc/postfix.
    – user48669
    Sep 27, 2014 at 16:23
  • @SamiLaine You should make this an answer. Sep 27, 2014 at 22:58

3 Answers 3


This is going to largely depend on what MTA you are running. CentOS comes with two primary mail servers installed (sendmail and postfix). Sendmail is the default.

If you haven't changed anything and the defaults are in-place, you can check all sendmail's configs in /etc/mail/ (except for aliases in /etc/aliases).

If the primary was switched over to postfix, all of your configs will be in /etc/postfix/. Although you can also use postconf -a to view all of postfix's currently active settings and corresponding values.

For either one, a good place to start with documentation is the man pages. man sendmail man postfix

You can always use netstat or sockstat to figure out which MTA is running, if you don't know. netstat -pat | grep smtp for example. the last column should tell you the PID and name of the executable bound to port 25.

  • 1
    One can also use lsof -i :25 to see what command is using port 25.
    – ojs
    Mar 12, 2016 at 21:18

You are running sendmail. That was the default mta in CentOS 5. CentOS 7 uses postfix. Sendmail is listening on port 25 on localhost. So only local users / applications can use it to send mail. Local users also can receive mails. Check /var/spool/mail directory. You don't require SSL to send mail. I would even guess, it is not configured. No authentification is needed to send and receive emails since sendmail has no access to the internet. Check directory /var/spool/mail to see who received emails so far. I would guess only "root". You will see a file with username as name of file, if that user received emails. There is no need for any passwords to see the emails and I am sure, no passwords was ever configured.

As to where to start, take a look at the CentOS 5 documentation https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-email-mta.html

I hope to have answered all your questions.


I'm a bit late to this post. But I would like to provide a bit more explanation to the people getting here.

You can check which MTA (mail transfer agent) is running on your server using sudo netstat -ntlp | grep ':25' Don't forget sudo or you might not see the name of the program/pid.

For most people, you are probably using postfix. So, try > sudo postfix status You should see something like this postfix/postfix-script: the Postfix mail system is running: PID: 91245

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.