Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Email is critical to us and some in the office are very sensitive to the speed at which emails are delivered or received. I am looking for suggestions on a service/product that can do the following:

  • Send an email from an outside source to an internal mailbox.
  • Track the time it takes for the email to be received and make its way to the box.

And conversely:

  • Send an email from an internal mailbox to a 3rd party.
  • Track the time it takes for the email to be received and make its way to the box.

It would also be great to be able to specify a certain payload to more closely mimic a real email.

I'm also open to setting up my own system though I would like some suggestions on how to accomplish that before I dive into doing it.

share|improve this question
'some in the office' need to understand that email isn't a guaranteed delivery service, and that according to the standards that govern how it works, email delivery across the Internet isn't 'late' until a few days after it was submitted. – RobM Mar 1 '12 at 6:22
I'm afraid that simply won't do. – idon'twearsuits Mar 1 '12 at 7:01
That's nice and all and I've been told "that simply won't do" in the past myself, but that doesn't alter the fact that email is delivered by SMTP and SMTP works the way that SMTP actually works, not the way that people would like it to work. I'd be surprised if you could find a reputable service that measured this because the results would be meaningless; the delivery time for one email has no bearing on the delivery time of the next one. – RobM Mar 1 '12 at 7:10
up vote 2 down vote accepted

Since "it won't do" explain to them how SMTP works and why it cannot do what they want by design. Then install Openfire or some other XMPP server and switch to instant messaging for the kind of work that some in the office need guarantees in delivery time.

Like sysadmin1138 wrote "Email is not IM"

BTW, to track the time it takes for the email to be received and make its way to the box, you can examine the Received: headers of each individual mail.

share|improve this answer
This was just me testing the waters so to speak. I haven't been able to get a hold of the problem email yet. It was received by our spam filter, inside the network, 2 hours before it went BING in Outlook. I may be able to get my answer with some basic investigation but, again, I was testing the waters on this. – idon'twearsuits Mar 1 '12 at 8:04
I think your suggestion of relying on the data that's already available is about as good as it's going to get. – idon'twearsuits Mar 1 '12 at 18:06

SMTP is a best-effort delivery system and it can take quite some time. Especially these days when there are several content filters between the sender and receiver. Many mail systems don't bother sending a delivery-delay notice until 4 hours after the mail was sent, and I (like you, I'm sure) know of a few users in the office who notice when something takes longer than a minute to get to where it's going.

I have been known to chant:

Email is not IM

To people on occasion. Such as managers, when asked to find out why a slow delivery happened for a Grand High Manager.

Since you're on Exchange, I'm betting you want a system that'll mark the message arrived when it lands in the user's MAPI mailbox and makes Outlook go Bing.

I personally don't know of such a system off-the-shelf, but one can be written if you wish. Microsoft makes no secret about how to interface with Exchange via .NET code, and it would be pretty easy to write something to send a message via one of the Freemailers out there once every 15 minutes or so and see when it arrives.

But that only checks the mail path between the freemailer and you. Mail delays happen at the source, i.e. out of your control, much more often than internally. And that, unfortunately, can't be monitored for effectively. If your goal is to provide a chart to get a manager off your back, then that's a victory condition. But if you're looking for an honest metric of mail delivery times to your mail system, I'm afraid you're out of luck.

share|improve this answer
Just to add on to this, shows that even the time between arriving in the user's MAPI mailbox and when that makes Outlook go Bing can be problematic. – RobM Mar 1 '12 at 7:15
Unfortunately, to my detriment, some people don't accept "that's just how things work" as an answer when everything is considered "critical". – idon'twearsuits Mar 1 '12 at 8:02
@cparker4486 I have worked with/for those kind of people. You have my sympathy. – sysadmin1138 Mar 1 '12 at 12:12

Quick and dirty script to check email turnaround time.

Required PHPMailer -

# emailcheck.php
# v1.0
# script to check email deliverabiltiy time
# Tibor Szentmarjay

# test email address
$test_email = "";
$test_name = "Delivery Test";

$smtp_server = "";
$smtp_user = "";
$smtp_pass = "mypass";

$from_email = "";
$from_name = "myname";

$imap_server = "";
$imap_flags = "/novalidate-cert";
$imap_user = "";
$imap_pass = "mypass";

$timeout = 1200;    // seconds

# How it works?
# - generate unique ID
# - send email through SMTP
# - check mailbox though IMAP


$unique_id = uniqid();

# sending the email

$mail = new PHPMailer();

    $mail->SMTPDebug = 1;
    $mail->Subject = $unique_id;
    $mail->IsSMTP(); // telling the class to use SMTP
    $mail->Host = $smtp_server; // SMTP server
    $mail->From = $from_email;
    $mail->FromName = $from_name;
    $mail->Sender = $from_email;

    $mail->SMTPAuth = true;  // authentication enabled
    $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
    $mail->Port = 465; 
    $mail->Username = $smtp_user;
    $mail->Password = $smtp_pass;

    $mail->Body = $unique_id;
    if(!$mail->Send()){ print " Mailer Error: " . $mail->ErrorInfo;} else { $sending_time = time(); }

# end sending the email 

# checking the mail

$criteria = "SUBJECT \"$unique_id\"";
do {
    # connect to the server (needed everytime to refresh the message list)
    if ( ! $mbox = imap_open("{}INBOX",$imap_user,$imap_pass) ) { print "Cannot open $imap_server."; print_r(imap_errors()); exit(1); };
    # search for the sent mail
    $message = imap_search($mbox,$criteria);
    if ($message) imap_delete($mbox,$message[0]);
    $final_time = (time()-$sending_time);
while ($message === false && $final_time < $timeout);
# message arrived or timeout

# print time
echo $final_time;

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.