Hi All, Could someone please help me with these custom anti-spoofing rules I'm putting in?
I would like to drop all messages from <> not destined for [EMAIL PROTECTED] and am not sure whether I should do it through Sendmail or Mimedefang, or if the syntax below is correct. Also, because this is just an inbound mail gateway, most messages coming from [EMAIL PROTECTED] are going to be garbage (internal servers handle all mail from [EMAIL PROTECTED]), so we want to forward those messages to [EMAIL PROTECTED] for inspection without losing the original recipient info so that messages can be passed along if found to be legit. Is sub filter_sender the best place for both of these items? Here's what I came up with using the mimedefang-filter man page (keeping in mind my perl skills are lacking): ## sub filter_sender { my ($sender, $recipient, $ip, hostname, $helo) = @_; if ($sender =~ /^<\>$/) { if {$recipient =~ /^<[EMAIL PROTECTED]>?$/i) { return ('CONTINUE', "ok"); } return ('REJECT', 'We don\'t want your garbage.'); } # We also want to redirect messages with spoofed sender @mydomain.com if ($sender =~ /(^|[EMAIL PROTECTED]/i) { # Remove original recipients--We don't really want to remove the # original headers, just tell sendmail to redirect foreach $recip (@Recipients) { delete_recipient($recip); } # Send to spam address add_recipient('[EMAIL PROTECTED]'); } } Thanks for the help, Joe _______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang