From b79b96c21639cf91aa596de6d5ce8c5df49f0e92 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 6 Apr 2011 23:53:57 +0800 Subject: [PATCH] NotifySend.php --- NotifySend.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NotifySend.php b/NotifySend.php index 47c66683..37d1633f 100644 --- a/NotifySend.php +++ b/NotifySend.php @@ -102,7 +102,7 @@ class Pman_Core_NotifySend extends Pman continue; // try next mx... ??? should we wait??? - nope we did not even connect.. } // give up after 2 days.. - if ($code == 451 || $next_try_min > (2*24*60)) { + if ($code == 451 && $next_try_min < (2*24*60)) { // try again later.. // check last event for this item.. $this->addEvent('NOTIFY', $w, 'GREYLISTED'); @@ -110,7 +110,11 @@ class Pman_Core_NotifySend extends Pman $w->update($ww); die("GREYLISTED"); } - // fail.. = log and give up.. + $fail = true; + break; + } + if ($fail || $next_try_min > (2*24*60)) { + // fail.. = log and give up.. $id = $this->addEvent('NOTIFY', $w, 'FAILED - '. $res->toString()); $w->sent = date('Y-m-d H:i:s'); $w->msgid = ''; -- 2.39.2