Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Email Addresses and Host Names

DC edited this page Sep 17, 2013 · 10 revisions

Multiple Hosts

Like GMail, scramble servers can host mail for multiple hosts.

  • e.g. scramble.io can also serve <hash>@torproject.org or <hash>@noisebridge.org
  • These hosts can simply point their MX record to the server, in this case scramble.io
  • Alternatively, it could be <hash>@mail.noisebridge.org & mail.noisebridge.org could have a CNAME entry that points to scramble.io
  • During account creation we look at the host name to construct the full address (<hash>@<request hostname>) for that user.

Considerations

  • The server does MX lookup for all recipients of an email, even local recipients, since MX records may change to point to another scramble server. MX records are cached so this should be OK.
  • We need to have a configuration variable that states the server's primary host (i.e. the value of the MX record) so the server can distinguish between local & remote hosts. (DC: why? We have a user table. If the hash1@noisebridge.org, hash2@scramble.io are both users on this server, and hash3@noisebridge.org sends them both an email, then no SMTP traffic is required at all, we just put the message in both inboxes. What would the "primary host" be, anyway?)
  • If you have a overly permissive Nginx setup, someone could spoof the Host header and use your server to send email as, for example, <hash>@gmail.com, and then your server would get blacklisted by other SMTP servers.