Exemplo n.º 1
0
function addUserToBlackListID($id, $reason = '')
{
    Sql_Query(sprintf('update %s set blacklisted = 1 where id = %s', $GLOBALS['tables']["user"], $id));
    #0012262: blacklist only email when email bounces. (not users): Function split so email can be blacklisted without blacklisting user
    $email = Sql_Fetch_Row_Query("select email from {$GLOBALS["tables"]["user"]} where id = {$id}");
    addEmailToBlackList($email[0], $reason);
}
Exemplo n.º 2
0
                 if (!$unsubscribed) {
                     outputProcessBounce(sprintf('unsubscribing %d -> %d bounces', $user[0], $cnt));
                     $userurl = PageLink2("user&id={$user['0']}", $user[0]);
                     logEvent(s('User (url:%s) has consecutive bounces (%d) over threshold (%d), user marked unconfirmed', $userurl, $cnt, $bounce_unsubscribe_threshold));
                     $emailreq = Sql_Fetch_Row_Query("select email from {$tables["user"]} where id = {$user['0']}");
                     addUserHistory($emailreq[0], s('Auto Unconfirmed'), s('Subscriber auto unconfirmed for %d consecutive bounces', $cnt));
                     Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', $tables["user"], $user[0]));
                     $email_req = Sql_Fetch_Row_Query(sprintf('select email from %s where id = %d', $tables["user"], $user[0]));
                     $unsubscribed_users .= $email_req[0] . "\t\t({$cnt})\t\t" . $GLOBALS['scheme'] . '://' . getConfig('website') . $GLOBALS['adminpages'] . '/?page=user&id=' . $user[0] . "\n";
                     $unsubscribed = 1;
                 }
                 if (BLACKLIST_EMAIL_ON_BOUNCE && $cnt >= BLACKLIST_EMAIL_ON_BOUNCE) {
                     $removed = 1;
                     #0012262: blacklist email when email bounces
                     cl_output(s('%d consecutive bounces, threshold reached, blacklisting subscriber', $cnt));
                     addEmailToBlackList($emailreq[0], s('%d consecutive bounces, threshold reached', $cnt));
                 }
             }
         } elseif ($bounce["bounce"] == "") {
             #$cnt = 0; DT 051105
             $cnt = 0;
             $msgokay = 1;
             #DT 051105 - escaping loop if message received okay
         }
     }
 }
 if ($usercnt % 5 == 0) {
     #    outputProcessBounce($GLOBALS['I18N']->get("Identifying consecutive bounces"));
     cl_progress(s('processed %d out of %d subscribers', $usercnt, $total), 1);
 }
 $usercnt++;
Exemplo n.º 3
0
$email = $date = $uid = '';
if (isset($cline['e'])) {
    $email = $cline['e'];
}
if (isset($cline['u'])) {
    $uid = $cline['u'];
}
if (isset($cline['d'])) {
    $date = $cline['d'];
}
$emailQ = Sql_Fetch_Row_Query(sprintf('select email from %s where uniqid = "%s" or email = "%s"  order by email desc', $GLOBALS['tables']['user'], sql_escape($uid), sql_escape($email)));
$emailDB = $emailQ[0];
if (empty($emailDB) && empty($email)) {
    cl_output('FAIL');
    exit;
}
if (isBlackListed($emailDB)) {
    ## do this anyway, just to be sure
    Sql_Query(sprintf('update %s set blacklisted = 1 where email = "%s"', $GLOBALS['tables']['user'], $emailDB));
    cl_output('OK');
    exit;
}
if (!empty($emailDB)) {
    ## do this immediately
    Sql_Query(sprintf('update %s set blacklisted = 1 where email = "%s"', $GLOBALS['tables']['user'], $emailDB));
    addEmailToBlackList($emailDB, 'blacklisted due to spam complaints', $date);
} else {
    addEmailToBlackList($email, 'blacklisted due to spam complaints', $date);
}
cl_output('OK ' . $emailDB);
exit;
Exemplo n.º 4
0
function addUserToBlackList($email, $reason = '')
{
    Sql_Query(sprintf('update %s set blacklisted = 1 where email = "%s"', $GLOBALS['tables']["user"], addslashes($email)));
    #0012262: blacklist only email when email bounces. (not users): Function split so email can be blacklisted without blacklisting user
    addEmailToBlackList($email, $reason);
}