#!/usr/bin/perl -w

# postfix header_checks file, set what you use
$head = "/etc/postfix/header_checks";

open (HEADER, $head) || die "can't open $head! modify the variable inside the script!\n";
while (<HEADER>) {
	chomp;
	($row = $_) =~ s/\/ .*$//;
	$row =~ s/^\///;
	push @rules,$row;
}
close HEADER;

while (<>) {
	foreach $rule (@rules) {
		print "this line $_ match this rule: $rule\n" if ($_ =~ /$rule/i);
	}
}
