Hello Janos,

thank you as always for your quick help. You were absoluteley right,
using the two rules works perfectly.
In case someone stumbles upon this in future and thinks two rules are
too unwieldy, the regex "(^someth...@example.com)|(
someth...@example.com)" also works fine and keeps it in one rule.

Martin

Am 09.09.2020 um 20:32 schrieb s...@acts.hu:
> 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

-- 
Martin Nadvornik
IT Mitarbeiter

Diakonie Flüchtlingsdienst gem. GmbH
Steinergasse 3/12
1170 Wien, Austria
Tel: +43 (0) 1/ 402 67 54 - 1337
Fax: +43 (0) 1/ 402 67 54 - 16
Mobil: 0664/88350692
http://www.diakonie.at/fluechtlingsdienst

Verantwortung kann man nicht abschieben!

Reply via email to