You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Paul Stead <pa...@zeninternet.co.uk> on 2016/09/30 00:07:58 UTC

WLBLEval - question before enhancement BR

Hi guys,

Whilst looking through WLBLEval eval rules I noticed the likes of the
following:

--
   $self->register_eval_rule("check_from_in_list");
   $self->register_eval_rule("check_to_in_list");
--

Cool! I can check from and to lists, except I can't find a way to
add/remove to addrlists like we can by using enlist_uri_host for hosts.

I've created a small function "add_to_addrlist" which works in a similar
way to enlist_uri_host -

I can now do something similar to:

---
add_to_addrlist (SUSTLDS) *@*.top
add_to_addrlist (SUSTLDS) *@*.download
add_to_addrlist (SUSTLDS) *@*.science

header   PDS_FROM_SUS_TLD eval:check_from_in_list('SUSTLDS')
score   PDS_FROM_SUS_TLD 0.1
describe PDS_FROM_SUS_TLD From untrustworthy TLD
---

I also added an eval rule to check the Reply-To address to help make
this even more useful, real life example below:

---
meta __REPLYTO_SUS_TLD eval:check_replyto_in_list('SUSTLDS')
header __FROM_GOOGLE_DRIVE_SHARE From:addr =~
/^drive-shares-noreply@google.com$/

meta GOOGLE_DRIVE_REPLYTO_SUS_TLD (__FROM_GOOGLE_DRIVE_SHARE &&
__REPLYTO_SUS_TLD)
---

A few questions:

Does this seem useful? I know some people block these TLDs outright but
I feel this might add some function other's might find useful?

I have a diff ready, but I'm not sure where to put the "add_to_addrlist"
codeblock - Plugin/WLBLEval.pm or Conf.pm - - evidence in Conf.pm
indicates that enlist_uri_host was added here previously for WLBLEval,
but the Plugin itself seems the most sensible place to register the
command - help?

Ta

Paul
--
Paul Stead
Systems Engineer
Zen Internet