3

Edit (it wasn't clear what I was asking): I wanted to send email to my Verizon address by submitting it from my home network to the Verizon MSA. So my question was: how can I find the name of an MSA server if all I have is the domain name. (I was incorrectly asking for the MX server.) I wanted to go from verizon.net to smtp.verizon.net reliably, so I could replicate it in a program. I still think it's a valuable question if you're writing a program where the user inputs their email address and credentials with the intention of sending email from the address.
Generally though, you should only need to find an MSA once, to send all of your email. Because the MSA finds the destination MX for you, and generally MX servers block dynamic IP ranges anyway.

I'm trying to send error logging emails to myself from my Python scripts. I was able to successfully send email to a Yahoo address using this server: smtp.mail.yahoo.com. But I want to send email to a Verizon address.

How do I find the mail server for [email protected]? I'm using Linux and have tried:

dig -t ANY verizon.net:

; <<>> DiG 9.9.2-P1 <<>> -t ANY verizon.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28223
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;verizon.net.           IN  ANY

;; ANSWER SECTION:
verizon.net.        260 IN  MX  0 relay.verizon.net.
verizon.net.        218 IN  A   206.46.232.39

;; Query time: 107 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Jul 22 20:26:42 2015
;; MSG SIZE  rcvd: 78

host -t mx verizon.net:

verizon.net mail is handled by 0 relay.verizon.net

For comparison, host -t mx yahoo.com:

yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.

These commands haven't worked.

4
  • 2
  • 1
    To or From a verizon email address? The Yahoo SMTP server should be able to send mail to any address, regardless of the recipients domain. If you want to send an email From an verizon address, you would want to use their SMTP server, as Jatin indicated. Jul 23, 2015 at 4:50
  • @FrankThomas I was trying to send to a Verizon address. I was able to do it based on Jatin's comment. But I just tested what you said, I set the TO and FROM to a Gmail address and successfully sent it through smtp.verizon.net. Though I did log in with my credentials. That's surprising.
    – user193661
    Jul 23, 2015 at 4:57
  • SMTP servers can be configured in many different ways, so its not surprising that some parties allow operations others do not. Glad its working out for you. Jul 23, 2015 at 5:11

2 Answers 2

2

Request for Comments (RFC) 6186, "Use of SRV Records for Locating Email Submission/Access Services" specifies how organizations can use service (SRV) DNS records to specify the servers they use for email services. A mail submission agent (MSA) can be specified through a SRV record. E.g.:

_submission._tcp.example.com.     SRV 0 1 587 mail.example.com.

If you are unfamiliar with RFCs, they are the mechanism by which Internet standards are set. E.g., RFC 4409, Message Submission for Mail, is also applicable for MSAs. There's also RFC 2782, "A DNS RR for specifying the location of services (DNS SRV)"

If a SRV record has been created for a domain specifying its MSA, you can use nslookup, dig, etc. to find the MSA. But Verizon, AOL, Comcast, Yahoo, and other large companies that provide email service to home users don't create such records, and I don't know any that do, so, for them, you are out of luck in trying to look up an MSA via a DNS query, if the MSA is not the same as the mail exchanger (MX). If I need to help someone configure his or her email client to use his/her ISP's MSA and the server that is returned by an MX query doesn't work, I usually just do a search for something like "configure Outlook site:verizon.net", i.e., a search for how to configure a particular email client specifying that I want to limit my search to websites belonging to the ISP. Most ISP's will have a help page for their users telling them how to configure various email clients which will reveal the MSA.

2

You have two options.

  1. You use no relay and directly use the destination mail server responsible for the org which you can look up using the dig and host commands you specified as well as nslookup -q=mx.

    In this case you don't need authentication (though you may need to use SSL and STARTTLS). You can also set any FROM address you want (provided your host passes SPF checks for that domain or SPF fails are allowed) but only TO addresses at the destination org are allowed.

    You may not be able to use this option if your ISP filters outbound SMTP traffic.

  2. You use a relay, usually the one provided by your ISP as your "outgoing mail server", which will accept your mail and then relay it to the destination server that is found using DNS queries just like those for option 1.

    In this case you must usually be authenticated either explicitly with a username and password or implicitly via IP. You may or may not be able to set any FROM address you want, but you should be able to set any TO address.

2
  • My connection to mta6.am0.yahoodns.net was refused in the several ways I tried. And I'm not sure that mta6.am0.yahoodns.net is equivalent to smtp.mail.yahoo.com
    – user193661
    Jul 23, 2015 at 10:09
  • They are not equivalent. mta6.am0.yahoodns.net is meant to be used to go mail into Yahoo from external users and is an example of option 1. smtp.mail.yahoo.com is meant to be used by Yahoo's email users to send mail outward and is an example of option 2. If you weren't able to connect to mta6.am0.yahoodns.net on port 25 it is likely your ISP is filtering outbound SMTP traffic. Here's my banner grab from that server 220 mta1484.mail.gq1.yahoo.com ESMTP ready Jul 23, 2015 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .