Skip to content

/etc/hosts entry ignored when sending mail #3020

@phagocythus

Description

@phagocythus

Description

Hello,
I have two FQDN added to my container via the "extra_hosts:" directive in my compose file.

plex.example.com
mail.example.com

When I use plex.example.com in the Plex section of the settings, it works like a charm.

When I use mail.example.com from the Notifications section of the settings, it doesn't work (read ECONNRESET).
But if I use the IP and tick the box "Allow Self-Signed Certificates" (IP is not in the certificate, so I have to check the box), the email is sent.

Version

3.2.0

Steps to Reproduce

  1. Add "extra_hosts:" to the compose and add a FQDN that points to a mail server.
  2. Use this FQDN in the Notifications section of the settings.

Screenshots

No response

Logs

Seerr logs (fake username) :

2026-05-11T18:57:13.120Z [debug][Notifications]: Sending email notification {"recipient":"random5302","type":"TEST_NOTIFICATION","subject":"Test Notification"}
2026-05-11T18:57:32.905Z [error][Notifications]: Error sending email notification {"recipient":"random5302","type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":"read ECONNRESET"}

/etc/hosts content inside the container (IPs hidden and fake FQDNs)

/app $ cat /etc/hosts
127.0.0.1      localhost
::1            localhost ip6-localhost ip6-loopback
fe00::         ip6-localnet
ff00::         ip6-mcastprefix
ff02::1        ip6-allnodes
ff02::2        ip6-allrouters
192.168.X.X    mail.example.com
192.168.X.X    plex.example.com
172.X.X.X      seerr

Ping from inside the container (IP hidden and fake FQDN)

/app $ ping mail.example.com
PING mail.example.com (192.168.X.X): 56 data bytes
64 bytes from 192.168.X.X: seq=0 ttl=42 time=0.081 ms
64 bytes from 192.168.X.X: seq=1 ttl=42 time=0.057 ms
64 bytes from 192.168.X.X: seq=2 ttl=42 time=0.074 ms
64 bytes from 192.168.X.X: seq=3 ttl=42 time=0.089 ms

Platform

desktop

Database

SQLite (default)

Device

Computer

Operating System

Windows 11

Browser

Firefox

Additional Context

No response

Search Existing Issues

  • Yes, I have searched existing issues.

Code of Conduct

  • I agree to follow Seerr's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThis bug has been reproduced

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions