postalserver / postalserver/postal

+notrack not removed if DNS server doesn't return CNAME record

Open
#1,332 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
16.8k
Forks
1.3k
Avg merge
13d 7h
Merged PRs (30d)
2

Description

I've had various issues with +notrack not being removed from URLs over the past year or so rendering the received messages to be un-viewable or un-clickable.

The original problem I believe was related to connections to the database server being reset due to a misconfiguration that would sometimes cause `Postal.tracking_available? && @domain.track_clicks?` to be false in `lib/postal/message_parser.rb`. When that happened, `insert_links` would not be called and therefore `part.gsub!(/(https?)\+notrack\:\/\//) do`... would not be executed to replace `+notrack`.

Recently I inadvertently started routing my tracking domains through Cloudflare's proxy services and when I did that, they would no longer return a CNAME record for my tracking domains (they would only return an A record). So, at some point, postal detected the lack of CNAME as a DNS error and updated the tracking domain to have `dns_status=Missing`. In that case the message parser would ultimately not call the `insert_links` function.

Clearly it's very important to have everything set up and running correctly. I'm just wondering if it would be possible to do the `+notrack` replacement no matter what before a message is sent. I'd rather have messages be sent that will work for the recipient rather than have tracking.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.