diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 3fa7aa4a..4badcfc1 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -362,6 +362,7 @@ func TestLoadMixed(t *testing.T) { "DIUN_NOTIF_MAIL_INSECURESKIPVERIFY=true", "DIUN_NOTIF_MAIL_FROM=diun@foo.com", "DIUN_NOTIF_MAIL_TO=webmaster@foo.com", + "DIUN_NOTIF_MAIL_LOCALNAME=foo.com", }, expected: &config.Config{ Db: (&model.Db{}).GetDefaults(), @@ -372,7 +373,7 @@ func TestLoadMixed(t *testing.T) { Port: 25, SSL: utl.NewFalse(), InsecureSkipVerify: utl.NewTrue(), - LocalName: "localhost", + LocalName: "foo.com", From: "diun@foo.com", To: "webmaster@foo.com", }, diff --git a/internal/notif/mail/client.go b/internal/notif/mail/client.go index f0445b56..cb57889d 100644 --- a/internal/notif/mail/client.go +++ b/internal/notif/mail/client.go @@ -135,6 +135,7 @@ Need help, or have questions? Go to https://github.com/crazy-max/diun and leave Password: password, SSL: *c.cfg.SSL, TLSConfig: tlsConfig, + LocalName: c.cfg.LocalName, } return dialer.DialAndSend(msg)