Re: [exim] Auto-whitelist

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Mike Cardwell
日付:  
To: exim-users
題目: 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