From: (no name) (no email)
Date: Tue Feb 24 2004 - 11:52:18 EST
On Tue, 24 Feb 2004 wrote:
> We would like to enforce a policy within our environment that would
> limit the number of recipients <To:/CC:> within an e-mail. We have
> postfix deployed to handle outbound SMTP on behalf of Exchange and
> would like to utilize it to enforce such a policy. For instance, if a user
> used an Outlook client to compose a message to 50 different recipients
> within an e-mail then we would like postfix to prevent the delivery of
> this message.
>
This is rather unwise, but if you must:
header_checks = pcre:/etc/postfix/hcheck
hcheck:
/^(To|Cc):([^,]*,){50,}/ REJECT
This will count commas in the Display name too, a more complex PCRE
pattern can ignore commas in quoted strings.
/^(To|Cc):((\x22([^\x22\x5c]|\x5c[\x22\x5c])*\x22|[^\x5c\x22]|\x5c[\x22\x5c])*,){50,}/
REJECT
-- Viktor.
|
|
|