#3739·pangolin

Unable to use email authentication for Public resource

Author: matuspetrikCreated Sep 14, 2026Updated Sep 14, 2026

Describe the Bug

Running in docker compose on VPS.

Email smtp-relay set up correctly, I have

email:
  enabled: true
  provider: smtp
  no_reply: "[email protected]"
  from: "[email protected]"
  smtp:
    host: "smtp-relay.brevo.com"
    port: 587
    user: "[email protected]"
    pass: "asdfasdfsafd"
    secure: false

in my config/config.yml (user and pass omitted).

I have tested with following script on in Pangolin docker container:

python3 - <<'PY'
import smtplib

server = smtplib.SMTP("smtp-relay.brevo.com", 587, timeout=20)
server.set_debuglevel(1)

server.ehlo()
server.starttls()
server.ehlo()
server.login("MY_SMTP_USER", "MY_SMTP_PASS")

server.sendmail(
    "[email protected]",
    "[email protected]",
    """From: [email protected]
To: "[email protected]"
Subject: Pangolin SMTP test

Test email.
"""
)

server.quit()
print("SUCCESS")
PY

with result:

reply: retcode (250); Msg: b'Hello [172.18.0.3]\nPIPELINING\n8BITMIME\nENHANCEDSTATUSCODES\nCHUNKING\nAUTH PLAIN LOGIN CRAM-MD5\nSIZE 20971520' send: 'AUTH CRAM-MD5\r\n' reply: b'334 PDEuNjIxNjY1NjgzQFsxNzIuMTguMC4zXT4=\r\n' reply: retcode (334); Msg: b'PDEuNjIxNjY1NjgzQFsxNzIuMTguMC4zXT4=' send: 'NzdlMmIzMDAxQHNtdHAtYnJldm8uY29tIGQ3ZDQzMTQ3YjgwZmQyYmM1ODY1NTJjMjM3NzllNTBk\r\n' reply: b'235 2.0.0 Authentication succeeded\r\n' reply: retcode (235); Msg: b'2.0.0 Authentication succeeded' send: 'mail FROM:<[email protected]> size=97\r\n' reply: b'250 2.0.0 Roger, accepting mail from <[email protected]>\r\n' reply: retcode (250); Msg: b'2.0.0 Roger, accepting mail from <[email protected]>' send: 'rcpt TO:<[email protected]>\r\n' reply: b"250 2.0.0 I'll make sure <[email protected]> gets this\r\n" reply: retcode (250); Msg: b"2.0.0 I'll make sure <[email protected]> gets this" send: 'data\r\n' reply: b'354 Go ahead. End your data with <CR><LF>.<CR><LF>\r\n' reply: retcode (354); Msg: b'Go ahead. End your data with <CR><LF>.<CR><LF>' data: (354, b'Go ahead. End your data with <CR><LF>.<CR><LF>') send: b'From: [email protected]\r\nTo: [email protected]\r\nSubject: Pangolin SMTP test\r\n\r\nTest email.\r\n.\r\n' reply: b'250 2.0.0 OK: queued as <[email protected]>\r\n' reply: retcode (250); Msg: b'2.0.0 OK: queued as <[email protected]>' data: (250, b'2.0.0 OK: queued as <[email protected]>') send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' SUCCESS

but in docker compose logs still getting:

pangolin  | Making resource whitelist request to: http://localhost:3000/api/v1/auth/resource/15/whitelist
pangolin  | 2026-09-14T07:56:40+00:00 [error]: connect ECONNREFUSED ::1:587
pangolin  | Stack: Error: connect ECONNREFUSED ::1:587
pangolin  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1706:16) {"errno":-111,"code":"ESOCKET","syscall":"connect","address":"::1","port":587,"command":"CONN"}

Looks like Instead of resolving the IP of smtp-relay, it is resolving to localhost, or I am doing something wrong.

When doing curl within the container I get:

root@843bc1cfb42d:/app# curl http://localhost:3000/api/v1/auth/resource/15/whitelist
{"data":null,"success":false,"error":true,"message":"Unauthorized","status":401,"stack":null}root@843bc1cfb42d:/app# 

Environment

  • OS Type & Version: AlmaLinux 10.2 (host)
  • Pangolin Version: 1.22.2 (also 1.22.0)
  • Edition (Community or Enterprise): Community
  • Gerbil Version: 1.5.0
  • Traefik Version: v3.7
  • Newt Version: v1.16.0
  • Client Version: n/a

To Reproduce

see Bug description.

AI Disclosure

Chat GPT for troubleshooting commands, python script for sending email...

Expected Behavior

Email is sent.