
![]() |
JasonD
... 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 perkiset
Depends.
Yes, you can cache the MX and you can go directly to the recipients server - I have a nice little PHPclass for doing all that if you wish. HOWEVER: I found my actual delivery rates going WAY down bymachines 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 mymachines 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 JasonD
Thanks Perk.
So the takeaway points I have learnt about this project areGet 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 perkiset
NW - looking forward to sampling the secret sauce
![]() |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads