Re: [exim] rate limit for maximum outgoing emails to mail-re…

Pàgina inicial
Delete this message
Reply to this message
Autor: Viktor Dukhovni
Data:  
A: Jakob Schürz
CC: Exim-users
Assumpte: Re: [exim] rate limit for maximum outgoing emails to mail-relay


> On Feb 27, 2018, at 10:39 AM, Jakob Schürz via Exim-users <exim-users@???> wrote:
>
> I want to realize this with exim4, if there is a possibility to set a hard limit for a specific smart/relayhost for outgoing emails. The app can send as much emails as used, and the mailserver queues them all and send them to gmail-relay-host in packages of 80 mails per minute. Not more!
>
> How can i handle this with exim?


Exim does not have a queue manager to managed delivery of the mail accepted
by multiple inbound SMTP listeners. Each SMTP server is also the SMTP delivery
agent and operates independently of the others. For ratelimiting, you may need
to consider Postfix:

    main.cf:
    indexed = ${default_database_type}:${config_directory}/
    transport_maps = ${indexed}transport
    slow_destination_rate_delay = 1s
    slow_destination_concurrency_failed_cohort_limit = 10


    transport:
    example.com slow


    master.cf:
        # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
        slow       unix  -       -       n       -       -       smtp



This rate-limits deliveries to 1 per second or 60 per minute, it is not possible
to go faster while imposing rate-limits, because the inter-message delay is in
seconds rather than milliseconds.

-- 
    Viktor.