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.
I *think* that this means: * Check for a header that starts with either "To" or "Cc". * any string, followed by a comma (email address separator) * check for 9 comma's or 10 strings (addresses)
In other words, if you send me an email and you over-abuse the To or CC-field, your mail will be rejected with the message "Too many recipients. Please use BCC."
I want to do this because I'm tired of educating always the same people. I don't want emails (usually chain mail or "funny powerpoints") where the receipient list is longer than the actual message. Even if it's from family.
Unfortunately, it doesn't seem to work. Mail with more than 10 people in the CC is still getting trough.
Try this instead: /^(To|Cc):([^,]+,){9}/i REJECT Too many [] = character class () = grouping /Per -- /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org