コード例 #1
0
ファイル: userlib.php プロジェクト: narareddy/phplist3
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);
}
コード例 #2
0
ファイル: processbounces.php プロジェクト: narareddy/phplist3
                 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++;
コード例 #3
0
ファイル: blacklistemail.php プロジェクト: narareddy/phplist3
$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;
コード例 #4
0
ファイル: userlib.php プロジェクト: kvervo/phplist-aiesec
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);
}