Skip already handled incoming emails

It seems like (at least on my machine) that every mail is processed
twice. Added a check if the email is already handled and if so, skip it.
This commit is contained in:
Beowulf 2024-04-28 14:11:17 +02:00
parent 162b840100
commit b796694cd5
No known key found for this signature in database
GPG key ID: 44225F5F2792841D

View file

@ -219,6 +219,11 @@ loop:
}
err := func() error {
if handledSet.Contains(msg.SeqNum) {
log.Debug("Skipping already handled message")
return nil
}
r := msg.GetBody(section)
if r == nil {
return fmt.Errorf("could not get body from message: %w", err)