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?

  • try sonmething like netstat -nlp | grep 80 to find pid of process using port – gwillie Jul 26 '15 at 23:09
  • The answer here seems to be pretty helpful (and suggests the same thing, among other stuff): serverfault.com/questions/524498/… – B T Jul 26 '15 at 23:11
  • Looks like the thing that's using the port is: /usr/libexec/postfix/master - what is that? – B T Jul 26 '15 at 23:11
  • 2
    /usr/libexec/postfix/master is the main component of postfix which runs in the background as a daemon – gwillie Jul 26 '15 at 23:15

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.

| improve this answer | |
  • What happens in those situations if you don't provide a replacement? – B T Jul 26 '15 at 23:21
  • @BT System-generated mail will accumulate in a file called dead.letter in root's home directory. – Michael Hampton Jul 26 '15 at 23:24
  • 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. – Tilman Schmidt Jul 26 '15 at 23:30

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.