What might be using my smtp port on a new CentOS machine?

6,719

CentOS 6 default installation sets up Postfix listening on localhost. You can disable it with chkconfig or uninstall it with yum, but you need to provide a replacement as the system needs a way to send mail to an administrator in various situations.

Share:
6,719

Related videos on Youtube

B T
Author by

B T

Updated on September 18, 2022

Comments

  • B T
    B T over 1 year

    I'm trying to setup a simple email server using node smtp-server. I'm the only one that's ever accessed the machine (a CentOS 6.5 box on Digital Ocean), and I've only set up 2 http servers. I'm getting the error "EADDRINUSE" when I try to listen on port 25.

    lsof | grep smtp gives me:

    master      955    root   12u     IPv4               8103       0t0        TCP localhost:smtp (LISTEN)
    master      955    root   13u     IPv6               8105       0t0        TCP localhost:smtp (LISTEN)
    master      955    root   53u     unix 0xffff88003a91c380       0t0       8155 private/smtp
    

    What might be using port 25, and how can I disable it?

    • gwillie
      gwillie almost 9 years
      try sonmething like netstat -nlp | grep 80 to find pid of process using port
    • B T
      B T almost 9 years
      The answer here seems to be pretty helpful (and suggests the same thing, among other stuff): serverfault.com/questions/524498/…
    • B T
      B T almost 9 years
      Looks like the thing that's using the port is: /usr/libexec/postfix/master - what is that?
    • gwillie
      gwillie almost 9 years
      /usr/libexec/postfix/master is the main component of postfix which runs in the background as a daemon
  • B T
    B T almost 9 years
    What happens in those situations if you don't provide a replacement?
  • Michael Hampton
    Michael Hampton almost 9 years
    @BT System-generated mail will accumulate in a file called dead.letter in root's home directory.
  • Tilman Schmidt
    Tilman Schmidt almost 9 years
    Either that, or (if no sendmail binary can be found) the mail will be lost altogether. The generating program may or may not log a message somewhere. Badly written programs may even fail, although that should be the rare exception. But in any case, possibly vital information for the continued operation of the machine will be lost.