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 "(^[email protected])|(
[email protected])" also works fine and keeps it in one rule.

Martin

Am 09.09.2020 um 20:32 schrieb [email protected]:
> Hello Martin,
>
> On 2020-09-09 14:33, Martin Nadvornik wrote:
>>
>> I recently discovered that archiving rules like "From:
>> [email protected]" or "To: [email protected]" will also trigger
>> for e-mail addresses like "[email protected]". Is there any way
>> to perform an exaxct matching?
>> I already tried entering the following regexes when creating the rules
>> via the web gui:
>>
>> "[email protected]"
>> ^ [email protected]
>> ^[email protected]
>>
>> 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: [email protected]
>
> after parsing:
>
> to: *[email protected] user name example com  (example.com )*
>
>
> Then another message (#2):
>
> To: "User, Name" [email protected]
>
> after parsing:
>
> to: *user name [email protected] user name example com 
> (example.com )*
>
>
> If you specified "^[email protected]" (without quotes), then you
> could match
> message #1, but miss #2.
>
> If you specified "[email protected]" (without quotes), then you
> could match
> both message #1 and #2, however also match [email protected],
> which you
> don't want.
>
> So the solution takes 2 patterns:
>
> "^[email protected]" to catch #1
>
> and
>
> " [email protected]" 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