> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mike Cardwell
> Sent: Friday, January 26, 2007 10:43 AM
> To: [email protected]
> Subject: Re: [exim] Auto-whitelist
> 
> * on the Fri, Jan 26, 2007 at 04:34:18PM +0000, Mike Cardwell wrote:
> 
> >>> We use exim 4.62 with mysql. I'd like to set up whitelist that is 
> >>> automatically updated with $recipients value when a user in our 
> >>> domain sends out an email. The $recipients is a comma 
> delimited list 
> >>> of the recipients available during data acl. I see that it can be 
> >>> done using the Perl but I was hoping not to have to use Perl for 
> >>> performance reasons. Has anyone done this without using Perl?
> >> I have done something similiar without using embedded Perl while 
> >> setting up greylisting.  The sender and recipients of 
> every outbound 
> >> mail are stored in a DBM file.  With the help of exim acl, 
> >> recipients' reply would skip the greylisting automatically.  It 
> >> greatly reduces the number of ham mail deferred by greylisting.
> >> The way I do it is very simple: 
> > I have a couple of more complicated, but cleaner methods(imo):
> > 
> > 1.) I use MySQL. I wrote a mysql stored function that takes 
> the value 
> > of $recipients, and processes each address in a loop.
> > 
> > 2.) Use a recursive ACL to separate the contents of 
> $recipients and do 
> > a db call for each recipient, eg below:
> 
> <snip example>
> 
> set acl_m0 = ${sg{$acl_m0}{\N^[^,]+,?(.*?)$\N}{\$2}}
> 
> Should probably be:
> 
> set acl_m0 = ${sg{$acl_m0}{\N^[^,]+,?(.*?)$\N}{\$1}}
> 
> Oh. And I just thought of a gotcha when using a recursive acl 
> for this purpose. If the number of recipients is greater than 
> whatever exim uses as the maximum recusion depth, it'll 
> break. You're better off using a stored function with a loop 
> if you're using an sql db.
> 
> Mike
> 

We do send to large lists that would break the acl recursion. I like the
stored procedure idea, but we're still at Mysql 4.1. Thanks.

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to