added test for reading inline attachments

This commit is contained in:
Beowulf 2024-04-28 21:24:46 +02:00
parent b796694cd5
commit aeb544aff7
No known key found for this signature in database
GPG key ID: 44225F5F2792841D
2 changed files with 46 additions and 1 deletions

View file

@ -219,7 +219,7 @@ loop:
}
err := func() error {
if handledSet.Contains(msg.SeqNum) {
if isAlreadyHandled(handledSet, msg) {
log.Debug("Skipping already handled message")
return nil
}
@ -282,6 +282,11 @@ loop:
return nil
}
// isAlreadyHandled tests if the message was already handled
func isAlreadyHandled(handledSet *imap.SeqSet, msg *imap.Message) bool {
return handledSet.Contains(msg.SeqNum)
}
// isAutomaticReply tests if the headers indicate an automatic reply
func isAutomaticReply(env *enmime.Envelope) bool {
autoSubmitted := env.GetHeader("Auto-Submitted")