fix #8131 - chinese translations
[Pman.Core] / DataObjects / Core_notify_blacklist.php
1 <?php
2 /**
3  * Table Definition for core_notify_blacklist
4  */
5 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
6
7 class Pman_Core_DataObjects_Core_notify_blacklist extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'core_notify_blacklist';    // table name
13     public $id;                              // int(11)  not_null primary_key auto_increment
14     public $server_id;
15     public $domain_id;
16     public $error_msg;
17     public $added_dt;
18     
19     
20     function messageIsBlacklisted($err)
21     {
22         $match = array(
23             '5.7.0 DT:SPM', // 163.com
24             '5.7.1 H:DYNB', // some other black list
25             'on our block list',  // live.com
26             'spameatingmonkey.net', // spameatingmonkey.net (users)
27             'sender is listed on the block', // korian?
28             'proofpoint.com', // another spam detecotr
29             'cloud-security.net', // another spam protector..
30             'spam complain',
31             'ANTISPAM',
32             'probability of spam',
33             'block list by spam', // spamhaus
34             'blocked using Spamhaus',
35             'spamhaus.org',  // www zen rbl...
36             'detected as Spam',
37             'poor reputation',
38             'AntiSpam',
39             'ip address in rbl',
40             'blacklisted',
41             'spamauditor.org',
42             'detect spam',
43             'message as spam',
44             'DNSBL:RBL',
45             'SpamHaus SBL-XBL',
46             'blocked by sbl-xbl.spam',
47             'Sophos Anti Spam Engine',
48             'spam filters',
49             'JunkMail',
50             'block list',
51             'Cloudmark Sender Intelligence',
52             'Blocked by CSI',
53             
54             
55         );
56         foreach($match as $str) {
57             if (strpos($err, $str) !== false) {
58                 return true;
59             }
60         }
61         return false;
62     }
63     
64     // delete blacklists older than 1 week (and try again)
65     function prune()
66     {
67         $this->query("
68             DELETE FROM {$this->tableName()} where added_dt < NOW()  - INTERVAL 1 WEEK
69         ");
70             
71     }
72     
73 }