mirror of
https://github.com/knadh/listmonk.git
synced 2025-11-08 00:37:06 +08:00
Handle Postmark spam complaints. (#2679)
The code attempts to do this by handling the `SpamComplaint` `Type` however this is sent with a `RecordType` of `SpamComplaint` rather than `Bounce` so is ignored. Accepting this additional `RecordType` solves the issue. This behaviour is described in Postmark's documentation. > Note that that spam complaints, unsubscribes/subscribes, or manual deactivations have their own webhooks and are not trigged via the Bounce webhook. > > https://postmarkapp.com/developer/webhooks/bounce-webhook https://postmarkapp.com/developer/webhooks/spam-complaint-webhook#spam-complaint-webhook-data
This commit is contained in:
parent
fb60455d10
commit
2085abefb4
1 changed files with 2 additions and 2 deletions
|
|
@ -60,8 +60,8 @@ func (p *Postmark) ProcessBounce(b []byte, c echo.Context) ([]models.Bounce, err
|
|||
return nil, fmt.Errorf("error unmarshalling postmark notification: %v", err)
|
||||
}
|
||||
|
||||
// Ignore non-bounce messages.
|
||||
if n.RecordType != "Bounce" {
|
||||
// Ignore irrelevant messages.
|
||||
if n.RecordType != "Bounce" && n.RecordType != "SpamComplaint" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue