You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Nicola Piazzi <Ni...@gruppocomet.it> on 2016/08/18 13:50:18 UTC

rule with multiple lines

Is there a way to have multiple line in a single rule ?

For example :
meta            OW_SENT_EMAIL         ( OW_T_SENT_EMAIL && ! OW_T_REF_EMAIL && ! OW_T_REF_FULL && ! OW_REF_THIS && OW_PASS)

Will be better :
meta            OW_SENT_EMAIL         ( OW_T_SENT_EMAIL
                                                                      && ! OW_T_REF_EMAIL 
                                                                      && ! OW_T_REF_FULL 
                                                                      && ! OW_REF_THIS 
                                                                      && OW_PASS)

 


Re: rule with multiple lines

Posted by Martin Gregorie <ma...@gregorie.org>.
On Thu, 2016-08-18 at 13:50 +0000, Nicola Piazzi wrote:
> Is there a way to have multiple line in a single rule ?
> 
Not as far as I know.�

I use long lists (e.g. selling terms or product names) to recognise
advertising spam and initially thought of writing something like an RBL
to handle such lists because editing SA rules that contain very long
alternates lists is hard. But, after asking on this list and getting
told that rules consisting of just a long alternates list are fairly
efficient in execution, I wrote an awk-based tool, portmanteau, that
assembles this type of rule from a file that has each regex on a
separate line and so is a lot easier to read and modify. If this meets
your requirement you can find the tool and its documentation here:

http://www.libelle-systems.com/free/portmanteau/portmanteau.tgz


Martin