Re: [exim] How can I discard specific account

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: W B Hacker
Data:  
Para: exim-users
Assunto: Re: [exim] How can I discard specific account
Phil Pennock wrote:
> On 2007-01-02 at 12:29 +0800, 宇翔 wrote:
>> Happy new year :)
>
> You too. :^)
>
>> If my exim have account id :john
>> I had change /etc/shadow expire time colum about john ,
>> and also i wanna discard anyone who wanna mail to john
>> where should i set in configure file
>
> The local user checking of Exim does not support account expiry, so
> there is no direct support for this; support for pw_expire in the
> getpwnam() call results is not standard. You will instead need to get
> the list of blocked users into another file somehow and arrange to block
> it.
>
> The Routers are an ordered list, so if you put a block_expired_accounts
> Router before the Router which handles normal mail, then that should
> both work and also be clean and understandable for maintenance.
>
> One (untested) example of just one method of handling this is:
>
>  block_expired_accounts:
>    driver = redirect
>    domains = +local_domains
>    local_parts = /path/to/file/of/blocked/accounts
>    data = :fail: account closed
>    allow_fail

>
> If you read spec.txt (which comes with Exim) then section 10.3 describes
> the format of the file which you need to create. Use your favourite
> scripting language to update it and figure out how to make this happen
> automatically in your local procedures for account updates.
>
> -Phil
>


Or, going about it another way..... a flag on *all* accounts...

When we do the 'verify = recipient' either the 'verify mode' walk of the routers
or our local substitute (an SQL call) checks for a boolean flag indicating the
user is 'active' [1]

Administratively easy to flip that flag t/f w/o need to touch any other account
settings, and it is an 'always checked' item rather than a separate list.

CAVEAT: That fits most forms of 'virtual user' setups, but is not a good fit for
shadow/passowrd file driven implementations.

YMMV

Bill

[1] Other than system/alias accounts, such as 'postmaster'...