Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

it's not a fallback, it's the default behavior. originally when you would send mail to a user at a host, the MTA would just connect to that host on port 25. the original SMTP RFC (821) pre-dates any DNS RFCs, so originally there wasn't even a concept of MX records and you just e-mailed someone at the server they had an account on.

after DNS was in place, MX records came along in order to route mail destined for a host to a different server, or just supply a list of backup servers. now since most people just use email addresses containing only a domain, MX records are pretty much common place (since the A record of many domains resolves to the web server). now MTAs check for MX records before trying to connect directly to the host.

to demonstrate:

     jcs@thalamus:~> host -t mx test.jcs.org
     test.jcs.org has no MX record
     jcs@thalamus:~> host test.jcs.org
     test.jcs.org has address 10.10.10.10
     jcs@thalamus:~> echo test | mail test@test.jcs.org
and shortly after, in postfix's mail log:

     Nov 21 22:59:18 thalamus postfix/smtp[23742]: connect to test.jcs.org[10.10.10.10]:25: Operation timed out


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: