Add message-{size|delay}-limit

This commit is contained in:
binwiederhier
2024-03-07 11:53:12 -05:00
parent 17709f2fb7
commit 36b33030f3
12 changed files with 210 additions and 90 deletions

View File

@@ -150,8 +150,8 @@ func (s *smtpSession) Data(r io.Reader) error {
return err
}
body = strings.TrimSpace(body)
if len(body) > conf.MessageLimit {
body = body[:conf.MessageLimit]
if len(body) > conf.MessageSizeLimit {
body = body[:conf.MessageSizeLimit]
}
m := newDefaultMessage(s.topic, body)
subject := strings.TrimSpace(msg.Header.Get("Subject"))