Re: [exim] hard coded alias entry to lookup

Góra strony
Delete this message
Reply to this message
Autor: Dean Brooks
Data:  
Dla: exim-users
Temat: Re: [exim] hard coded alias entry to lookup
On Wed, Nov 12, 2014 at 04:17:37PM +0000, Gary Stainburn wrote:
> > On 12/11/14 15:22, Gary Stainburn wrote:
> > > in check_rcpt so that a separate file could simply hold
> > >
> > > user1:    paula
> > > user2:    graham


> > > and use a lookup to generate the appropriate message?
>
> I'm looking for something along the lines of
>
>   deny    domains = +local_domains
>         data = ${lookup{$local_part}lsearch{/etc/exim/lists/fail_list}}
>                 message = This user is no longer available. For assistance 
> please contact <data>


I would recommend using a router and not an ACL entry to accomplish
this. A router has the benefit of still blocking during reception due
to ACL recipient verification, but it will also cover any recipients
that may forward/redirect to these inactive users. If you use an ACL,
you won't be able to easily catch those.

Something like this should work, though I haven't tested:

fail_users:
driver = redirect
domains = +localdomains
local_parts = lsearch;/etc/exim/lists/fail_list
allow_fail
data = :fail: User no longer here, contact $local_part_data@$domain instead
fail_verify

The fail_list file would be in the format you described of "user: newuser",
one entry per line.

--
Dean Brooks
dean@???