Re: [exim] How can I discard specific account

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: 宇翔
Data:  
Para: exim-users
Assunto: Re: [exim] How can I discard specific account
Dear Phil

it's working :)

sector begin routers
add below

block_expired_accounts:
driver = redirect
domains = +local_domains
local_parts = /usr/exim/blocked/accounts
data = :fail: account closed
allow_fail

mkdir /usr/exim/blocked
echo john > /usr/exim/blocked/accounts
chown exim /usr/exim/blocked/accounts

2007-01-02 13:47:23 1H1CZC-0001vu-Ee ** john@???
R=block_expired_accounts: account closed
2007-01-02 13:48:36 H=amarseille-153-1-45-236.w86-197.abo.wanadoo.fr
[86.197.180.236]:4911 I=[10.2.1.11]:25 F=<obesity@???> rejected
RCPT john@???: account closed

thanks a lot ^^





----- Original Message -----
From: "Phil Pennock" <exim-users@???>
To: "宇翔" <usnei@???>
Cc: <exim-users@???>
Sent: Tuesday, January 02, 2007 1:29 PM
Subject: 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