Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cPanel regular expression

Status
Not open for further replies.

arst06d

Programmer
Nov 29, 2002
324
Hi

Hope I found the correct forum for this query.

My hosting package uses cPanel (which I believe runs PERL) and I need to set up a mail filter using a regular expression.

I want to accept ONLY aaa@mydomain.com OR bbb@mydomain.com. Anything else is invalid.

At the moment I have this: (aaa|bbb)\@mydomain\.com$

How do I negate it so that anything other than this is rejected?
Can I make the test case insensitive?

Thanks
 
It might be easier to set those up as two email accounts and reject any unrouted emails. In other words you have to set all unrouted emails not sent to a specific/valid email address to be rejected in some way (returned or deleted or sent to spam/junk folder).

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
You're quite right - that's much easier. Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top