Re: Captive mailbox in Cyrus IMAP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Nov 2006 14:41:40 -0500 Nik Conwell <nik@xxxxxx> wrote:

> 
> On Nov 21, 2006, at 12:04 PM, Rich Graves wrote:
> 
> > Nik Conwell wrote:
> >> Archiving accounts after people graduate and leave the  
> >> university.  We send people a bunch of e-mails letting them know  
> >> they're being archived but often they're ignored.  We still do  
> >> this, but then before archiving we put them into a captive state  
> >> for a couple of weeks.  Having only 1 e-mail in your inbox makes  
> >> it painfully obvious that things are indeed going away.  At that  
> >> point people can request an extension, register for
> >

I did some work for a different purpose which should work for you:

I use Exim as my MTA and deliver using LMTP. You need to add to your MTA 
configuration for this solution.

Touch a file (name is the account name) in a "suspend" directory and have the 
MTA queue messages if the file exists. This prevents delivery while things are 
changing.

Rename the account from user.account to user.account-pending, keeping the same 
partition so that the rename is quick. Create a new account for user.account 
and put your single message in there. Do a reconstruct to make the message 
visible.

Touch a file in a "pending" directory. Make your MTA check for the file before
delivery and if it is present, make it deliver to "account-pending" instead.

Remove the file from the "suspend" directory to allow deliveries to resume.

If you decide to resurect the account just remove user.account and rename 
user.account.pending back to normal.

(I have included my Exim routers below. Note the ability to deliver to the new 
account using a header.)

Hope this helps.

Phil.
---------------------------------------
Phil Chambers (postmaster@xxxxxxxxxxxx)
University of Exeter

Exim routers:
defer:
  driver = redirect
  no_verify
  caseful_local_part
  require_files = /usr/local/suspend/$local_part
  allow_defer
  data = :defer: User account is currently being moved

# Divert to pending accounts
# Details are in the divert file
# Allow a X-Exeter-Pending: header to skip the divert
divert:
  driver = redirect
  no_verify
  caseful_local_part
  condition = ${if eq{$header_x-pending-divert:}{notice} {no}{yes}}
  require_files = /usr/local/pending/$local_part
  data = ${local_part}-pending@$domain
  redirect_router = next_router
  no_rewrite


----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux