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: Connection could not be established with host 127.0.0.1 :stream_socket_client(): Unable to connect to tcp://127.0.0.1:1025 (Connection refused)) #72

Open
daburger opened this issue Dec 16, 2022 · 5 comments

Comments

@daburger
Copy link

When I saw this docker, I was over the moon and had to get it so I could use it with Nextcloud to send emails for password resets etc. Anyway, I followed the steps in unraid and was successful on the most part, but I did get a warning/error once I signed in and got my IMAP and SMTP settings:

Adding account …
WARN[Dec 16 03:37:41.670] Problem to load store events error=”open /root/.config/protonmail/bridge/cache/c11/user_info.json: no such file or directory” pkg=store

Nevertheless, I restarted the dock and tried again but didn't see it pop up a 2nd time. It showed I was logged in and so i then used the INFO command and got my smtp settings: 127.0.0.1 and port 1025, along with the special credentials. I added everything into nextcloud, but I am now getting the following error:

“A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host 127.0.0.1 :stream_socket_client(): Unable to connect to 127.0.0.1:1025 (Connection refused))”

I tried researching but no luck. I am not very skilled with unraid, 99% of what I have done is all by tutorials and reading comments for workarounds etc. For this, I struggled to find much on.

Any ideas?

@danietech
Copy link

Hi
you have opened a new thread, just a suggestion, find my user is the original thread, it has a walk-through of my steps, I am new to all this geeky stuff myself but I have managed to get it working, take what I say with a pinch of salt,

First things first you look like you have not allowed the ports as in port forwarding, hence the connection refusal, also a heads up I used the Unraid IP address not the host, this is a pain and I can't explain why, I am sure more advance UNRAID user many take the time to explain this.

One more thing, the free Proton-mail sign-ups cannot use the SMTP relay, if you were not aware.

ok good luck

@twaananen
Copy link

I just solved this exact thing for myself, so here is how you do it with Nextcloud.

  1. Clone this repo.
  2. Add line sed -i 's/127.0.0.1/0.0.0.0/g' internal/constants/constants.go into build/build.sh like this PR. This makes it allow connections from everywhere, not just 127.0.0.1.
  3. Build your own image from there and use that.
  4. Finally, you have to add this to your Nextcloud config.php:
  'mail_smtpstreamoptions' => 
  array (
    'ssl' => 
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),

@Just-Insane
Copy link

Just-Insane commented Mar 13, 2023

Were you able to get this working? I didn't re-build the container to remove the localhost restriction (SOCAT should take care of that), but I did implement your changes to Nextcloud's config.php. When trying to connect I get an error message cannot upgrade connection: local error: tls: bad record MAC protocol=IMAP. I will try rebuilding the image this afternoon...

@daburger
Copy link
Author

daburger commented Mar 13, 2023

Hi you have opened a new thread, just a suggestion, find my user is the original thread, it has a walk-through of my steps, I am new to all this geeky stuff myself but I have managed to get it working, take what I say with a pinch of salt,

First things first you look like you have not allowed the ports as in port forwarding, hence the connection refusal, also a heads up I used the Unraid IP address not the host, this is a pain and I can't explain why, I am sure more advance UNRAID user many take the time to explain this.

One more thing, the free Proton-mail sign-ups cannot use the SMTP relay, if you were not aware.

ok good luck

I'm not using the free account, but I will try your suggestion and the others as well. I am using a reverse proxy manager, so everything gets passed through there, however, before that, I did have the ports forward and open but didn't seem to help. I ended up just using Gmail in the end as it was just quicker to sort out what I needed there and then. If time permits, I will come back to this. Thanks!

@blwh
Copy link

blwh commented Feb 1, 2024

Was there any solution to this? I just came across the same error trying to setup the bridge for Nextcloud. Adding the options for smtpstreamoptions did not help either.

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

5 participants