From: "Per Jessen"
david rankin wrote:
Uhh... I'm a little hesitant to answer, because I'm not sure what "regular" means in this case. I'm mean, I can hande "regular" anything as long as I have a man page that tells me what the syntax is : - ).
OK, that says enough. A "regular expression" is a pattern used for, well, pattern matching :-) - it uses a particular syntax.
Create a file called /etc/postfix/recipient_check.pcre :
/^support@[domain1|domain2|domain3....]$/ REJECT
This should be read to mean: if the recipient-address begins with "support@" followed by "domain1" or "domain2" or "domain3" followed by end of line, then REJECT. The ^ says to match the beginning of line, the $ to match the end.
The // delineate the expression - if you need to use / in the expression itself, you can escape it using \
Regular expressions are very powerful and occasionally incredibly complex. I have found this site to be very helpful in the past:
http://www.regular-expressions.com/
Feel free to ask again - I know I found regexes to be pretty complex beasts in the beginning, but it doesn't take long to get the idea.
Thanks Per, Yes, I'm cool with most of the BASH regular expressions. I didn't know the "^ and $" parts though. I'll give it a try and let you know...... -- David C. Rankin, J.D., P.E. RANKIN LAW FIRM, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 (936) 715-9333 (936) 715-9339 fax www.rankinlawfirm.com --