Print Page | Close Window

Reject emails starting with numbers

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4652
Printed Date: 09 May 2025 at 1:05am


Topic: Reject emails starting with numbers
Posted By: CyberBob
Subject: Reject emails starting with numbers
Date Posted: 29 November 2004 at 12:39pm

Can someone help me with the Regex to reject any email that starts with a number or a number of numbers.

As we all know spammers make up emails and the filter is stopping them but now I'm getting a request to reject any email that starts with numbers on a certain domain.

In the "Reject To" list I tried:

[0-9]*@mydomain.com

but it started blocking everything and I see the star is doing that. How do I specify starting with numbers @ a domain.

Thanks in advance,

Bob




Replies:
Posted By: keizersozay
Date Posted: 29 November 2004 at 2:00pm

(([0-9].*@mydomain\.com))

 

try this. I haven't tested it yet though.



Posted By: CyberBob
Date Posted: 30 November 2004 at 2:35pm

Close but not quite.

Yes it blocks any email with a leading number but it also blocks any email with a number in it??

Example:

mailto:Bob@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - Bob@mydomain.com was ok

mailto:1bob@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - 1bob@mydomain.com was blocked

mailto:bob1@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - bob1@mydomain.com was also blocked??

How do I fix that??



Posted By: keizersozay
Date Posted: 30 November 2004 at 2:56pm

(([0-9]\D+?@mydomain\.com))

this should work. again, I have not tested this.

here is the explanation

Non-capturing Group
  Non-capturing Group
    Any character in "0-9"
    Any non-digit
    + (one or more times) (non-greedy)
    @mydomain.com
  End Capture
End Capture



Posted By: CyberBob
Date Posted: 30 November 2004 at 3:30pm

Now we aren't capturing anything? Everything works

mailto:Bob@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - Bob@mydomain.com

mailto:Bob1@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - Bob1@mydomain.com

mailto:1bob@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - 1bob@mydomain.com

mailto:1@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - 1@mydomain.com

They way I read this I thought it was ONLY looking for numbers so I thought for sure mailto:1@mydomain.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - 1@mydomain.com would be blocked but it went through also?

 



Posted By: CyberBob
Date Posted: 30 November 2004 at 4:55pm

Ok thanks for helping me get started but this is tested and working:

([0-9][a-z]+@mydomain.com)

I saw you did a double capture, do I need to?

Thanks for the help!!

Bob



Posted By: Guests
Date Posted: 13 December 2004 at 4:20pm
What if I want to block any incoming email with FROM EMAIL has a number?



Print Page | Close Window