jschauma,
@jschauma@mstdn.social avatar

Every so often, I need to chase down some aspect of email validation (#SPF, #DMKIM, #DMARC, ...). This involves a number of #DNS records and queries, but I may forget just which ones. So here's a quick #SMTP/DNS cheatsheet:

partim,
@partim@social.tchncs.de avatar

@jschauma We’re currently working on a DNS diagnostics tool and one of the ideas is to include a command to fetch and display all the mail-related records.

(It’s very early days, but it’s here: https://github.com/NLnetLabs/domain-tools)

jschauma,
@jschauma@mstdn.social avatar

@partim nice, will need to check it out. Here’s a related tool, although perhaps more specific purpose: https://github.com/zuzazuza/domaincheck

partim,
@partim@social.tchncs.de avatar

@jschauma Maybe wait a bit … I’ve only built the scaffolding and a rudimentary “query” command (which is intended to do what dig does) just yet.

jschauma,
@jschauma@mstdn.social avatar

Brief summary of the different records following in this thread.

Longer explanation in my #SysAdmin video lectures here:
https://www.youtube.com/playlist?list=PLDadzdouM0VBkac7BMCsEMCcmgHoqRUz6

jschauma,
@jschauma@mstdn.social avatar

A single domain may have multiple MX records which may or may not be in the same domain (which itself may or may not be within the original domain):

jschauma,
@jschauma@mstdn.social avatar

For results with the same preference, mail servers MUST (per RFC2821) pick one at random; otherwise, the lower preference are preferred.

Subdomains may have their own distinct MX records. If a domain name does not have an MX record, but it has A or AAAA records, then one of those addresses is used ("implicit MX"). However, if no records are found, there is no subdomain climbing.

MX records MUST NOT point to a CNAME, but CNAMEs of the original name are followed:

dalias,
@dalias@hachyderm.io avatar

@jschauma Are you sure about that last MUST NOT? ISTR it being a common myth but modern standards not actually disallowing it.

fanf,
@fanf@mendeddrum.org avatar

@dalias @jschauma there are weasel words in rfc 5321 https://www.rfc-editor.org/rfc/rfc5321.html#page-69 “Any other response, specifically including a value that will return a CNAME record when queried, lies outside the scope of this Standard.” what this actually means is, most implementations accept mx-points-to-cname, but they weren’t willing to write that down clearly

jeroen,
@jeroen@secluded.ch avatar

@fanf @dalias @jschauma the problem with MX to CNAME is that sendmail will helpfully replace the domain in the To with the name in the CNAME..... have fun with that ;)

fanf,
@fanf@mendeddrum.org avatar

@jeroen @dalias @jschauma No, that’s cname pointing at mx

the rewrite was specified in rfc 821 for addresses in the smtp envelope but that was removed in 2821

dalias,
@dalias@hachyderm.io avatar

@jeroen @fanf @jschauma Wait what?! Is that in origination or at any step of processing?! 🤦

jeroen,
@jeroen@secluded.ch avatar
alarig,
@alarig@hostux.social avatar

@jeroen @dalias @fanf @jschauma @djb Another reason not to use sendmail

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • megavids
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • Leos
  • cisconetworking
  • provamag3
  • JUstTest
  • lostlight
  • All magazines