Beispiel #1
0
        $end_of_headers = strpos($raw_mail, "\n\n");
    }
    $x_spam_flag = '';
    if (preg_match('/^X-Spam-Flag: ([a-zA-Z]+), tests=bogofilter/m', substr($raw_mail, 0, $end_of_headers + 1), $matches)) {
        $x_spam_flag = $matches[1];
    }
    if ($x_spam_flag == 'Unsure') {
        $mailer = new PlMailer();
        $mailer->addTo($type . '@' . $globals->mail->domain);
        $mailer->setFrom('"' . $fullname . '" <web@' . $globals->mail->domain . '>');
        $mailer->setTxtBody($type . ' soumis par ' . $fullname . ' via la modération de la liste ' . $list . '@' . $domain);
        $mailer->addAttachment($raw_mail, 'message/rfc822', $type . '.mail', false);
        $mailer->send();
    }
    // send feedback to the mailing list owners
    if ($mlist->handleRequest($action, $mid, $reason)) {
        $sent_mails += $count;
        $texte = "Le message suivant :\n\n" . "    Auteur: {$mail['sender']}\n" . "    Sujet : « {$mail['subj']} »\n" . "    Date  : " . strftime("le %d %b %Y à %H:%M:%S", (int) $mail['stamp']) . "\n\n" . $append;
        $mailer = new PlMailer();
        $mailer->addTo("{$list}-owner@{$domain}");
        $mailer->setFrom("{$list}-bounces@{$domain}");
        $mailer->addHeader('Reply-To', "{$list}-owner@{$domain}");
        $mailer->setSubject($subject);
        $mailer->setTxtBody($texte);
        $mailer->send();
    }
    // release the lock
    XDB::execute('DELETE FROM  email_list_moderate
                        WHERE  handler = {?}', $handler);
    sleep(60 * $count / $globals->lists->max_mail_per_min);
}