Archive for the ‘Hurricane MTA Server’ Category

Webinar to Highlight New Features of Hurricane MTA Server

Thursday, July 9th, 2009 by John Alessi

Please join us for a free webinar which will highlight the new features of Hurricane MTA Server released in June and how they can be used to protect your reputation and increase your email deliverability. The webinar will be offered at two dates/times:

Tuesday July 14th 4PM EDT (click here to register)
Tuesday July 21st 9AM EDT (click here to register)
Wednesday July 29th 2PM EDT click here to register)

Space is limited, so please reserve your seat now.

Feedback Loop Processing and Reporting in Hurricane MTA Server

Thursday, July 9th, 2009 by John Alessi

One of the biggest updates in the new release of Hurricane MTA Server is built in feedback loop report processing. If you are not familiar with feedback loops, it is primarily used as a mechanism for ISPs to notify senders of the recipients that are reporting their mail as spam. Since these spam complaints damage your reputation and hurt your deliverability, it is imperative that the recipients responsible for the complaints be removed from your list immediately.

This has not been an easy task in the past, but with the new features in Hurricane MTA Server it just became a whole lot easier. Hurricane MTA Server is now capable of intercepting feedback loop report messages from ISPs, which it will automatically analyze and process. The results of the analysis of each feedback loop report received are logged, passed to a new plugin API event and also included on the brand new built-in feedback loop report.

Feedback Loop Report

Feedback Loop Report

A new plugin API event (courtesy of the new IDynamic plugin interface) can also be handled to push the results right out to your own databases in real-time.

Hurricane MTA Server’s feedback loop API makes it possible to have the recipients that flag your mail as spam, removed from your address list in real-time! Imagine what that will do for your deliverability!

Hurricane MTA Server has the ability to process feedback loop reports that are in the Abuse Feedback Reporting Format (ARF) such as Aol, Yahoo, Comcast and others as well as non ARF feedback loop reports from Hotmail and MSN.

Feedback loop reports are specific to each ISP so you must sign up with each ISP separately. Normally you are required to fill out a form on each ISP’s web site proving that you are the owner of the IP addresses you wish to monitor and providing an email address to send the reports to. Once your feedback loop is setup with the ISP, you must configure Hurricane MTA Server to accept and process the messages.

The email address you choose must have its mail exchange set to the IP of your Hurricane MTA Server and Hurricane MTA Server must be configured with the same address so that it knows to accept the messages. Feedback loops are configured in Hurricane MTA Server in the new FBL tab of the account settings. Once setup correctly Hurricane MTA Server will start accepting the reports and parsing them.

Feedback Loop Configuration

Feedback loop configuration is per account.

When feedback loops are processed the results can also be put into a feedback loop log file (enabled in account log file settings) or processed by your code in real time with the new feedback loop plugin API event

See our list of feedback loop signup links.

Good luck!

New Plugin API Interface for Hurricane MTA Server Expands Integration Potential Infinitely

Thursday, July 9th, 2009 by John Alessi

Hurricane MTA Server’s event-driven plugin API has long been one of its greatest features and strengths. It enables real-time event-driven integration and data push capabilities never before seen in an MTA. Interfaces like IOutboundSMTPConncetion and its OnSent(), OnFail() and OnDefer() event methods allow developers to handle real-time events with .Net code just as easy as handling an OnClick() or Page_Load() event in other .Net apps.

These “pre-casted” event methods are easy to use, but unfortunately they are pretty much immutable. Due to the limitations imposed by the architecture of .Net we can not extend these methods or interfaces without breaking the original interface and forfeiting its backwards compatibility – and the backwards compatibility of the Hurricane MTA Server plugins you have developed.

Our answer to this is the new IDynamic plugin interface. Unlike the other interfaces supported by the Hurricane MTA Server plugin API, the IDynamic interface contains only one method, OnDynamicEvent().

object OnDynamicEvent(DynamicEventId eventId, ref Dictionary eventParams)

OnDynamicEvent() and its parameters are generic. Hurricane MTA Server can trigger this method for any type of event, which it identifies by the eventId parameter and can pass an unlimited number of parameters via the eventParams dictionary object.

Additionally since eventParams is passed by reference, plugins can add to or modify the values it contains as a way of instructing Hurricane MTA Server to do something differently. The return value of OnDynamicEvent is an object type which further enables plugins to return rich information to Hurricane MTA Server where applicable.

IDynamic is much less rigid than the other Hurricane MTA Server API interfaces and the benefit becomes clear when you realize that now we can add infinite levels of functionality to the API without breaking the interface – or your existing code!

Lets take a look at a simple implementation of the IDynamic interface.

