Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: connect ECONNREFUSED 192.168.0.16:9990 #310

Closed
Tracked by #379
jethr0-1 opened this issue Jun 20, 2020 · 7 comments
Closed
Tracked by #379

Error: connect ECONNREFUSED 192.168.0.16:9990 #310

jethr0-1 opened this issue Jun 20, 2020 · 7 comments

Comments

@jethr0-1
Copy link

jethr0-1 commented Jun 20, 2020

I am trying to run an SMTP server with the following options:
maildev --ip 192.168.0.16 --outgoing-port 9990 --outgoing-host 192.168.0.16

It seems to run fine at first. Sending emails through port 1025 appears in the web interface. But when trying to relay the emails it spits out the following error:

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 192.168.0.16:9990
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
Emitted 'error' event at:
    at SMTPConnection._onError (/usr/local/lib/node_modules/maildev/node_modules/nodemailer/lib/smtp-connection/index.js:547:14)
    at Socket._socket.on.err (/usr/local/lib/node_modules/maildev/node_modules/nodemailer/lib/smtp-connection/index.js:252:18)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

And on the web interface it says "Relay failed: undefined"
Does anybody know the fix to this?

@kgeis
Copy link
Collaborator

kgeis commented Jun 20, 2020

It's saying that the connection is refused (ECONNREFUSED). What do you have running on port 9990 to receive the relayed emails?

@jethr0-1
Copy link
Author

It's saying that the connection is refused (ECONNREFUSED). What do you have running on port 9990 to receive the relayed emails?

Nothing is running on port 9990 except the --outgoing-port option set in the command

@kgeis
Copy link
Collaborator

kgeis commented Jun 20, 2020

The outgoing host/port settings are to indicate the mail server that you are relaying to. It is expecting that you have a mail server running on 192.168.0.16:9990, and because there is nothing running, the connection is refused.

@jethr0-1
Copy link
Author

Ahh I see, thank you. I will try without the outgoing port

@jethr0-1
Copy link
Author

But now when I send an email to myself through my SMTP server it doesn't show up in my inbox. Have I missed an option or argument or something?

@kgeis
Copy link
Collaborator

kgeis commented Jun 20, 2020

I'm not sure I can help, but can you rephrase that to be more clear? Does "my SMTP server" mean your instance of MailDev or another email server? Is "my inbox" in MailDev or on another server?

Can you relay without a MailDev error when you set the other server as the outgoing?

@jethr0-1
Copy link
Author

I'm not sure I can help, but can you rephrase that to be more clear? Does "my SMTP server" mean your instance of MailDev or another email server? Is "my inbox" in MailDev or on another server?

Can you relay without a MailDev error when you set the other server as the outgoing?

Sorry, there is no other server, I only have MailDev. I found out what the problem could be:
Apparently, my ISP blocks port 25 on all residential networks, meaning that it's impossible to run an SMTP server from home. I'm going to call them and inquire about getting it unblocked today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants