Assuming you have a single/small list of domains, in filter_recipient:

$LocalRelayAddrs{"192.168.78.2"} = 1;   # me!
$LocalRelayAddrs{"127.0.0.1"} = 1;

my $mysender=lc($sender);
$mysender=~ s/[<>]//g;
my $myrecip=lc($recipient);
$myrecip =~ s/[<>]//g;
if (
     ($mysender=~ /mydomain.com$/i) &&
     ($myrecip =~ /mydomain.com$/i) &&
     (! exists $LocalRelayAddrs{$ip}) 
   )
  {
  action_notify_administrator("Message-id:    $MsgID\nSender:
$sender\nRecipient:     $recipient\nAddress:    $ip\nHostname:
$hostname\nHelo:        $helo\n\nBounced because an external party
claims to be us\n");
  # can't use graphdefang_log here...
  md_syslog('info', "MDLOG,$MsgID,Spoof,0,$ip,$sender,$recipient,?");
  return("BOUNCE","You are not one of our users, so you can't send as
us!");
  }

Best Wishes,

Paul.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to