On 12/18/2008 at 4:44 PM, "Amedee Van Gasse"
wrote: Hello, I have a question about Postfix header checks and regular expressions. In my main.cf I have:
header_checks = regexp:/etc/postfix/maps/header_checks
and in header_checks I have:
/^[To|Cc]:.*,.*,.*,.*,.*,.*,.*,.*,.*,.*$/ REJECT Too many recipients. Please use BCC.
What's wrong here?
.* is catching as much as possible... so from the beginning to the end of the string. then there is no comma left, so the regex does not match. you'll probably need something slightly more complex, like (fully untested and out of my empty head): /^[To|Cc]:[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,.*$/ The last one I left intentionally on .*, as at this point we don't care about more commas anymore. Maybe somebody else can give you even nicer ideas, maybe this one does not work at all, maybe it deletes all your mail. Dominique -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org