portier / portier-broker

Portier Broker reference implementation, written in Rust
http://portier.github.io/
Apache License 2.0
553 stars 17 forks source link

smtp mode not sending mails when using sendgrid as relay #853

Open onli opened 4 months ago

onli commented 4 months ago

In the config.toml I have this, which is confirmed to be the correct smtp login data:

smtp_server = "smtp.sendgrid.net:587"
smtp_username = "apikey"
smtp_password = "snip"

This fails with this error when trying to log in:

Mar 08 01:19:30 user portier-broker[2735798]: ERROR  Could not send mail: Connection error: failed to lookup address information: Try again
Mar 08 01:19:30 user portier-broker[2735798]: ERROR  [REF:jjp89h] Failed to send mail

The code looks like it should split the server url and port correctly, and the domain is reachable, so the error is quiet confusing.

This might like https://github.com/portier/portier-broker/issues/852 be a systemd issue, to be confirmed.

stephank commented 3 months ago

Strange that lookup fails. Are you using systemd-resolved? I've been experimenting with that recently, and have seen some weird resolution failures, but unsure where those are coming from.