Hello Martin,

On 2020-09-09 14:33, Martin Nadvornik wrote:

I recently discovered that archiving rules like "From:
someth...@example.com" or "To: someth...@example.com" will also trigger
for e-mail addresses like "justsometh...@example.com". Is there any way
to perform an exaxct matching?
I already tried entering the following regexes when creating the rules
via the web gui:

"someth...@example.com"
^ someth...@example.com
^someth...@example.com

Any help is appreciated :)

Take a message as an eml file, and run pilertest against it to see how
piler sees the message. Only showing the To: results between asterisks (*).

Let's take the following message (#1) (only the To: header):

To: user.n...@example.com

after parsing:

to: *user.n...@example.com user name example com  (example.com )*


Then another message (#2):

To: "User, Name" user.n...@example.com

after parsing:

to: *user name user.n...@example.com user name example com (example.com )*


If you specified "^user.n...@example.com" (without quotes), then you could match
message #1, but miss #2.

If you specified "user.n...@example.com" (without quotes), then you could match both message #1 and #2, however also match otheruser.n...@example.com, which you
don't want.

So the solution takes 2 patterns:

"^user.n...@example.com" to catch #1

and

" user.n...@example.com" to catch #2 (notice the prepended space!)

Again, you shouldn't use the quotes when you type these patterns, the quotes
here only serve as a clear distinction.

Janos



Reply via email to