#!/usr/bin/perl -w use strict; my ($helo, $ip, $sender); $sender = 'tester@test.com'; $ip = '209.225.4.10'; $helo = 'intel1.peregrinehw.com'; if ($helo =~ /^[?(localhost|127.0.0.1)]?$/i && $ip ne '127.0.0.1') { #NOT YET IMPLEMENTED #return('REJECT', "Go away... $ip is not localhost");q &md_syslog('warning', "Considering Rejecting $sender because $helo ($ip) is invalid."); } if ($helo =~ /^(mail.pccc.com|mail.peregrinehw.com|intel1.peregrinehw.com|intel1.pccc.com)$/i && ($ip !~ /209\.225\.49\.\d{1,3}/ and $ip ne '127.0.0.1')) { #NOT YET IMPLEMENTED #return('REJECT', "Go away... $ip is not us");q &md_syslog('warning', "Considering Rejecting $sender because $helo ($ip) is invalid."); } if ($helo =~ /^[?209\.225\.49\.\d{1,3}]?$/ && ($ip !~ /209\.225\.49\.\d{1,3}/)) { #NOT YET IMPLEMENTED #return('REJECT', "Go away... $ip is not us");q &md_syslog('warning', "Considering Rejecting $sender because $ip is not $helo."); } exit; sub md_syslog { my (@params) = @_; my ($i); for ($i = 0; $i < scalar(@params); $i++) { print "$params[$i] "; } print "\n"; }