1

So I recently started using a "SMTP relay server provider" and was curious how they do some of the things that they do.

In particular, they tell you the following things:

  • Outbound
  • Sent
  • Failed
  • Complaints
  • Opens
  • Clicks
  • Unsubscribes
  • Inbound

Outbound is easy enough. How do they know how many were sent vs. how many failed? I tried to send an email through their SMTP with a known good and a known bad email address and both gave me a "250 2.1.5 recipient <...> OK" response.

Normally, I'd assume there was a failure if I got a bounce back message but (1) that can take a while and (2) they're an SMTP server only - not a POP3 / IMAP provider.

I would have thought, for unsubscribe's, they were using the List-Unsubscribe header but I'm not seeing that in the email header. Plus, I imagine that'd require they have a POP3 / IMAP server that they're using to access emails which seems unlikely.

Maybe there's a header for Complaints too? I'm not seeing any in the headers either.

And how would Opens and Clicks work? If they had a hidden 1x1 image I could see if someone had opened an email and if I had a unique URL someone could click on for each email that could be how they do their clicks but I'm not seeing any of that.

Any ideas?

Thanks!

neubert
  • 317
  • 8
  • 26
  • Why not ask your provider? – EEAA Jun 13 '13 at 21:27
  • How are we supposed to answer specific implementation questions about a particular provider when you haven't told us who they are? – ceejayoz Jun 13 '13 at 21:28
  • 1
    I'm more just interested in general approaches. Like maybe there are protocols I'm just unaware of. If I asked "how does Wordpress know who linked to my blog post"... the correct answer would be trackback and pingback. Sure, it's possible a particular Wordpress blog could be using a proprietary plugin that does it's own thing but I suspect that's not very likely. Saying "how can we know when you haven't linked to the blog" just means you don't have any business answering the question in the first place imho. – neubert Jun 13 '13 at 21:43
  • 1
    And the provider is socketlabs.com. I didn't mention them because of my last comment and because I didn't want to appear as being a shill for them or somehow endorsing them. But since you asked... And EEAA... I have asked them but I think there's a decent chance they won't address the specifics because they either consider that info proprietary or my question won't be routed to the devs. Trying to figure out how a service operates is not without precedent on stackexchange. Google "ciphercloud stackexchange" (without the double quotes). – neubert Jun 13 '13 at 21:54

1 Answers1

2

Let's start off by assuming they either wrote an SMTP tranfer agent, or they used a plugin model on an existing one.

Going through the list

  • Outbound: Every time they queue a message, they increment the counter.
  • Sent: For each Dequeue of a message delivered successfully, they increment this counter.
  • Failed: Each time a delivery failure notice is generated or passes them by, they increment this counter. (Keep in mind, if your domain's MX record points to them, they don't need POP3/IMAP, as they can examine the email in-flight to your server)
  • Complaints: Depends, they could be just looking for messages delivered to postmaster@yourdomain.com, or they could be doing some sort of processing on replies using hotwords or phrases. (E.G.: "take me off your list" -> complaint)
  • Opens: Typically, the provider will edit the HTML Email body to include a 1px transparent image with a unique URL. Then, when that image is requested, they assume the email is being read. This is not entirely accurate, as Apple products pre-cache referenced images, and Microsoft Outlook does not load images to avoid this sort of tracking.
  • Clicks: The provider edits HTML in-flight to have all links point to a unique URL they host. Then, when the user clicks the link, they are taken to the provider's website, which updates statistics and redirects them to the original target. Typically this redirection is using a HTTP 307 which occurs transparently.
  • Unsubscribes: In a similar manner to the Clicks tracking, they could edit the target for the Unsubscribe link or the List-Unsubscribe header to point to their service, which they then redirect to you
  • Inbound: for each inbound email which is queued, they increment this counter. They would, of course, require an MX record from your domain to their server to provide such a service.
Mitch
  • 2,363
  • 14
  • 23