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.



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:t...@example.com     HOLD Sorry, your message has too many recepients.
To:t...@example.com     HOLD Sorry, your message has too many recepients.
To:t...@example.com     HOLD Sorry, your message has too many recepients.

and i don't see any error prints on m log,.


On Fri, Nov 2, 2012 at 11:38 PM, Noel Jones <njo...@megan.vbhcs.org> wrote:

> On 11/2/2012 7:44 AM, Prashanth P.Nair wrote:
> > Using third party tool/script is strictly prohibited ..That is the
> > reason i dont use postfwd .
>
> It seems to me far less risky to use a popular peer-reviewed
> third-party script that you can review the source yourself, rather
> than trying to write something yourself in a programming language
> you're unfamiliar with.
>
> > It would be greate if you could help me to customize
> > "smtpd-policy-template"  for me
>
> Sorry, this is the wrong forum for perl programming tutorials.  If
> you can't do it yourself, and can't use a third-party tool (seems
> smtpd-policy-template.pl would qualify as that also), you seem to be
> stuck. Consider outsourcing this project.
>
>
>
>   -- Noel Jones
>

Reply via email to