The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, September 28, 2004

Overly pendantic commands

I was called by R (guy I work for) to double check the email system since it looked like (to him) that it wasn't working at all and no emails were being sent (order confirmations, etc). I start checking, and from what I could tell, the email system was working fine. I placed a few test orders from a few sites and got the confirmation email. And from the mail logs, it looked like it was sent off to R as well.

But he wasn't getting them.

A few more tests while talking to R seemed to confirm that email sent to him from the server was being accepted by his ISP, but R was still not getting them. Which indicates to me that his ISP is filtering out spam and for whatever reason, email from this server was being flagged as spam and not delivered.

I then did the following on the server to check something out:

[root]rnm.miami:~>hostx -t mx XXXXXXXXXXXX
XXXXXXXXXXXX            MX      20 mail2.XXXXXXXXXXXX
 !!! XXXXXXXXXXXX MX host mail2.XXXXXXXXXXXX is not canonical
XXXXXXXXXXXX            MX      10 mail.XXXXXXXXXXXX
 !!! XXXXXXXXXXXX MX host mail.XXXXXXXXXXXX is not canonical

Hmmm … odd. Double check the zone file.

$TTL 3600
@	IN	SOA	ns1.XXXXXXXXXXXX. root.XXXXXXXXXXXX. (
			2004091801 ; Serial
			10800	; Refresh
			3600	; Retry
			3600000 ; Expire
			3600 )	; Minimum

	IN	NS	ns1
	IN	NS	ns2
	IN	NS	ns3
	IN	MX	10 mail
	IN	MX	20 mail2

mail	IN	A	XXX.XXX.XXX.XXX
mail2	IN	A	XXX.XXX.XXX.XXX
ns1	IN	A	XXX.XXX.XXX.XXX
ns2	IN	A	XXX.XXX.XXX.XXX
ns3	IN	A	XXX.XXX.XXX.XXX

Nothing out of the ordinary. The RRs for mail and mail2 aren't CNAMEs (which is a common mistake). They look fine to me, and running host on outside machines report back fine:

[root]linus:~>host -t mx XXXXXXXXXXXX
XXXXXXXXXXXX            MX      20 mail2.XXXXXXXXXXXX
XXXXXXXXXXXX            MX      10 mail.XXXXXXXXXXXX

A quick Google didn't reveal anything I already didn't know (most of the problems I found were CNAME errors). So, I started playing around with the zone file. Make a change, same error. Make another change, same error. It was only when I removed all references to mail and mail2 when I discovered the problem.

By then, I was doing hostx -G -S -C -A -L 1 zone (which verifies the entire zone) and getting back errors about mail and mail2. Which shouldn't be happening, as I had just removed all references to them in the zone file. There was only one other place where they were defined—/etc/hosts. Once I removed those entries from /etc/hosts, the problem went away:

[root]rnm.miami:~>hostx -t mx XXXXXXXXXXXX
XXXXXXXXXXXX            MX      20 mail2.XXXXXXXXXXXX
XXXXXXXXXXXX            MX      10 mail.XXXXXXXXXXXX

Talk about your overly pendantic host command.

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.