Captive mailbox in Cyrus IMAP?

Nik Conwell nik at bu.edu
Tue Nov 21 14:41:40 EST 2006


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
>
> Do you really want new email to be deliverable while the account is  
> in this state? I'd rather return to sender than accept and silently  
> delete after a few weeks.

I go back and forth.  If you're coming back soon, then yes delivery  
is OK, if you're not coming back then might as well start bouncing now.

> If you can live with bouncing new mail, then you can give the user  
> a read-only mailbox with something like:
>
> 1) In cyradm, setaclmailbox user.joeschmo joeschmo lrsp
> 2) mv `mbpath user.joeschmo`/*. /var/imap/held-users/joeschmo
> 3) Send them a new message, making sure to use a UID higher than  
> anything already there (otherwise the message might be hidden from  
> clients in disconnected mode). Probably just email it.
> 4) reconstruct user.joeschmo
> 5) Put something into aliases or accessdb or virtusertable or LDAP  
> that has the effect of bouncing incoming mail with an appropriate  
> message
>
> To undo,
>
> 1) rm `mbpath user.joeschmo`/*. (your message should be the only one)
> 2) mv /var/imap/held-users/joeschmo `mbpath user.joeschmo`
> 3) reconstruct user.joeschmo
> 4) setaclmailbox user.joeschmo joeschmo lrswipkxtecda (or whatever  
> it was originally, if you're on a pre-2.3 version)
> 5) Remove the alias/accessdb/virtusertable bounce

That would work, although I was looking for something involving less  
moving around. :)  Say like something like when the imapd sees that  
user joeschmo has authenticated and decides the prefix is  
user.joeschmoe.  If I could hook in there I could override the folder  
to be user.captive, which already has the 1 message and an ACL for  
read-only access.

-nik





More information about the Info-cyrus mailing list