--- /dev/null
+<?php
+/**
+ * Table Definition for core_notify_sender_blacklist
+ */
+class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
+
+class Pman_Core_DataObjects_Core_notify_sender_blacklist extends DB_DataObject
+{
+ ###START_AUTOCODE
+ /* the code below is auto generated do not remove the above tag */
+
+ public $__table = 'core_notify_sender_blacklist'; // table name
+ public $id; // int(11) not_null primary_key auto_increment
+ public $sender_id;
+ public $domain_id;
+ public $error_msg;
+ public $added_dt;
+
+ function messageIsBlacklisted($err)
+ {
+ $match = array(
+ 'BLOCK-SEND-ER'
+ );
+ foreach($match as $str) {
+ if (strpos($err, $str) !== false) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // delete blacklists older than 1 week (and try again)
+ function prune()
+ {
+ $this->query("
+ DELETE FROM {$this->tableName()} where added_dt < NOW() - INTERVAL 1 WEEK
+ ");
+
+ }
+
+}
\ No newline at end of file
$this->errorHandler("config Mail[helo] is not set");
}
-
+ $email = DB_DataObject::factory('core_notify_sender')->filterEmail($email, $w);
+
foreach($mxs as $mx) {
}
+
+
$res = $mailer->send($p->email, $email['headers'], $email['body']);
if (is_object($res)) {
$errmsg= $res->userinfo['smtpcode'] . ':' . $res->userinfo['smtptext'];
}
- if ($res->userinfo['smtpcode'] == 550) {
+ if ( $res->userinfo['smtpcode']> 500 ) {
+
+ DB_DataObject::factory('core_notify_sender')->checkSmtpResponse($email, $w, $errmsg);
+
+
if ($this->server->checkSmtpResponse($errmsg, $core_domain)) {
$ev = $this->addEvent('NOTIFY', $w, 'BLACKLISTED - ' . $errmsg);
$this->server->updateNotifyToNextServer($w, $retry_when,true);