Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authenticated Received Chain (ARC)

An ARC implementation based on rfc8617.

Installation

Follow the instructions in our manual to add our package repository and then run the below command.

Ubuntu

apt-get install halon-extras-arc

RHEL

yum install halon-extras-arc

Example

import { dmarc } from "extras://dmarc";
import { AuthenticationResults } from "extras://authentication-results";
import { ARC } from "extras://arc";

$spf = spf_query($connection["remoteip"], $connection["helo"]["host"], $transaction["senderaddress"]["domain"]);
$dmarc = dmarc($arguments["mail"], $connection["remoteip"], $connection["helo"]["host"], $transaction["senderaddress"]["domain"]);

$chain = ARC::chainValidate($arguments["mail"]);
if ($chain["status"] == "pass" or $chain["status"] == "none")
{
	ARC::seal($arguments["mail"],
			"201805", "example.com", "arc",
			$chain,
			AuthenticationResults()
				->SPF($spf, $connection["helo"]["host"], $transaction["senderaddress"]["domain"], ["smtp.remote-ip" => $connection["remoteip"]])
				->DKIM($arguments["mail"])
				->DMARC($dmarc)
				->addMethod("arc", $chain["status"], ["header.oldest-pass" => $chain["oldestpass"] ?? "0"])
				->toString(),
			["id" => true]
		);
}

About

Authenticated Received Chain (rfc8617)

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Contributors