[Users] Rewrite URLs in message obfuscated by Outlook's safelinks stuff
George Avrunin
avrunin at comcast.net
Tue Mar 19 12:42:41 UTC 2024
On Mon, 18 Mar 2024 23:22:33 +0100
"H.Merijn Brand" <linux at tux.freedom.nl> wrote:
> I wholeheartedly agree to everything you complain about this insane
> "security" feature!
>
> My rm_disclaim.pl (perl) script revoves that junk with
>
> --8<---
> use URL::Encode::XS qw( url_encode url_decode );
>
> # And useless, irritating and obfuscating wrapping of URL's
> s{\bhttps://[\w.]+\.safelinks\.protection\.outlook\.com/\?url=(.*?)(?:&|&)data=\S+?(?:&|&)reserved=\d+\b}
> {url_decode ($1)}ge;
> -->8---
>
> as part of a bigger cleanup, where company logo's, useless HTML
> attachments, disclaimers and print warnngs are removed and telephone
> numbers are consistemtly formatted.
>
> Feel free to steal that snippet when you choose to use perl.
Thanks! I haven't done any perl programming since the late 1990s, I
think, but ... 😉
May I ask how your rm_disclaim.pl script is applied? Do you do this in
claws-mail, e.g., through an action or something, or is it part of the
process of receiving mail, or what?
George
More information about the Users
mailing list