[Mimedefang] filter recipient regex

Paul Houselander housey at sme-ecom.co.uk
Wed Nov 21 08:53:56 EST 2007


Hi

Sorry if this is maybe a more perl related question.

I get a lot of dictionary attacks for a particular domain and there always
in the format

s172hsgw.876 at custs.dom.com

i.e. "s" + 7 alpha numeric chars + "." + 3 alphanumeric chars + @domain

I relay onto an old groupwise server that I cant verify the recipient
against with md_check_against_smtp_server.

Im trying to write some code to reject this address so far ive come up with
(in the sub filter_recipient)

my($recip,$sender,$ip,$host,$first,$helo,$rcpt_mailer,$rcpt_host,$rcpt_addr)
= @_;

if($recip =~ /<?s([0-9a-z]{7}).([0-9]{3})+(\@custs\.dom\.com)>?/){
 return ("REJECT","No such user","550","5.1.1");
}

but it doesnt work, can anyone help/suggest what I should be doing?

Kind Regards

Paul




More information about the MIMEDefang mailing list