* Prashanth P.Nair <[email protected]>:
> Thanks for the advise.
>
> I found that we can achieve this using header_check .
>
> # restrict based on message header content header_checks =
> pcre:/etc/postfix/header_checks
>
> /etc/postfix/header_checks:
>
> /^To:([^@]*@){1,}/ HOLD Sorry, your message has too many recepients.
> /^Cc:([^@]*@){1,}/ HOLD Sorry, your message has too many recepients.
/^(Cc|To):([^@]*@){2,}/ HOLD Sorry, your message has too many recepients.
(because 1 recipient is surely not too much)
> But when i test on my server it is not working but postmap -q give me
> result.
>
> [root@test postfix]# postmap -q - pcre:/etc/postfix/header_checks <
> testpattern
> To:[email protected] HOLD Sorry, your message has too many recepients.
> To:[email protected] HOLD Sorry, your message has too many recepients.
> To:[email protected] HOLD Sorry, your message has too many recepients.
> and i don't see any error prints on m log,.
Why should it report an error?
--
[*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich