On Mon, Nov 05, 2012 at 01:48:40PM +0100, Ralf Hildebrandt wrote:
> * Prashanth P.Nair <prashanth...@gmail.com>:
> > 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 what happens when some smartaleck uses an "@" sign in the RFC 
5322 "display-name" field, as I did, above?

But it's not strictly a smartaleck thing to do. There are lots of 
reasons why someone might do that. Different MUAs configured to use 
the same address:

Joe@work <j...@example.com>
Joe@home <j...@example.com>

Headers do not control mail routing, and solutions which try to 
enforce routing based on headers are generally wrong.

Also, Internet mail was based on its own set of ideas. People who 
want to implement Internet mail might have differing ideas. The 
designers of Internet mail protocols thought that senders might need 
to send one mail to more than five recipients. This seems to be a 
case in which the different ideas are likely to break things.

Perhaps the OP needs to go back to the boss and try to explain that 
this isn't a good idea?
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to