The MTA for large-scale email services

Halon offers a flexible security and operations platform for email in transit.

If you run large scale email services, Halon MTA will make you more competitive. This, by secure and timely delivery of important emails and rapid feature implementation.

At the same time, you will cut your development and maintenance costs by half.

Click on words for a detailed view
if ($message["transportid"] === "bounces")
    Try(["protocol" => "smtp"]); // Use SMTP for locally generated DSNs
// Use a more robust lookup like https://wiki.halon.io/API_calls
$route = cache ["ttl" => 3600] http("$apiurl/route", [], [$message["recipientaddress"]["domain"]]);
$route = json_decode($route);
if (!is_array($route))
    Queue(["delay" => 3600, "reason" => "Invalid route", "increment_retry" => false]);
Try(["protocol" => "lmtp", "server" => $route["storage"]]);
$options = [];
if (GetMetaData()["spam"] == "yes") {
    $options["sourceip"] = ["4"]; // Bulk IP
} else {
    // Source hash
    $addrs = ["1", "2", "3"];
    $sourcehash = number("0x".md5($message["senderaddress"]["domain"])[0:6]);
    $options["sourceip"] = [$addrs[$sourcehash % length($addrs)]];
}
Try($options);
// In the post-delivery script
$senderdomain = $message["senderaddress"]["domain"];
$errorcode = $arguments["attempt"]["result"]["code"];
if ($errorcode >= 400)
    rate("delivery-failures", $senderdomain, 1000, 3600);

// In the MAIL FROM script
$senderdomain = $arguments["address"]["domain"];
if (rate("delivery-failures", $senderdomain, 0, 3600) > 999)
    Defer("$senderdomain has more than 1000 failed deliveries during the last hour");
// Per-domain DKIM signing using external database
// Use a more robust lookup like https://wiki.halon.io/API_calls
$dkim = cache ["ttl" => 86400, "size"=> 32768, "ttl_override" => ["" => 60]]
    http("$apiurl/dkim/$1", ["timeout" => 10], [$transaction["senderaddress"]["domain"]]);
$dkim = json_decode($dkim);
if (is_array($dkim))
    $arguments["mail"]->signDKIM($dkim["selector"], $dkim["domain"], $dkim["rsakey"]);