Re: [exim] How can I discard specific account

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Phil Pennock
Fecha:  
A: 宇翔
Cc: exim-users
Asunto: Re: [exim] How can I discard specific account
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