RegEx for TO Mail |
Post Reply
|
| Author | |
Chris
Guest Group
|
Post Options
Thanks(0)
Quote Reply
Topic: RegEx for TO MailPosted: 03 February 2004 at 4:58am |
|
Hi forum, I have a short question: What kind of RegEx do I have to use if i want to filter out just single names @domain (e.g. john@domain.com or maria@domain.com) because all of our users have adresses like j.foremann@domain.com so i would like to filter out other adress-formats before. Thanx alot Chris Dargel |
|
![]() |
|
Desperado
Senior Member
Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2004 at 2:15am |
|
If you do not have very many domains, this is easily handled by looking at it in reverse, Do not try to block INVALID addresses with the black lists; ... rather allow VALID address with the "authorized to addresses" list. I have not tried this because I nnhave over 200 domains and none of them follow any nice pattern at all but I am fairly sure this RegEx will do the trick. For example: ((.){1,}[\.](.){1,}(\@domain.com)) will match anychar(s) followed by a "dot" followed by anychar(s) followed by "@domain.com) I hope this helps you. Regards, Dan S. |
|
![]() |
|
Chris
Guest Group
|
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2004 at 6:00am |
|
Hi Dan, thank you very much, i think this will work. I should add administrator@, postmaster@ and abuse@, too and everything will be fine . By the way, what dyou think about something like a RegEx Mailing list? Regards, Christopher
|
|
![]() |
|
Desperado
Senior Member
Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2004 at 6:41am |
|
Christopher, Just so long as you don't think I am some sort of RegEx expert. I do OK but often get stuck trying to do something that SHOULD be simple. This is using Delphi's (I believe) RegEx "Engine" and I am more used to Perl. Close but get's me into trouble sometimes! Dan S. |
|
![]() |
|
Chris
Guest Group
|
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2004 at 9:53am |
|
Dan, I ve read a lot of your forum postings before. Many of the people here think you`re a RegEx expert (me, too :) ) Former the 'Dan's Reg Ex postings' usually did work very well on our several Spam Filters until you stopped posting because of abuse through spammers. I think it would be a good idea to create such a mailing to cooperate in fighting against spam. Many people (me included) aren`t as good as you in creating e.g. RegEx so it would be a great help for workin with SpamFilter... My problem is: I am not programmer at all ;-) Regards Christopher Dargel |
|
![]() |
|
Sean
Groupie
Joined: 21 February 2005 Location: United States Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 February 2004 at 11:50am |
|
Message to Dan, I know you wish not to be called the expert, but I must agree, your Sample RegEx keyword list does wonders. I had mentioned before That I would be glad to host out the file, to prevent any abuse you may recieved, we have a dedicated connection that is not in use for anything here, in fact, I used to run an unofficial forum to help create the blacklist files, It wasnt used much, but did help for a while. Let me know if you would want to put together something to help the others out. At the same time it may help us as well. I have a quite simple way to dish out a running blacklist to users, and since the files arent too big the bandwidth is no big deal, plus I'm not using the connect for anything else. Let me know. If anyone else would like to suggest, or help out, also let me know.
Sean |
|
![]() |
|
Desperado
Senior Member
Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 February 2004 at 7:54pm |
|
All, I have no issue at all sharing my RegEx's. The problem I see is that if we make things too public, then there is a good chance that would-be Spammers can see what we are doing and revamp their SpamWare to get past our filters. As it is, Spam is a moving target. Any ideas? I ALWAYS am interested in new RegEx examples. Being an ISP, we can't "Censor" inbound mail so our goal it to catch the tricky methods used to bypass normal keyword filtering. That is what separates the men from the boys ... or to be more politically correct, the adults from the kiddies! Dan S. |
|
![]() |
|
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.203 seconds.


Topic Options
Post Options
Thanks(0)


