LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail not pulling MX record for vtext.com (https://www.linuxquestions.org/questions/linux-server-73/sendmail-not-pulling-mx-record-for-vtext-com-603102/)

livewire98801 11-28-2007 04:58 PM

Sendmail not pulling MX record for vtext.com
 
Where I work (ISP), we're using a monitoring server (statseeker) on FreeBSD 6.2-20070130.

The Statseeker software sends out a message to our phones on Verizon Wireless. In order to do that, it emails phonenumber@vtext.com.

Here's the sticker. If we use our main mail server as a relay, everything works beautifully. If, however, we send directly from the statseeker software, we can't send to vtext.com.

The error seems to be in DNS. The a record for vtext.com is:

Quote:

Non-authoritative answer:
Name: vtext.com
Address: 66.174.76.5
The MX record is:

Quote:

Non-authoritative answer:
vtext.com mail exchanger = 50 smtpsp.vtext.com.
vtext.com mail exchanger = 50 smtpsp1.vtext.com.

Authoritative answers can be found from:
vtext.com nameserver = carkdns.vzwdomain.com.
vtext.com nameserver = njbrdns.vzwdomain.com.
smtpsp.vtext.com internet address = 66.174.76.30
smtpsp1.vtext.com internet address = 66.174.3.30
Here's the relevant info from the maillog file:

Code:

Nov 28 11:18:30 statseeker sm-mta[1050]: lASJB0r3001333: to=<##########@vtext.com>,<##########@vtext.com>,<##########@vtext.com>, ctladdr=<npm1@statseeker.domain.tld> (2000/1999), delay=00:07:30, xdelay=00:01:15, mailer=esmtp, pri=480618, relay=vtext.com [66.174.76.5], dsn=4.0.0, stat=Deferred: Operation timed out with vtext.com
Nov 28 11:18:30 statseeker sm-mta[1050]: lASIv0fZ001082: to=<##########@vtext.com>,<##########@vtext.com>,<##########@vtext.com>, ctladdr=<npm1@statseeker.domain.tld> (2000/1999), delay=00:21:30, xdelay=00:00:00, mailer=esmtp, pri=1110618, relay=vtext.com, dsn=4.0.0, stat=Deferred: Operation timed out with vtext.com


I've wiped out the phone numbers with "##########", and our domain with "domain.tld" for security reasons :)


I would post the sendmail config, but the other net admin changed it over to relay off of our primary mail server till we get some more research done.

We would like this server to send directly, as the mail servers are being monitored by this device. If the mail server goes down now, we won't get a notification, and that would be very frustrating :)

Let me know if more info is needed.

Thanks,

Tim

trickykid 11-28-2007 09:04 PM

Is your statseeker setup as an actual server with MX record like your main mail server? That would probably be the issue, they might be denying due to something along those lines.

livewire98801 11-29-2007 12:35 AM

No, it doesn't have an MX record. Actually, it doesn't even have a real IP (it's on a private network attached to our proxy).

This was my first theory as well, but it doesn't hold water. If I telnet to port 25 on smtpsp.vtext.com or the IP from the statseeker, it accepts manual mail commands and delivers the message. If I telnet to vtext.com (or its IP) from statseeker or one of our mail servers, there is no response. If I send the mail (mail ##########@vtext.com) from the mail server (or another CentOS testbed that is not a mail server), the mail is accepted.

From what I can tell, this is an issue with Sendmail (or BSD) not doing a proper DNS query on vtext.com. Interestingly, it DOES send mail correctly to my account on our mail server.

trickykid 11-29-2007 07:46 AM

Your mail server is setup differently than theirs most likely. Most ISP's and mail servers will reject mail from a unknown source. If this machine or server is sending the mails directly, it's behind on a private network, you're probably best to just relay these thru your mail server so it appears to vtext.com as a real legitimate email, not a spammer with a hacked bot with unknown sending sources.. ;)

livewire98801 11-29-2007 11:23 AM

They don't appear to be blocking it. If I telnet to the actual SMTP server (smtpsp.vtext.com), it works. It appears that statseeker. isn't sending to the MX record target, but just to "vtext.com", which is not a mail server.

trickykid 11-29-2007 12:50 PM

Quote:

Originally Posted by livewire98801 (Post 2974624)
They don't appear to be blocking it. If I telnet to the actual SMTP server (smtpsp.vtext.com), it works. It appears that statseeker. isn't sending to the MX record target, but just to "vtext.com", which is not a mail server.

Well, of course not. If they were blocking port 25, then it wouldn't be a mail server. What's most likely happening is exactly how it was described. You relay thru your own actual mail server, it accepts, it's a valid mail server with MX records, static IP, etc.

Now when you try to send the email directly from a server not recognizable to the outside world, so it can reach outside but others can't directly hit it, most likely depending on your network setup, vtext.com will see the email coming from an IP Address that isn't your MX or Mail server, has not MX record and will deny or just drop it, not delivering the message since of course, it would look like it's coming from some random IP on the internet and I don't blame them for dropping such messages.

Does that make sense? Easiest way to do this is just to have your messages filter thru your mail server or relay thru it, it works, shouldn't be a problem to me, especially if you need monitors in place to page you.. ;)

livewire98801 11-29-2007 02:08 PM

Again, the issue seems to be with sendmail on the local machine. I can send from statseeker manually, the automated process is sending to the wrong server according to DNS.

If I send to the proper server manually, it works. Following is the capture from a console session of me sending my phone an email message. The message was received.


Code:

# telnet smtpsp.vtext.com 25
Trying 66.174.76.30...
Connected to smtpsp.vtext.com.
Escape character is '^]'.
220 njbrwigsp3 MailShield SMTP (UCE not wanted)
helo statseeker.domain.tld
250 Hello statseeker.domain.tld [IP address of proxy router], pleased to meet you
mail from: timg@statseeker.domain.tld
250 <timg@statseeker.domain.tld>... Sender ok
rcpt to: ##########@vtext.com
250 <##########@vtext.com>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: test
test message
.
250 MsgID12_OSNC0L9F Message accepted for delivery (message relayed)
quit
221 njbrwigsp3 closing connection
Connection closed by foreign host.
#


trickykid 11-29-2007 03:38 PM

Sendmail will use the system DNS just as if you were connecting using telnet from the machine. If you ping or telnet to smtpsp.vtext.com and see the IP it uses, there's no reason why sendmail on the same machine will use a different IP. It's not a DNS issue, it's another issue.

Personally, I think it's probably the headers that are getting attached and vtext.com mail servers are rejecting it.

Probably the process flow you are taking:

Email Message -> Sendmail -> MX Lookup -> vtext.com Mail Server -> vtext.com Mail server Checks Headers and rejects/drops

Your manual connection is working cause it works a little differently. You're specifying the info directly to probably one of many mail servers they may have. I think you're direct email straight from the statseeker using sendmail is not properly supplying header info and vtext.com rejects such things. From my experience, it is not a DNS issue, it's a configuration issue. That's why I said if you have a real Mail server setup, you should really be relaying your email thru it. I don't see that being a problem unless there's a reason it has to come directly to your phone from the server.

trickykid 11-29-2007 04:00 PM

In your manual telnet, you display that your specifying your domain with:

helo statseeker.domain.tld

What happens if you just do a helo? I mean, I connected and used a domain that was not associated with my current IP and it allowed me to send an email to my verizon phone from a domain I have but wasn't currently on. I also did another manual connection with just helo and got the email.

Do a dig from your server and see what MX record it comes back with. If it's correct, then it's most likely how it's getting passed along and is a configuration issue, not a DNS issue.

livewire98801 11-29-2007 04:30 PM

The reason I'm so anxious to get this going is Statseeker is watching our servers, including our mail server. If the mail server goes down tonight, we won't get notifications.

Quote:

$ telnet smtpsp.vtext.com 25
Trying 66.174.76.30...
Connected to smtpsp.vtext.com.
Escape character is '^]'.
220 njbrwigsp5 MailShield SMTP (UCE not wanted)
helo
250 Hello [proxy IP], pleased to meet you
mail from: timg@statseeker.domain.tld
250 <timg@statseeker.domain.tld>... Sender ok
rcpt to: ##########@vtext.com
250 <##########@vtext.com>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject:test
test message
.
250 MsgID10_VKWPZK9F Message accepted for delivery (message relayed)
quit
221 njbrwigsp5 closing connection
Connection closed by foreign host.
$

trickykid 11-29-2007 04:39 PM

Quote:

Originally Posted by livewire98801 (Post 2974917)
The reason I'm so anxious to get this going is Statseeker is watching our servers, including our mail server. If the mail server goes down tonight, we won't get notifications.

In my experience, we always have a watcher watching the watcher. Cause what if the watcher goes down, you don't get any pages either and think everything is all find and dandy. Always a good idea to have two monitoring systems, one main one watching everything and another one watching the main one.

There are also other 3rd party tools to check on services. Something like redalert.com, you can use it to watch your mail server, if it doesn't respond, you'll get notified by them so you can respond quickly in hopes that nothing else is paging.. ;)


All times are GMT -5. The time now is 12:51 PM.