Skip to content

Commit

Permalink
endpoint/smtp: Add missing msg_id for 'RCPT error' message
Browse files Browse the repository at this point in the history
  • Loading branch information
foxcpp committed Jul 19, 2020
1 parent 78f7713 commit 20fe5ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/endpoint/smtp/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (s *Session) Rcpt(to string) error {

if err := s.rcpt(rcptCtx, to); err != nil {
if s.loggedRcptErrors < s.endp.maxLoggedRcptErrors {
s.log.Error("RCPT error", err, "rcpt", to)
s.log.Error("RCPT error", err, "rcpt", to, "msg_id", s.msgMeta.ID)
s.loggedRcptErrors++
if s.loggedRcptErrors == s.endp.maxLoggedRcptErrors {
s.log.Msg("too many RCPT errors, possible dictonary attack", "src_ip", s.connState.RemoteAddr, "msg_id", s.msgMeta.ID)
Expand Down

0 comments on commit 20fe5ad

Please sign in to comment.