Skip to content

Configure SMTP Relay Hostname #179

@nlowe

Description

@nlowe

I'm trying to deploy a copy of asciinema-server in a kubernetes cluster. I already have a functioning SMTP relay outside of kubernetes that I want to use. However, I can't seem to change the relay host. When I try to sign up, I get the following error:

22:54:53.597 [error] Error in process #PID<0.2618.0> on node :"asciinema@127.0.0.1" with exit value:
{%Bamboo.SMTPAdapter.SMTPError{message: "There was a problem sending the email through SMTP.\n\nThe error is :retries_exceeded\n\nMore detail below:\n\n{:network_failure, 'smtp', {:error, :nxdomain}}\n", raw: {:retries_exceeded, {:network_failure, 'smtp', {:error, :nxdomain}}}}, [{Bamboo.SMTPAdapter, :handle_response, 1, [file: 'lib/bamboo/adapters/smtp_adapter.ex', line: 92]}, {Exq.Worker.Server, :"-dispatch_work/3-fun-0-", 4, [file: 'lib/exq/worker/server.ex', line: 141]}]}

22:54:53.599 [info] {%Bamboo.SMTPAdapter.SMTPError{
   message: "There was a problem sending the email through SMTP.\n\nThe error is :retries_exceeded\n\nMore detail below:\n\n{:network_failure, 'smtp', {:error, :nxdomain}}\n",
   raw: {:retries_exceeded, {:network_failure, 'smtp', {:error, :nxdomain}}}
 },
 [
   {Bamboo.SMTPAdapter, :handle_response, 1,
    [file: 'lib/bamboo/adapters/smtp_adapter.ex', line: 92]},
   {Exq.Worker.Server, :"-dispatch_work/3-fun-0-", 4,
    [file: 'lib/exq/worker/server.ex', line: 141]}
 ]}

I've tried setting MAILNAME to the hostname of my relay. I've tried mounting /opt/app/etc/custom.exs with the following contents:

use Mix.Config

config :asciinema, Asciinema.Mailer,
   deliver_later_strategy: Asciinema.BambooExqStrategy,
   adapter: Bamboo.SMTPAdapter,
   server: "relay.mydomain.net",
   port: 25

I've verified that relay.mydomain.net is resolvable from inside the container. Is there a setting I'm missing? I'm trying to avoid deploying a relay for the relay, and even if I had to I don't really like hard-coding the kubernetes service name to smtp, which is what appears to be required by looking at the docker-compose file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions