Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
milter.hsl

README.md

milter_v2(options, senderip, senderport, senderhelo, sender, recipients, fp)

Implementation of the Milter protocol v2. It's tested with clamav-milter, however minor changes may allow it to connect to other servers as well.

$opts = ["host" => "1.1.1.1", "port" => 3381, "timeout_eod" => 15];
$fp = GetMailFile();
$result = milter_v2($opts, $senderip, $senderport, $senderhelo, $sender, $recipients, $fp);
if (is_array($result))
  foreach ($result as $r)
	  echo $r;

clamav-milter

When using clamav-milter, you should use AddHeader Replace in the clamav-mitler.conf and parse the "h" response array item from milter_v2 for viruses.