[Web] Update composer libs
- Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8)
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
-- Thanks to https://raw.githubusercontent.com/fatalbanana
|
||||
|
||||
local lua_maps = require 'lua_maps'
|
||||
local rspamd_regexp = require 'rspamd_regexp'
|
||||
local rspamd_util = require 'rspamd_util'
|
||||
|
||||
local ivm_sendgrid_ids = lua_maps.map_add_from_ucl(
|
||||
'https://www.invaluement.com/spdata/sendgrid-id-dnsbl.txt',
|
||||
'set',
|
||||
'Invaluement Service Provider DNSBL: Sendgrid IDs'
|
||||
)
|
||||
|
||||
local ivm_sendgrid_envfromdomains = lua_maps.map_add_from_ucl(
|
||||
'https://www.invaluement.com/spdata/sendgrid-envelopefromdomain-dnsbl.txt',
|
||||
'set',
|
||||
'Invaluement Service Provider DNSBL: Sendgrid envelope domains'
|
||||
)
|
||||
|
||||
local cb_id = rspamd_config:register_symbol({
|
||||
name = 'IVM_SENDGRID',
|
||||
callback = function(task)
|
||||
-- Is it Sendgrid?
|
||||
local sg_hdr = task:get_header('X-SG-EID')
|
||||
if not sg_hdr then return end
|
||||
|
||||
-- Get original envelope from
|
||||
local env_from = task:get_from{'smtp', 'orig'}
|
||||
if not env_from then return end
|
||||
|
||||
-- Check normalised domain in domains list
|
||||
if ivm_sendgrid_envfromdomains and ivm_sendgrid_envfromdomains:get_key(rspamd_util.get_tld(env_from[1].domain)) then
|
||||
task:insert_result('IVM_SENDGRID_DOMAIN', 1.0)
|
||||
end
|
||||
|
||||
-- Check ID in ID list
|
||||
local lp_re = rspamd_regexp.create_cached([[^bounces\+(\d+)-]])
|
||||
local res = lp_re:search(env_from[1].user, true, true)
|
||||
if not res then return end
|
||||
if ivm_sendgrid_ids and ivm_sendgrid_ids:get_key(res[1][2]) then
|
||||
task:insert_result('IVM_SENDGRID_ID', 1.0)
|
||||
end
|
||||
end,
|
||||
description = 'Invaluement Service Provider DNSBL: Sendgrid',
|
||||
type = 'callback',
|
||||
})
|
||||
|
||||
rspamd_config:register_symbol({
|
||||
name = 'IVM_SENDGRID_DOMAIN',
|
||||
parent = cb_id,
|
||||
group = 'ivmspdnsbl',
|
||||
score = 8.0,
|
||||
type = 'virtual',
|
||||
})
|
||||
|
||||
rspamd_config:register_symbol({
|
||||
name = 'IVM_SENDGRID_ID',
|
||||
parent = cb_id,
|
||||
group = 'ivmspdnsbl',
|
||||
score = 8.0,
|
||||
type = 'virtual',
|
||||
})
|
Reference in New Issue
Block a user