Results 1 to 5 of 5

Thread: [SOLVED] Limit max recipriants

  1. #1
    didster is offline Active Member
    Join Date
    May 2007
    Posts
    31
    Rep Power
    8

    Default [SOLVED] Limit max recipriants

    Hi,

    Is there a way of limiting the number of recipriants in the "to" headers of outgoing emails?

    What I am looking for is a way to reject emails that are sent to more than say 25 recipriants at once, but allow emails that are BCC'ed to that many people.

    Many thanks

  2. #2
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Clarify a bit - Are you saying that you want to allow email's that are BCC'd to that many people as inbound or outbound? Do you want to be able to receive emails with lots of recipients/but no more than 25 of them in your organization/at your server?Can't from the admin console GUI, but you can via postfix CLI:

    smtpd_recipient_limit (default 1000) parameter controls how many recipients the SMTP server will take per message delivery request.
    -You can't restrict this to a to/cc/bcc field - it's all recipients. For that you'd have to use a regular expression in header_checks to arbitrarily limit the length of each header to something reasonable. (We could do this in the web-client though if someone wants to open an RFE in bugzilla.)

    smtpd_recipient_overshoot_limit (default 1000) - The number of recipients that a remote SMTP client can send in excess of the hard limit specified with smtpd_recipient_limit, before the Postfix SMTP server increments the per-session error count for each excess recipient. "Postfix will 4xx the 'overshoot' addresses so a sending MTA can try them again later."

    Then see the smtpd_hard_error_limit (default 20) parameter to know at what number of errors it will disconnect.

    So you technically need to consider like 3 values here - which affect both inbound & outbound mail.

    (I've heard of an smtpd_extra_recipient_limit but I've never used it / might just be for in queues.)

    Then there's the throttling tools:

    smtpd_client_recipient_rate_limit (default: 0 no limit) - The maximum number of recipient addresses that an SMTP client may specify in the time interval specified via anvil_rate_time_unit (default: 60s -careful adjusting this affects other things)" and note that this is "regardless of whether or not Postfix actually accepts those recipients" Those over will receive a 450 4.7.1 Error: too many recipients from [the.client.ip.address] It's up to the client to deliver those recipients at some later time.

    It may prove prudent to also adjust:
    smtpd_client_connection_rate_limit (default: 0)- The maximal number of connection attempts any client is allowed to make to this service per time unit. The time unit is specified with the anvil_rate_time_unit configuration parameter.
    smtpd_client_message_rate_limit (default: 0) - The maximal number of message delivery requests that any client is allowed to make to this service per time unit, regardless of whether or not Postfix actually accepts those messages. The time unit is specified with the anvil_rate_time_unit configuration parameter.

    The purpose of these features are to limit abuse, as opposed to regulating legitimate mail traffic, but some use them that way.

    There's also Policyd which can do sender-(envelope, SASL, or host / ip)-based throttling on messages and/or volume per defined time unit, plus recipient rate limiting.
    http://www.policyd.org

    To adjust:
    su - zimbra
    postconf -e 'smtpd_recipient_limit = 1000'
    To apply settings:
    postfix reload
    To check current settings:
    postconf | grep smtpd_recipient_limit
    Note: When your looking this up, smtpd_recipient_limit is not to be confused with default_destination_recipient_limit parameter, which controls how many recipients a Postfix delivery agent will send with each copy of an email message. If an email message exceeds that value, the Postfix queue manager breaks up the list of recipients into smaller lists. Postfix will attempt to send multiple copies of the message in parallel. So that really isn't limiting the number of addresses, it just breaks it into chunks for other servers to accept easier.
    Last edited by mmorse; 03-19-2009 at 01:38 PM.

  3. #3
    didster is offline Active Member
    Join Date
    May 2007
    Posts
    31
    Rep Power
    8

    Default

    Hi,

    Thanks for the great reply and sorry if I wasn't clear enough!

    I don't care about incoming messages.

    For outgoing messages though, i would like to limit the number of recipients the message is sent to - but only via "to" and "cc". If the email is BCCed to that many people, I would like to let it pass.

    Essentially, we had a balls up where a mailer was sent to 100 or so people by an in-experienced member of staff. As you can imagine, people are not to pleased about having their email address reveled to others. What I am trying to do is prevent this in the future - by enforcing emails to only be allowed as they should have been sent - using BCC.

    If this is not possiable exactly, I would be happy blocking messages with a large number of recipients and manually releasing them if they were ok to go.

    Many Thanks

  4. #4
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Because you're essentially local to the mta, smtpd_recipient_limit will be inbound & outbound.
    Probably time to file an RFE then, as I'm not aware of any other postfix settings, but maybe there could be a limit set web-client side.

  5. #5
    didster is offline Active Member
    Join Date
    May 2007
    Posts
    31
    Rep Power
    8

    Default

    Thanks very much.

    Funny enough, googeling for smtpd_recipient_limit and BCC produces a LOT of result with people asking for the same feature from Postfix...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] recipient limit or max recipients
    By captainmish in forum Administrators
    Replies: 11
    Last Post: 11-25-2013, 09:37 AM
  2. Max imap message size
    By vogon1 in forum Developers
    Replies: 13
    Last Post: 10-25-2009, 08:47 PM
  3. Max length of ZimbraMtaRestriction value reached...
    By staufj22 in forum Administrators
    Replies: 0
    Last Post: 10-18-2007, 08:55 PM
  4. Size limit for syncronization Outlook connector
    By Fabio in forum Administrators
    Replies: 1
    Last Post: 09-07-2006, 06:59 AM
  5. max attachment limit
    By kowell in forum Administrators
    Replies: 3
    Last Post: 06-05-2006, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •