Re: [Exim] question

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Ivan Matveyev
CC: exim-users
Subject: Re: [Exim] question
On Wed, 17 Dec 2003, Ivan Matveyev wrote:

> Is smtp_accept_max_per_host is the only variable which can be set by
> lookup/lsearch like this:
>
> ${lookup{${mask:$sender_host_address/24}}lsearch*{/usr/exim/smtp_accept_max_per_host.cfg}}
>
> ?
>
> I've tried to set
>
> recipients_max
> smtp_accept_max_per_connection
>
> but failed. I would like to set them too. Any suggestions?


From spec.txt:

smtp_accept_max_per_connection  Type: integer                  Default: 1000
smtp_accept_max_per_host        Type: string*                  Default: unset


Note the subtle difference. The former is not expanded; the latter is.
However, I would advise against using a lookup (at least if your file is
of any length) for smtp_accept_max_per host because of the warning in
the spec:

    Warning: When setting this option you should not use any expansion
    constructions that take an appreciable amount of time. The expansion and
    test happen in the main daemon loop, in order to reject additional
    connections without forking additional processes (otherwise a denial-of-
    service attack could cause a vast number or processes to be created).
    While the daemon is doing this processing, it cannot accept any other
    incoming connections.


As for recipients_max, if you want different limits for different hosts,
you can implement this by suitable constructs in your ACLs.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book