Reject emails starting with numbers |
Post Reply ![]() |
Author | |
CyberBob ![]() Groupie ![]() Joined: 26 January 2005 Status: Offline Points: 43 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
keizersozay ![]() Groupie ![]() Joined: 26 January 2005 Location: United States Status: Offline Points: 77 |
![]() ![]() ![]() ![]() ![]() |
(([0-9].*@mydomain\.com))
try this. I haven't tested it yet though. |
|
![]() |
|
CyberBob ![]() Groupie ![]() Joined: 26 January 2005 Status: Offline Points: 43 |
![]() ![]() ![]() ![]() ![]() |
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: Bob@mydomain.com was ok 1bob@mydomain.com was blocked bob1@mydomain.com was also blocked?? How do I fix that?? |
|
![]() |
|
keizersozay ![]() Groupie ![]() Joined: 26 January 2005 Location: United States Status: Offline Points: 77 |
![]() ![]() ![]() ![]() ![]() |
(([0-9]\D+?@mydomain\.com)) this should work. again, I have not tested this. here is the explanation Non-capturing Group |
|
![]() |
|
CyberBob ![]() Groupie ![]() Joined: 26 January 2005 Status: Offline Points: 43 |
![]() ![]() ![]() ![]() ![]() |
Now we aren't capturing anything? Everything works They way I read this I thought it was ONLY looking for numbers so I thought for sure 1@mydomain.com would be blocked but it went through also?
|
|
![]() |
|
CyberBob ![]() Groupie ![]() Joined: 26 January 2005 Status: Offline Points: 43 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
benny ![]() Guest Group ![]() |
![]() ![]() ![]() ![]() ![]() |
What if I want to block any incoming email with FROM EMAIL has a number?
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.184 seconds.