Wednesday, August 6, 2008

External (outbound/inbound) eMail Verification

Given that MOM can only verify internal email, I was asked if there was a way to verify delivery of external bound email and receipt of external email. Following is a high-level description of a low-tech solution (using 2 scheduled PowerShell scripts).

  1. Scheduled PowerShell script that runs every 15 minutes that sends a specifically formatted email to gMail and GMX (a great Webmail!). The PowerShell script uses Send-SMTP from PSCX.
    Send-SmtpMail `
    -SmtpHost '###.osumc.edu' `
    -To '####@gmail.com' `
    -From '####@osumc.edu' `
    -Subject 'Cryptic text here' `
    -AttachmentPath 'D:\File.txt'

  2. gMail and GMX have advanced filtering capabilities. In this case, both look for the specifically formatted email. Once received, it sends back to our domain and is deleted.

  3. Email traverses through spam filter and then to final destination.

  4. Using custom Outlook rule/script, we look for the above email. When received, it places the email attachment into a file share and deletes the email. This is the weakest step in that it assumes 24/7 on an email client. I will be looking into a better way to do this step.

  5. The second PowerShell script looks for the LastWriteTime of the file that was stripped from the email and placed into the fileshare. If the interval is greater then 15 minutes, an event log entry is made.

    $c = New-TimeSpan ((Get-Item c:\ProductionScripts\eMailVerification\InBoundAttachment.txt).LastWriteTime) $(Get-Date)
    [
    int]$d = $c.TotalMinutes
    if ($d -gt 10)
    {
    $log
    = New-Object -Type System.Diagnostics.EventLog -ArgumentList Application
    $log.Source
    = "eMailVerification"
    $log.WriteEntry(
    "External eMail is taking $d minutes")
    }


  6. MOM then picks up the event and responds accordingly.

There are many different ways we can take this. I am considering parsing the email headers to grab the time-stamps. With these, I can potentially use PowerGadgets to create some dashboards.

1 comment:

Email Verification Software said...

Hello friends

i am really happy with us, after reading this information related to
email verification or email validation.