diff --git a/go.sum b/go.sum index a34ef8a..6ea1bea 100644 --- a/go.sum +++ b/go.sum @@ -174,6 +174,7 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18 h1:xFbv3LvlvQAmbNJFCBKRv1Ccvnh9FVsW0FX2kTWWowE= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425 h1:VvQyQJN0tSuecqgcIxMWnnfG5kSmgy9KZR9sW3W5QeA= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/check/milter/milter.go b/internal/check/milter/milter.go index 5ca80ed..8cc1dec 100644 --- a/internal/check/milter/milter.go +++ b/internal/check/milter/milter.go @@ -85,7 +85,6 @@ type state struct { session *milter.ClientSession msgMeta *module.MsgMetadata skipChecks bool - discarded bool log log.Logger } @@ -309,7 +308,9 @@ func (s *state) CheckSender(ctx context.Context, mailFrom string) module.CheckRe if s.msgMeta.Conn.AuthUser != "" { fields = append(fields, "auth_authen", s.msgMeta.Conn.AuthUser) } - s.session.Macros(milter.CodeMail, fields...) + if err := s.session.Macros(milter.CodeMail, fields...); err != nil { + return s.ioError(err) + } esmtpArgs := make([]string, 0, 2) if s.msgMeta.SMTPOpts.UTF8 {