From fde918783215e6f26adfc24b8e7b684de987388b Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 27 Jul 2023 20:51:19 -0400 Subject: [PATCH] let's just say http 400 is okie dokie --- deliverator.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deliverator.go b/deliverator.go index 814c2f0..6f55964 100644 --- a/deliverator.go +++ b/deliverator.go @@ -69,6 +69,14 @@ func lethaldose(err error) int64 { return 0 } +func letitslide(err error) bool { + str := err.Error() + if strings.Contains(str, "http post status: 400") { + return true + } + return false +} + var dqmtx sync.Mutex func delinquent(userid int64, rcpt string, msg []byte) bool { @@ -144,6 +152,10 @@ func deliveration(doover Doover) { if t := lethaldose(err); t > doover.Tries { doover.Tries = t } + if letitslide(err) { + dlog.Printf("whatever myever %s", inbox) + continue + } doover.Msgs = doover.Msgs[i:] sayitagain(doover) return