From 5bf5b361a75ecf7dc0209efe3d125c7472b1261c Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 May 2026 13:23:46 +0300 Subject: [PATCH] Prepare files for AdGuard Mail Tracking Protection filter (#231199) * Prepare files for AdGuard Mail Tracking Protection filter * Clarified the descriptions --- MailTrackingFilter/sections/allowlist.txt | 9 +++++++++ MailTrackingFilter/sections/general_url.txt | 13 +++++++++++++ MailTrackingFilter/sections/specific.txt | 15 +++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 MailTrackingFilter/sections/allowlist.txt create mode 100644 MailTrackingFilter/sections/general_url.txt create mode 100644 MailTrackingFilter/sections/specific.txt diff --git a/MailTrackingFilter/sections/allowlist.txt b/MailTrackingFilter/sections/allowlist.txt new file mode 100644 index 00000000000..cf4cb033a33 --- /dev/null +++ b/MailTrackingFilter/sections/allowlist.txt @@ -0,0 +1,9 @@ +! +! This section contains the list of rules that fix incorrect blocking. +! Rules should be domain-specific. +! If a rule causes a problem only in a specific email client, it should be restricted to that domain. +! If it causes problems in more clients, it should be changed or deleted. +! +! Good: @@ci3.googleusercontent.com/meips/*/wf/open?upn=$image,domain=mail.google.com +! Bad: @@/wf/open?upn= (too wide, or must be removed) +! diff --git a/MailTrackingFilter/sections/general_url.txt b/MailTrackingFilter/sections/general_url.txt new file mode 100644 index 00000000000..f44a0275bd2 --- /dev/null +++ b/MailTrackingFilter/sections/general_url.txt @@ -0,0 +1,13 @@ +! +! This section contains generic mail tracking rules — broad patterns (e.g. `pix.gif`, `e.gif`) that +! are commonly used by many different email providers and marketing platforms. +! IMPORTANT: add a comment that explains where a pattern comes from (what tracking company is using it). +! Ideally, supply a link to the document that explains how this pattern is used. +! +! To block tracking pixels in some email clients, percent-encoding is required. Therefore, both variants +! must be added - the original and the encoded version. +! +! Good: /pix.gif?$image +! %2Fpix.gif%3F$image +! Bad: ||newegg.com/mr/ (for instance, should be in specific.txt) +! diff --git a/MailTrackingFilter/sections/specific.txt b/MailTrackingFilter/sections/specific.txt new file mode 100644 index 00000000000..5b23f2a73c7 --- /dev/null +++ b/MailTrackingFilter/sections/specific.txt @@ -0,0 +1,15 @@ +! +! This section contains rules targeting tracking pixels from specific domains and email services. +! Note that || prefix cannot be used because mail tracking pixels are often proxied by mail providers. +! It is problematic that due to how Gmail proxy work, these domains aren't even exposed on the network level. +! Fortunately, extensions can see them (Gmail puts the real URL in the location.hash part of the src). +! To block tracking pixels in some email clients, percent-encoding is required. Therefore, both variants +! must be added - the original and the encoded version. +! +! Good: link.example.org$image +! newegg.com/mr/*.gif?r= +! newegg.com%2Fmr%2F*.gif%3Fr%3D +! Bad: ||example.org^$script (treated it as regular analytics and block it in the Tracking Protection filter, +! if a script in not proxied) +! +