public class Feedbackloop : PluginBase, IDynamic
{
     public object OnDynamicEvent(DynamicEventId eventId, ref Dictionary eventParams)
     {
         if (eventId == DynamicEventId.Init)
         {
             eventParams["OnFirstConnection"] = 1;
         }
         if (eventId == DynamicEventId.OnFirstConnection)
         {
             //do work here to handle OnFirstConnection event
         }
         return null;
    }
}

The first thing you will notice is that since the OnDynamicEvent() method can be called for any number of events, we are checking the eventId parameter to see which event is actually being fired.

One event that we must handle in every OnDymanicEvent() implementation is Init. OnDynamicEvent() will be called with the eventId parameter set to DynamicEventId.Init the first time OnDynamicEvent() is called after the plugin is loaded. The Init event must be handled to instruct Hurricane MTA Server to call OnDynamicEvent() for other events that you want to handle. This is for performance as it would not be efficient for Hurricane MTA Server to call OnDynamicEvent() for every event it supports, even if you are not building a handler for it.

When the Init event is fired, eventParams will contain an item for each of the events supported by OnDynamicEvent(). You must handle the Init event and set the value to 1 for each event you want fired.

In the above example we are setting the value of the eventParams dictionary item OnFirstConnection to 1, to indicate that we are going to handle the OnFirstConnection event. OnFirstConnection is an event that is fired just before a new connection is made to an ISP.

             eventParams["OnFirstConnection"] = 1;

This is how we tell Hurricane MTA Server to fire OnDynamicEvent(). Below is another way of doing the same thing. It is not as clean looking but is more error proof because the event identifier is being taken from a predefined enumeration.

             eventParams[DynamicEventId.OnFirstConnection.ToString()] = 1;

Lets expand the sample with some more code that will actually do something each time the OnFirstConnection event is fired. First, I need to tell you a bit more about the OnFirstConnection event.

Keep in mind that OnFirstConnection is one of many events that can be handled by the IDynamic interface and was randomly chosen for this example. IDynamic can also be used to handle OnFail, OnSent, etc… as well as other events. The power of IDynamic is that we are now able to add more events, and extend existing events the plugin API without disturbing backwards compatibility. In that same spirit, all of the old API interfaces such as IBounceProcess and IOutboundSMTPConnection, are all still supported so your old plugins will continue to run as usual.

OnFirstConnection is called when a connection is about to be made to an ISP. The eventParams parameter will contain the following items:

Key Value
(out string) AccountId The id of the account making the connection.
(out string) Domain The domain the connection is being made to.
(out string) LocalIp The local ip address that is connecting out.
(in/out StringDictionary) DeliveryRule The delivery rule settings being used.

By handling the OnFirstConnection event, we can modify the DeliveryRule dictionary object, changing the delivery rule for this ISP in real time.

public class Feedbackloop : PluginBase, IDynamic
{
     public object OnDynamicEvent(DynamicEventId eventId, ref Dictionary eventParams)
     {
         //Tell the system we only want to get feedback loop events.
         if (eventId == DynamicEventId.Init)
         {
             eventParams["OnFirstConnection"] = 1;
         }
         if (eventId == DynamicEventId.OnFirstConnection)
         {
             if (someConditionExists)
             {
                 StringDictionary rule = eventParams["DeliveryRule"];
                 rule["Action"]="Defer";
             }
         }
         return null;
     }
}

In this example, if the variable someConditionExists evaluates to true, then we set the delivery rule action to “Defer”. This changes the delivery rule in the Hurricane MTA Server process to defer all email which is subject to this delivery rule until the action is changed back to “Normal”. Keep in mind that this only affects the delivery rule in memory and not the value in the configuration file for this rule. That means that restarting the server will cause the action to revert back to the value in the config file (since the config file is reloaded when the server starts), which is in most cases “Normal”.

So, you might be asking, why would I want to write a plugin to change a delivery rule’s action to “Defer”? Well one reason would be if you wanted to write some code to monitor the responses you receive from ISPs and change your delivery rules based on those responses. For example you could also handle the OnFail event to monitor the responses and then keep some state as to how you want to change the delivery rule for that ISP the next time a connection attempt is made. If an ISP response indicated that you were being blocked, you might want to automatically start deferring email to that ISP. By coding this way you can add your own strategic logic to the delivery process. Not all of our customers get this involved with the API, but a few power users do – and exploit it to great benefits.

Our goal is to make it possible to extend the software according to customer needs, and each of our customers have different needs. The IDynamic interface allows us to satisfy our customers diverse, yet important needs today and far into the future.

The IDynamic interface is a part of the current SDK which is included in the latest production version of Hurricane MTA Server released in June 09. Its documentation and samples can be found in the plugins directory of your Hurricane MTA Server installation.