email - SpamAssassin filter header -


i'm trying filter messages header return-path contains string '@example.eu'.

i added /etc/mail/spamassasin/local.cf lines:

my first attempt:

header local_demonstration_all  return-path =~ /example\.eu/i score local_demonstration_all   10.0 

my second attempt:

header local_demonstration_all =~ /return-path.*example.eu>/i score local_demonstration_all   10.0 

another filters work, above doesn't. checked regex ok.

what's wrong? thanks.

the return-path header contains envelope sender , typically added email when delivered recipient's mailbox, i.e. not present visible header while email in transit.

the envelope sender passed in smtp dialog using mail from command , can used in spamassassin rules, depending on how spamassassin being called actual details may vary.

spamassassin has pseudo-header envelopefrom tries populate envelope sender using heuristics (or can tell spamassassin how should populated using envelope_sender_header configuration option). setups rule should work:

header local_demonstration_all  envelopefrom =~ /example\.eu/i score local_demonstration_all   10.0 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -