Turn on/off IMAP/POP access?
Jorey Bump
list at joreybump.com
Sun Oct 7 15:09:48 EDT 2007
Anders Norrbring wrote, at 10/07/2007 07:06 AM:
> Is there a way to disable a specific user's access to POP and IMAP in
> Cyrus? I still want the mail to be delivered to the mailboxes (done via
> LMTP), but I would like to turn off the user from getting the mail.
>
> In case you wonder, it's for a pay system, so if they don't pay, the
> don't get access.
I would imagine that the Cyrus way would be to change the ACL on the
user's mailbox, using cyradm (or Cyrus::IMAP::Shell, in a perl script):
List ACLs:
localhost> lam user.bob
bob lrswipkxtecda
Delete ACLs:
localhost> dam user.bob bob read
List again, to confirm ACLs:
localhost> lam user.bob
Now bob can't read his INBOX, and will get a message like the following
when he tries (this is from Thunderbird):
"The current command did not succeed. The mail server responded: Mailbox
does not exist."
Note that subfolders are still available. Denying access to the INBOX
could be enough of an inconvenience to get the user's attention.
To restore access to the INBOX:
localhost> sam user.bob bob all
You can also apply the ACL to all subfolders, so they can't access anything:
localhost> dam user.bob.* bob read
To restore access to all subfolders:
localhost> sam user.bob.* bob read
This approach seems preferable to deleting the password, so you or the
user won't have to reset it.
For information on setting ACLs, see the cyradm man page.
More information about the Info-cyrus
mailing list