Re: [exim] recipients_max help

Top Page
Delete this message
Reply to this message
Author: Dennis Davis
Date:  
To: WizWire Tech Support
CC: Exim Users Mailing List
Subject: Re: [exim] recipients_max help
On Wed, 3 Aug 2011, WizWire Tech Support wrote:

> From: WizWire Tech Support <support@???>
> To: Exim Users Mailing List <exim-users@???>
> Date: Wed, 3 Aug 2011 22:59:59
> Subject: [exim] recipients_max help
>
> I am trying to develop a way to be able to modify max recipients
> per email address on our server. So far the recipients_max looks
> promising. Would something like this work?
>
> recipients_max = ${if eq {$local_part@$domain}
> {lookup{$local_part@$domain}lsearch{/etc/virtual/recipients_max}{$value}}
> {$value}{150}}*
>
> *where /etc/virtual/recipients_max contains 'email@???:
> ###' lines. My goal was anything in the file, if it matches the
> senders email address (local emails, sending out, for instance to
> a mailing list), uses that value, otherwise the default of 150.


Doesn't seem to me that you can do this in the way you describe.
The fine manual:

http://www.exim.org/exim-html-current/doc/html/spec_html/ch14.html

seems to indicate that recipients_max is a fixed integer that isn't
expanded.

You'll probably have to implement this in the acl_smtp_rcpt ACL.
There's an expansion variable, $rcpt_count, that might be useful as
it keeps a running total. A lookup type of lsearch* (or whatever
you intend to use) will let you set a suitable default.

It might be prudent to check this out with the email clients in use.
Some clients aren't very good at handling errors, and might not be
good at handling the "defer" you'll be returning for the over-limit
recipients.

Have a look at rate-limiting if you're worried about clients running
amok and attempting to send email to all the known universe.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@???               Phone: +44 1225 386101