-
Notifications
You must be signed in to change notification settings - Fork 179
Q9812
Nigel Metheringham edited this page Nov 29, 2012
·
2 revisions
How can I lookup data from a single file using both single IP addresses
and IP address blocks as keys? I want to set smtp_accept_max_per_host
by this means, and also include a default.
You cannot do this in a single lookup, because you need separate lookups for individual addresses and address blocks. However, these lookups can be nested in a single expansion string. For example, suppose you are using an lsearch file with entries like this:
192.168.34.35: 4
192.168.34.0/24: 2
*: 1
You can use this setting:
smtp_accept_max_per_host = \
${lookup{$sender_host_address}lsearch{/path/to/file}\
{$value}\
{\
${lookup{${mask:$sender_host_address/24}}lsearch*{/path/to/file}}\
}}
Note that the first lookup does not have an asterisk on the search type. If you have blocks of different sizes (/24, /26, etc) you have to configure it to do a separate lookup for each size, with just the final one using a default.
- How do I configure Exim as part of TPC
- How do I configure Exim so that it sends mail to the outside world only
- A site for which I provide secondary MX is down for some time. Is there
- We want to be able to temporarily lock out a user by disabling the
- How can I configure Exim so that all mails addressed to
- How do I get exim not to add a Sender: header to locally originated
- Is there any way to have messages sent to a specific local address
- I have a mailing list exploder on one host, and three other hosts where
- Can I configure Exim so that my gateway host sends a copy of each
- How can I implement SMTP-after-POP > with Exim?
- I would like to tap off > a proportion of real mail traffic from my live mail server to use in
- How can I lookup data from a single file using both single IP addresses