Search entire message text in the rule selection.

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
screenman47
New user
New user
Posts: 20
Joined: 2017-04-27 17:11

Search entire message text in the rule selection.

Post by screenman47 » 2020-05-25 16:14

When I want to add a new entry to a rule I have only a few options as to where Hmail looks for the offending text. Is it possible to search the whole .eml source instead of making multiple entries to the rule. I know there is a "custom header field" box but how do I tell it to search everything.

User avatar
mattg
Moderator
Moderator
Posts: 21042
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Search entire message text in the rule selection.

Post by mattg » 2020-05-25 17:27

Custom header rule only checks the message headers

You can't search full email text using rules
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

screenman47
New user
New user
Posts: 20
Joined: 2017-04-27 17:11

Re: Search entire message text in the rule selection.

Post by screenman47 » 2020-05-25 17:46

Okay. Thank you.

U-351
New user
New user
Posts: 11
Joined: 2014-11-13 15:13

Re: Search entire message text in the rule selection.

Post by U-351 » 2020-06-18 06:26

In this case, can someone explain - what gives the "BODY" tag in the rules?

User avatar
mattg
Moderator
Moderator
Posts: 21042
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Search entire message text in the rule selection.

Post by mattg » 2020-06-18 15:58

'Body' is plain text, and may or may not, include the contents of the email

Some emails are 'HTML text'

But yes, that is a good find.
I missed that
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
RvdH
Senior user
Senior user
Posts: 1113
Joined: 2008-06-27 14:42
Location: Netherlands

Re: Search entire message text in the rule selection.

Post by RvdH » 2020-06-19 00:06

mattg wrote:
2020-06-18 15:58
'Body' is plain text, and may or may not, include the contents of the email

Some emails are 'HTML text'

But yes, that is a good find.
I missed that
U Sure?
Body - The Body of the email message. This includes both the plain text body and the HTML body.
As listed in docs here
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

User avatar
mattg
Moderator
Moderator
Posts: 21042
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Search entire message text in the rule selection.

Post by mattg » 2020-06-19 00:20

Well there you go
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
katip
Senior user
Senior user
Posts: 778
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Search entire message text in the rule selection.

Post by katip » 2020-06-19 05:10

rules work with body too, for sure.
however i'm not sure if HMS first decodes base64 and then performs a search, like SA or ASSP do it. i think not.
so only text and/or some HTML bodies are good for rules.
depending on traffic volume and average message size it may not be wise to use body rules though.
Katip
--
HMS 5.7.0 x64, MariaDB 10.4.10 x64, SA 3.4.2, ClamAV 0.101.2 + SaneS

Post Reply