Filtering is easy. Run pi-hole. 


  Original Message  
From: postfixlists-070...@billmail.scconsult.com
Sent: February 14, 2019 12:44 PM
To: postfix-users@postfix.org
Reply-to: postfix-users@postfix.org
Subject: Re: Click tracker removal ideas?

On 14 Feb 2019, at 11:27, Phil Stracchino wrote:

> Quick question I hope:
>
> Does anyone have any suggestions for a tool for filtering out click
> trackers from links in email bodies and rewriting the links without 
> the
> click tracking?

I gather from your other messages in this thread that by "click tracker" 
you mean URLs that point to one host which redirects the user to another 
URL. It's important to understand that this has entirely legitimate uses 
and isn't reliably detectable without chasing every URL in a message, 
which may effectively mimic the end user doing something that they would 
not do themselves. So at the highest level of not breaking anything that 
is harmless for the end user, this CANNOT work universally and/or 
harmlessly.

At the technical level, aside from the problem of breaking DKIM, this 
also would require decoding messages if they are encoded in 
quoted-printable or Base64 and create a permanent support load of 
identifying and interpreting all "click tracker" URLs. It's not as if 
there were some standard for how to write an URL which will ultimately 
cause a redirection in a manner that makes the ultimate endpoint 
discoverable just by picking apart the original URL. So at the technical 
level, you can't do it safely or reliably because people running 
redirection systems often don't want anyone picking apart their 
mechanics and will happily modify how they encode final destinations to 
resist de-obfuscation.

So even though you shouldn't try it because it will hurt your customers 
and can't even do it well if you tried, the obvious tool framework for 
this would be a milter or a content filter that uses the Postfix SMTP 
proxy mechanism. If you're good with Perl, MIMEDefang (a milter) would 
be the obvious choice, since its interface is a set of stub Perl 
subroutines that let you do whatever you can write code for with a 
message and its metadata at the various stages of the SMTP transaction.

But don't. It would not end well.



-- 
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole

Reply via email to