The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 17, 2019, 05:39:57 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: What is the quickest....  (Read 2859 times)
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« on: August 29, 2007, 04:00:31 PM »

... way to get an email to the remote smtp server ?

I am half way through a project where speed is a major issue. 0.01 seconds can be the difference between success and failure.

One major part of the project is sending of an email, or rather ensuring that it is received ASAP. I have covered the basics like ensuring that the server hosting the application is as close as possible (2 hops) away from the receiving server etc but is there a speedier way of getting the email out to the recieving server ?

I am thinking of bypassing normal email programs like sendmail & not using the normal SMTP server because I have a niggling thing at the back of my mind of the SMTP protocol and that if you know the SMTP server responsible for receiving the email (All MX records can be cached in this system) you can send direct to that SMTP server.

Am I wrong or is there yet another quicker route I should be investigating ?

Thanks everyone.

Jason
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: August 29, 2007, 04:28:56 PM »

Depends.

Yes, you can cache the MX and you can go directly to the recipients server - I have a nice little PHP class for doing all that if you wish. HOWEVER: I found my actual delivery rates going WAY down by machines that did this if there were not listed as the MX of record for <the domain I was sending from> in fact, I went from about 95% delivery to less than 50% because of the fact that my machines were not the MX of record. Additionally, some providers like Cox denies SMTP providers entirely - I just started getting a "sender failure" whenever I tried to go directly to them.

Fix: If the machine you can send from is the MX of record you'll do well. If the servers you are sending from are firewalled or load balanced behind an address that is listed that's fine too. You may also want to see if your ISP will support the new Microsoft Sender Protection Framework text lines in the DNS record - if you are the MX AND have that, you'll be good as gold.

Then, yes - if you have the MX cached and go right to the recipient server you can get it there lickety split. If you go through a standard SMTP relay you're in the queue and have no control of when it will actually get to sending.

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« Reply #2 on: August 30, 2007, 02:52:51 PM »

Thanks Perk.

So the takeaway points I have learnt about this project are

Get as damn close as you can to the recipient server.
Send direct to the destination mail server
Make sure you have a reverse PTR for the email sending server IP and that it matches the domain you are sending from
Add standard TXT records in the DNS for both SPF (which is damn simple to implement btw and lovely to do )
Cache MX records
Make sure you send the email from a domain that the MX records have been delegated to

And one final thing which is some secret sauce but will explain on personal request.

Cheers for confirming my thoughts Ed
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: August 30, 2007, 03:42:51 PM »

NW - looking forward to sampling the secret sauce Wink
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!