Improve email deliverability

Based on conversation on #support, here is a small checklist to improve email deliverability. This is both for our transactional emails (mg.gitlab.com) and our email marketing ones (while this is not silver bullet, every detail matters):

  • Use SPF
  • Use DKIM
  • Make sure we are using dedicated IP
  • Make sure we have enough dedicated IPs for the volume we are sending
  • Do we comply with Can-Spam-Act?
  • Most email providers have whitelisting available if we ask them
  • If deliverability starts to really bother, consider paying Return Path
  • Process feedback loop notifications (stop sending emails to anyone who report us, immediately
  • Process hard-bounces (stop sending emails to anyone who hard-bounce)
  • Prevent people registering with potentially harmful emails like "abuse@someprovider.com"
  • Monitor blacklists (most importante one is URIBL)
  • Improve email header (lets do a benchmark, there is always things we may be lacking)

Some other things that came to my mind... Some MTAs automatically handle hard-bounces muting and feedback loops. We must reflect this state in our application, and let users "unmute" thenselves. The most obvious way of doing that is reflecting the email notification state on the application, when muted by our MTA, and removing any restriction the other way around.

cc @dblessing @patricio