On Wed, 3 Aug 2011, WizWire Tech Support wrote: > From: WizWire Tech Support <[email protected]> > To: Exim Users Mailing List <[email protected]> > 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 protected]: > ###' 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 [email protected] Phone: +44 1225 386101 -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
