Re: header_checks: BCC issue

2011-03-25 Thread Wietse Venema
David Touzeau:
[ Charset UTF-8 unsupported, converting... ]
 Dear
 
 I would like to limit the recipients number in Bcc Header field
 
 i have set 
 
 header_checks = regexp:/etc/postfix/header_checks
 
 content:
 
 /^To:([^@]*@){50,}/   REJECT Sorry, your message has too many recepients.
 /^Cc:([^@]*@){50,}/   REJECT Sorry, your message has too many recepients.
 /^Bcc:([^@]*@){50,}/  REJECT Sorry, your message has too many recepients
 
 To and CC are successfully catched and refused by Postfix
 
 But Bcc is not catched

BCC is deleted.

Wietse


Re: header_checks: BCC issue

2011-03-25 Thread David Touzeau
Le vendredi 25 mars 2011 à 07:21 -0400, Wietse Venema a écrit :

 David Touzeau:
 [ Charset UTF-8 unsupported, converting... ]
  Dear
  
  I would like to limit the recipients number in Bcc Header field
  
  i have set 
  
  header_checks = regexp:/etc/postfix/header_checks
  
  content:
  
  /^To:([^@]*@){50,}/ REJECT Sorry, your message has too many recepients.
  /^Cc:([^@]*@){50,}/ REJECT Sorry, your message has too many recepients.
  /^Bcc:([^@]*@){50,}/REJECT Sorry, your message has too many 
  recepients
  
  To and CC are successfully catched and refused by Postfix
  
  But Bcc is not catched
 
 BCC is deleted.
 
   Wietse


Thanks Wietse to answer me...

What do you means when you said BCC is deleted ?
You means that BCC is not stored in the header when postfix try to catch
it ?


Re: header_checks: BCC issue

2011-03-25 Thread Larry Stone

On Fri, 25 Mar 2011, David Touzeau wrote:


What do you means when you said BCC is deleted ?
You means that BCC is not stored in the header when postfix try to catch it


BCC is BLIND Carbon Copy. It wouldn't be very blind if the BCC header was 
allowed to stay in the message so to prevent that, Postfix helpfully 
removes any BCC headers it finds. By the time the message gets to 
header_checks, the BCC header has already been removed.


-- Larry Stone
   lston...@stonejongleux.com


Re: header_checks: BCC issue

2011-03-25 Thread David Touzeau
Le vendredi 25 mars 2011 à 07:06 -0500, Larry Stone a écrit :
 On Fri, 25 Mar 2011, David Touzeau wrote:
 
  What do you means when you said BCC is deleted ?
  You means that BCC is not stored in the header when postfix try to catch it
 
 BCC is BLIND Carbon Copy. It wouldn't be very blind if the BCC header was 
 allowed to stay in the message so to prevent that, Postfix helpfully 
 removes any BCC headers it finds. By the time the message gets to 
 header_checks, the BCC header has already been removed.
 
 -- Larry Stone
 lston...@stonejongleux.com


Many thanks Larry !

So is there a tips/HOWTO in order to reject messages that store more
than 50 emails addresses in BCC header 
or 
it is not possible ?

best regards





Re: header_checks: BCC issue

2011-03-25 Thread Wietse Venema
David Touzeau:
 So is there a tips/HOWTO in order to reject messages that store more
 than 50 emails addresses in BCC header 
 or 
 it is not possible ?

The Postfix cleanup daemon does not care how many recipients are
in the BCC header.

If you submit mail with an SMTP client, the recipients are sent
with the RCPT TO commands.

Wietse


Re: header_checks: BCC issue

2011-03-25 Thread David Touzeau
Le vendredi 25 mars 2011 à 08:23 -0400, Wietse Venema a écrit :
 David Touzeau:
  So is there a tips/HOWTO in order to reject messages that store more
  than 50 emails addresses in BCC header 
  or 
  it is not possible ?
 
 The Postfix cleanup daemon does not care how many recipients are
 in the BCC header.
 
 If you submit mail with an SMTP client, the recipients are sent
 with the RCPT TO commands.
 
   Wietse


Many thanks weitse for this clarification so is 

the only way to block the recipient number is to play with 

smtpd_recipient_limit or smtpd_recipient_overshoot_limit 

?



Re: header_checks: BCC issue

2011-03-25 Thread Wietse Venema
David Touzeau:
 Le vendredi 25 mars 2011 ? 08:23 -0400, Wietse Venema a ?crit :
  David Touzeau:
   So is there a tips/HOWTO in order to reject messages that store more
   than 50 emails addresses in BCC header 
   or 
   it is not possible ?
  
  The Postfix cleanup daemon does not care how many recipients are
  in the BCC header.
  
  If you submit mail with an SMTP client, the recipients are sent
  with the RCPT TO commands.
 
 Many thanks weitse for this clarification so is 
 
 the only way to block the recipient number is to play with 
 
 smtpd_recipient_limit or smtpd_recipient_overshoot_limit 

The RFC for SMTP requires that an SMTP server accepts at least 100.
You may lose legitimate mail if you set a lower limit globally.

If you want finer control over recipient rates, use a policy daemon.
http://www.postfwd.org/
http://www.policyd.org/

Wietse


Re: header_checks: BCC issue

2011-03-25 Thread David Touzeau
Le vendredi 25 mars 2011 à 08:57 -0400, Wietse Venema a écrit :
 David Touzeau:
  Le vendredi 25 mars 2011 ? 08:23 -0400, Wietse Venema a ?crit :
   David Touzeau:
So is there a tips/HOWTO in order to reject messages that store more
than 50 emails addresses in BCC header 
or 
it is not possible ?
   
   The Postfix cleanup daemon does not care how many recipients are
   in the BCC header.
   
   If you submit mail with an SMTP client, the recipients are sent
   with the RCPT TO commands.
  
  Many thanks weitse for this clarification so is 
  
  the only way to block the recipient number is to play with 
  
  smtpd_recipient_limit or smtpd_recipient_overshoot_limit 
 
 The RFC for SMTP requires that an SMTP server accepts at least 100.
 You may lose legitimate mail if you set a lower limit globally.
 
 If you want finer control over recipient rates, use a policy daemon.
 http://www.postfwd.org/
 http://www.policyd.org/
 
   Wietse


Many thanks Wietse !