let's just say http 400 is okie dokie

This commit is contained in:
Ted Unangst 2023-07-27 20:51:19 -04:00
parent c19490a802
commit fde9187832
1 changed files with 12 additions and 0 deletions

View File

@ -69,6 +69,14 @@ func lethaldose(err error) int64 {
return 0 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 var dqmtx sync.Mutex
func delinquent(userid int64, rcpt string, msg []byte) bool { func delinquent(userid int64, rcpt string, msg []byte) bool {
@ -144,6 +152,10 @@ func deliveration(doover Doover) {
if t := lethaldose(err); t > doover.Tries { if t := lethaldose(err); t > doover.Tries {
doover.Tries = t doover.Tries = t
} }
if letitslide(err) {
dlog.Printf("whatever myever %s", inbox)
continue
}
doover.Msgs = doover.Msgs[i:] doover.Msgs = doover.Msgs[i:]
sayitagain(doover) sayitagain(doover)
return return