LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SMTP & Reverse Lookup (https://www.linuxquestions.org/questions/linux-networking-3/smtp-and-reverse-lookup-376090/)

dcabbar 10-23-2005 02:21 PM

SMTP & Reverse Lookup
 
Hi,

I have two domains hosted on my linux, and while e-mails sent from one domain goes through fine (to yahoo), the ones sent from the second domain is silently discarded by yahoo, and I am a bit confused about this.

Assuming that I am sending an e-mail from an e-mail address myuser@mydomain.com with HELO: xyz.com and from IP address x.x.x.x, can anyone explain (in Layman's terms) how the receiving SMTP server performs reverse lookup in detail? I have tried to find how it works, but getting a bit confusing explanations.

Basically, when the recipient's SMTP server receives this message, does it:

i) Perform a reverse lookup on x.x.x.x and try to find out if this IP has a valid hostname and leaves it at that?

ii) Perform a reverse lookup on x.x.x.x and finds out the hostname (xyz2.com), and checks that xyz2.com is equal to xyz.com?

iii) Perform an IP lookup for xyz.com and checks that x.x.x.x is equal to this IP address?


Also, how does myuser@mydomain.com fit into this picture? Does the receiving SMTP try to match that with xyz.com and/or x.x.x.x?

I would appreciate it if someone can explain the details here...

Thanks...

peter_robb 10-24-2005 08:50 AM

To quote from the ever so lovely "Linux Email" book (Reviewed shortly!) ISBN 1-904811-37-X

All three are checked..

The ehlo provided by your email MTA server/client should be it's own fqdn.
So long your ip number reverse resolves ok, the receiving server has no reason to drop you so far.
You may get dropped if the reverse record doesn't match the ehlo hostname. (strict controls)

If you check your reverse dns, you may find your isp hasn't registered your hostname, rather their own.
In which case, change your hostname to match their name, or get your isp to update their dns records to your fqdn domain name.

Checks may also be made against the sender's domain dns A & MX records.
Mail from xyz.com should come from xyz.com's smtp servers..
If both of these records exist, and point back to your fqdn, that's ok.
An A record is the fqdn domain name, and MX is the mail server name.

There may be some more checks using SPF dns records, info at http://spf.pobox.com/

Then there are the usual block/blacklists and bad recipient addresses etc
Yahoo will only accept mail for it's domains, not for relay.

dcabbar 10-24-2005 04:26 PM

How does this work on shared hosting scenarios though? The domain part of mail sender's e-mail address never matches SMTP server and/or EHLO in these cases.

peter_robb 10-25-2005 04:37 AM

That's fine..
It doesn't need to match..
So long as there's a connection in dns between your email sender's domain name and the ip number of your server, with at least an A or MX record and also an SPF record, the spam checks will pass.

The A record isn't necessary as many sites have separate mail and other servers, but the MX and SPF records should point to your email server's hostname and ip address. These are enough proof that it's the correct server for the domain used as the sender's address.

dcabbar 10-25-2005 12:38 PM

I am a bit confused about this, and not sure if these checks are reasonable.

Suppose you are hosted on a share hosting with your own IP address, and you are using a clustered e-mail solution. Then, the SMTP, which is sending out the e-mail via web --i.e. PHP code--, will have a different IP then your own domain, and your MX records will be point to a different server. This is not an extreme stretch, and a typical configuration nowadays.

In this case, your e-mails that you send from your web page will be marked as SPAM according to what you are saying, right?

Thanks...


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