Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

fix: retain POP bounce headers with unsupported charsets (#3273)

Christopher Reimer11d79062225c
diff --git a/internal/bounce/mailbox/pop.go b/internal/bounce/mailbox/pop.go
index c1715093..d38fa6cb 100644
--- a/internal/bounce/mailbox/pop.go
+++ b/internal/bounce/mailbox/pop.go
@@ -116,7 +116,7 @@ func (p *POP) Scan(limit int, ch chan models.Bounce) error {
// Parse the message.
m, err := message.Read(b)
- if err != nil {
+ if err != nil && !message.IsUnknownCharset(err) {
p.lo.Printf("error parsing bounce message %d: %v", id, err)
continue
}
@@ -129,7 +129,7 @@ func (p *POP) Scan(limit int, ch chan models.Bounce) error {
part, err := mr.NextPart()
if err == io.EOF {
break
- } else if err != nil {
+ } else if err != nil && !message.IsUnknownCharset(err) {
p.lo.Printf("error reading multipart bounce message %d: %v", id, err)
continue
}