| 1 |
rspamd_config:register_symbol({ |
| 2 |
name = 'EXPRESSIONS_B', |
| 3 |
score = 1.0, |
| 4 |
callback = function() |
| 5 |
return true, 'Fires always' |
| 6 |
end |
| 7 |
}) |
| 8 |
|
| 9 |
rspamd_config:register_symbol({ |
| 10 |
name = 'POLICY_REMOVE_WEIGHT_A', |
| 11 |
score = 1.0, |
| 12 |
callback = function() |
| 13 |
return true, 'Fires always' |
| 14 |
end |
| 15 |
}) |
| 16 |
rspamd_config:register_symbol({ |
| 17 |
name = 'POLICY_REMOVE_WEIGHT_B', |
| 18 |
score = 1.0, |
| 19 |
callback = function() |
| 20 |
return true, 'Fires always' |
| 21 |
end |
| 22 |
}) |
| 23 |
rspamd_config:register_symbol({ |
| 24 |
name = 'POLICY_FORCE_REMOVE_A', |
| 25 |
score = 1.0, |
| 26 |
callback = function() |
| 27 |
return true, 'Fires always' |
| 28 |
end |
| 29 |
}) |
| 30 |
rspamd_config:register_symbol({ |
| 31 |
name = 'POLICY_FORCE_REMOVE_B', |
| 32 |
score = 1.0, |
| 33 |
callback = function() |
| 34 |
return true, 'Fires always' |
| 35 |
end |
| 36 |
}) |
| 37 |
rspamd_config:register_symbol({ |
| 38 |
name = 'POLICY_LEAVE_A', |
| 39 |
score = 1.0, |
| 40 |
callback = function() |
| 41 |
return true, 'Fires always' |
| 42 |
end |
| 43 |
}) |
| 44 |
rspamd_config:register_symbol({ |
| 45 |
name = 'POLICY_LEAVE_B', |
| 46 |
score = 1.0, |
| 47 |
callback = function() |
| 48 |
return true, 'Fires always' |
| 49 |
end |
| 50 |
}) |
| 51 |
|
| 52 |
rspamd_config:register_symbol({ |
| 53 |
name = 'DEFAULT_POLICY_REMOVE_WEIGHT_A', |
| 54 |
score = 1.0, |
| 55 |
callback = function() |
| 56 |
return true, 'Fires always' |
| 57 |
end |
| 58 |
}) |
| 59 |
rspamd_config:register_symbol({ |
| 60 |
name = 'DEFAULT_POLICY_REMOVE_WEIGHT_B', |
| 61 |
score = 1.0, |
| 62 |
callback = function() |
| 63 |
return true, 'Fires always' |
| 64 |
end |
| 65 |
}) |
| 66 |
rspamd_config:register_symbol({ |
| 67 |
name = 'DEFAULT_POLICY_REMOVE_SYMBOL_A', |
| 68 |
score = 1.0, |
| 69 |
callback = function() |
| 70 |
return true, 'Fires always' |
| 71 |
end |
| 72 |
}) |
| 73 |
rspamd_config:register_symbol({ |
| 74 |
name = 'DEFAULT_POLICY_REMOVE_SYMBOL_B', |
| 75 |
score = 1.0, |
| 76 |
callback = function() |
| 77 |
return true, 'Fires always' |
| 78 |
end |
| 79 |
}) |
| 80 |
rspamd_config:register_symbol({ |
| 81 |
name = 'DEFAULT_POLICY_LEAVE_A', |
| 82 |
score = 1.0, |
| 83 |
callback = function() |
| 84 |
return true, 'Fires always' |
| 85 |
end |
| 86 |
}) |
| 87 |
rspamd_config:register_symbol({ |
| 88 |
name = 'DEFAULT_POLICY_LEAVE_B', |
| 89 |
score = 1.0, |
| 90 |
callback = function() |
| 91 |
return true, 'Fires always' |
| 92 |
end |
| 93 |
}) |
| 94 |
|
| 95 |
rspamd_config:register_symbol({ |
| 96 |
name = 'POSITIVE_A', |
| 97 |
score = -1.0, |
| 98 |
group = "positive", |
| 99 |
callback = function() |
| 100 |
return true, 'Fires always' |
| 101 |
end |
| 102 |
}) |
| 103 |
rspamd_config:register_symbol({ |
| 104 |
name = 'NEGATIVE_A', |
| 105 |
score = -1.0, |
| 106 |
group = "negative", |
| 107 |
callback = function() |
| 108 |
return true, 'Fires always' |
| 109 |
end |
| 110 |
}) |
| 111 |
rspamd_config:register_symbol({ |
| 112 |
name = 'NEGATIVE_B', |
| 113 |
score = 1.0, |
| 114 |
group = "negative", |
| 115 |
callback = function() |
| 116 |
return true, 'Fires always' |
| 117 |
end |
| 118 |
}) |
| 119 |
rspamd_config:register_symbol({ |
| 120 |
name = 'ANY_A', |
| 121 |
score = -1.0, |
| 122 |
group = "any", |
| 123 |
callback = function() |
| 124 |
return true, 'Fires always' |
| 125 |
end |
| 126 |
}) |
| 127 |
|
| 128 |
rspamd_config:register_symbol({ |
| 129 |
name = 'OPTS', |
| 130 |
score = -1.0, |
| 131 |
group = "any", |
| 132 |
callback = function(task) |
| 133 |
local lua_util = require "lua_util" |
| 134 |
local woot = lua_util.str_split(tostring(task:get_request_header('opts') or ''), ',') |
| 135 |
|
| 136 |
if woot and #woot > 0 and #woot[1] > 0 then |
| 137 |
return true, 1.0, woot |
| 138 |
end |
| 139 |
end |
| 140 |
}) |