Regular Expressions

Hi Everyone,

I was hoping I could get some help here for an email problem. My friend owns a one word domain which is getting 1000+ spam emails every hour. All these emails are getting delivered to the default (catch all) email address (his cpanel login). This is causing his disk space quota to fill up and emails to his actual mailboxes for that account are not getting delivered. I enabled spam assassin but that hasn't had much of an effect on it. So I was trying to setup some regular expressions hoping that would cut down the spam.

He only has two mailboxes:

gary@domain.com
cheryl@domain.com

I want all emails not addressed to these mailboxes to be rejected. So I started setting up regex's to reject any emails going to a mailbox starting with letters a,b,d,e, and so on (all 24 other letters).

The regex's I used were as follows:

a.*@domain.com
b.*@domain.com and so on...

I'm assuming I have the regex setup incorrectly because this seemed to catch the emails going to those 2 mailboxes mentioned above and rejecting them. The way I understood it
a.* means starting with the letter 'a' followed by zero or more of any other characters ending with @domain.com

Do I have this incorrect? I would really appreciate any help I can get on this.

Thanks!
Haider

 

 

 

 

Top