mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.55k stars 100 forks source link

Feature Request: option for server admin to receive copies of delivery failed messages> #73

Open x8x opened 1 year ago

x8x commented 1 year ago

I have this issue with reputation IP, in this case the evil actor is https://www.proofpoint.com/ . I had a couple of these issues from different "private" lists, some are more responsive than others, some do not respond at all when notified.. It would be very helpful as administrator to have an option to receive delivery failed messages so that this errors can be proactively looked after before users getting bothered. Ideally a folder like "DMARK" and "TLSRPT" named maybe "SMTPRPT" ?

mjl- commented 12 months ago

What kind of delivery failures are these? Is proofpoint immediately responding with a permanent failure, so the user immediately gets a message back that delivery has failed? Or are they sending temporary errors, so the user gets a notification about delay, and later a message that mox is giving up?

Have you noticed your IP in any blocklist? Or is it only proofpoint with this behaviour?

Failed delivery attempts, both successful and failed, are tracked in a prometheus metric. You could set up more alerting on that metric. This is an example for temporary failures after the 3rd attempt: https://github.com/mjl-/mox/blob/main/prometheus.rules#L16 But you could also check for result="permerror". See https://github.com/mjl-/mox/blob/main/queue/queue.go#L58