You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/3.features/click-and-open-tracking.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,39 @@ Once enabled, Postal will automatically scan your outgoing messages and replace
15
15
16
16
## Configuring your web server
17
17
18
-
To avoid messages being marked as spam, it's important that the subdomain that Postal uses in the re-written URLs is on the same domain as that sending the message. This means if you are sending mail from `example.com`, you'll need to setup `click.example.com` (or whatever you choose) to point to your Postal server.
18
+
To avoid messages being marked as spam, it's important that the subdomain that Postal uses in the re-written URLs is on the same domain as that sending the message. This means if you are sending mail from `yourdomain.com`, you'll need to setup `click.yourdomain.com` (or whatever you choose) to point to your Postal server.
19
+
20
+
There are two ways how to achive that traffic to `click.yourdomain.com` will reach Postal:
21
+
1. Adding CNAME record for `click.yourdomain.com` to previously configured `track.postal.example.com` followed by Caddy additional configuration.
22
+
2. Configuring custom proxy for `click.yourdomain.com` on your webserver.
23
+
24
+
### Additional Caddy configuration
25
+
26
+
If you used Caddy as proxy for overall Postal traffic it easy to add additional proxy its config `/opt/postal/config/Caddyfile`:
27
+
28
+
```
29
+
# ... previous content
30
+
31
+
click.yourdomain.com {
32
+
reverse_proxy 127.0.0.1:5000 {
33
+
header_up X-Postal-Track-Host "1"
34
+
}
35
+
}
36
+
```
37
+
38
+
After saving this new configuration restart Caddy, for example if you're using docker, you may be able to `docker restart postal-caddy`.
39
+
40
+
After this you should see `Hello.` on `click.yourdomain.com` and SSL should work out of the box.
41
+
42
+
### Custom proxy on webserver
19
43
20
44
You'll need to add an appropriate virtual host on your web server that proxies traffic from that domain to the Postal web server. The web server must add the `X-Postal-Track-Host: 1` header so the Postal web server knows to treat requests as tracking requests.
21
45
22
46
Once you have configured this, you should be able to visit your chosen domain in a browser and see `Hello.` printed back to you. If you don't see this, review your configuration until you do. If you still don't see this and you enable the tracking, your messages will be sent with broken links and images.
23
47
24
-
If you're happy things are working, you can enable tracking as follows:
48
+
### Setting up tracking domain
25
49
50
+
If you're happy things are working, you can enable tracking as follows:
26
51
1. Find the web server you wish to enable tracking on in the Postal web interface
0 commit comments