Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a command to tell me what MTA/sendmail a unix system uses?

Thanks very much

share|improve this question
    
Are you actually on the mail server, or are you trying to figure it out remotely? –  cjc Sep 21 '12 at 12:29
add comment

1 Answer

up vote 3 down vote accepted
[root@dev ~]# netstat -tlnp |grep :25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1614/sendmail  

or

[root@dev ~]#  lsof -n -i :25
COMMAND   PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
sendmail 1614 root    4u  IPv4 1413591375      0t0  TCP 127.0.0.1:smtp (LISTEN)

That should do the trick.

If you can't access the server, telnet to port 25 on it, most servers will tell you.

[bart@dev ~]$ telnet mail.gandi.net 25
Trying 217.70.184.11...
Connected to mail.gandi.net.
Escape character is '^]'.
220 relay4-d.mail.gandi.net ESMTP Postfix
share|improve this answer
    
tried the first way and it just says "master" not "sendmail" –  Alex Sep 21 '12 at 12:47
    
And what doe the other options tell you? –  Bart De Vos Sep 21 '12 at 12:58
    
ah crap, I closed it now, i found out via google that 'master' is postfix –  Alex Sep 21 '12 at 13:03
    
@Alex, if you look at the /proc filesystem, you can see the command line for "master". For example, if the PID of master is 2804, then cat /proc/2804/cmdline shows /usr/libexec/postfix/master. This saves the googling, and makes the identification with postfix unambiguous. –  cjc Sep 21 '12 at 13:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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