check/milter: Linter warnings

Unused variable and missing error check.
This commit is contained in:
fox.cpp 2020-05-04 15:59:13 +03:00
parent 503b558643
commit 08f98f15d9
No known key found for this signature in database
GPG key ID: 5B991F6215D2FCC0
2 changed files with 4 additions and 2 deletions

1
go.sum
View file

@ -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=

View file

@ -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 {