How to test naarad locally, on private networks, and over the internet with real email clients.
Related Docs:
- SETUP.md - Server installation
- USAGE.md - Tracking pixel syntax
- DEVELOPERS.md - Code architecture
python server.pyServer runs at http://localhost:8080
Open these URLs directly:
http://localhost:8080/track?id=test_local
http://localhost:8080/track?id=test_rich&sender=me&recipient=client@test.com&subject=TestSubject
- Open
http://localhost:8080/dashboard - You should see the events appear
Only your machine can trigger events. "localhost" means "this computer" - it doesn't work for others.
Windows:
ipconfig
# Look for IPv4 Address (e.g., 192.168.1.100)Mac/Linux:
ifconfig | grep inet
# or
hostname -IThe server binds to 0.0.0.0 by default, making it accessible on your network.
On your phone or another computer on the same WiFi:
http://192.168.1.100:8080/dashboard
http://192.168.1.100:8080/track?id=phone_test
- Compose an email to yourself
- Switch to HTML mode or use an HTML editor
- Add:
<img src="http://192.168.1.100:8080/track?id=private_test" width="1" height="1" />
- Send and open on another device
Only works for devices on the same network. Won't work for external recipients.
For testing with Gmail, Outlook, Thunderbird, ProtonMail, etc., your server must be publicly accessible.
- Install ngrok: https://ngrok.com/download
- Start your server:
python server.py
- Start ngrok:
ngrok http 8080
- Copy the public URL (e.g.,
https://abc123.ngrok-free.app)
Deploy to Railway, Render, or Fly.io (see SETUP.md).
Gmail strips most HTML, but you can use:
- Compose a new email
- Click the 3 dots → Show original (to verify pixel is embedded)
- Or use Gmail API / Apps Script to send HTML emails
Easier Method - Mail Merge: Use Yet Another Mail Merge or similar extension that allows HTML.
- New Email → Format Text tab → Select HTML
- Go to Insert → Text → Object → Text from File
- Insert an HTML file containing:
<html> <body> Your email content here <img src="https://YOUR_NGROK_URL/track?id=outlook_test&recipient=friend@email.com" width="1" height="1" /> </body> </html>
Web Outlook doesn't support raw HTML editing. Use desktop client or API.
- New Message
- Options → Delivery Format → HTML Only
- Insert → HTML → Paste:
<img src="https://YOUR_NGROK_URL/track?id=thunderbird_test" width="1" height="1" />
ProtonMail proxies all images through their servers for privacy. You'll see ProtonMail's IP, not the recipient's.
- Format → Make Rich Text
- Edit → Attachments → Insert → Insert image by URL
- Start server:
python server.py - Open:
http://localhost:8080/track?id=test1 - Check dashboard shows event
- Find local IP (e.g., 192.168.x.x)
- Open from phone:
http://192.168.x.x:8080/dashboard - Trigger pixel from phone
- Start ngrok:
ngrok http 8080 - Copy public URL
- Send test email with pixel
- Open email on different device/network
- Verify event appears in dashboard
| Issue | Cause | Solution |
|---|---|---|
| "Connection refused" on phone | Firewall blocking | Allow Python through firewall |
| Events show "Local" location | Testing from same machine | Test from different device/network |
| Gmail doesn't load images | Images blocked by default | Click "Display images" in email |
| Outlook strips the pixel | Security settings | Use file attachment or API method |
| ngrok URL not working | Free tier limits | Restart ngrok or use paid plan |
| ProtonMail shows wrong IP | Image proxy | Normal - ProtonMail anonymizes IPs |
# Test pixel via curl (simulates email open)
curl "http://localhost:8080/track?id=curl_test&sender=test@example.com"
# Test with custom User-Agent
curl -A "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)" \
"http://localhost:8080/track?id=iphone_test"
# Test click tracking
curl -L "http://localhost:8080/click/test_click/https://example.com"| Client | Image Loading | Notes |
|---|---|---|
| Gmail | Proxied | Google caches images; may see Google IPs |
| Outlook | Direct | Works well, but may block by default |
| Apple Mail | Direct | Usually loads images automatically |
| Thunderbird | Direct | Best for testing, fully supports HTML |
| ProtonMail | Proxied | Privacy-focused; shows ProtonMail IPs |
| Yahoo Mail | Proxied | Yahoo caches images |
Remember: Many email clients block images by default. The recipient must click "Load images" or have it enabled in settings.