[Dovecot] How to lock a user out?
Hi,
We are considering to migrate to Dovecot. We can running uw-imap and have a local path which allow us to lock a user by creating a .lockdir directory in the user home directory and put our warning message to .lockdir/mbox. The locked user can still receive messages in ~/mbox. But can not access any messages except ~/.lockdir/mbox. I wonder if Dovecot has any similar feature which we can use to lock a user out without affecting the mail delivery?
Kai Wang University of Calgary
tell dovecot to look for messages in ~/.dovebox/mbox using mailbox_env
ln -s ~ ~/.dovebox for all users.
to lock user, rm -f ~/.dovebox && ln -s ~/.lockdir ~/.dovebox
to unlock user, rm -f ~/.dovebox && ln -s ~ ~/.dovebox
On Tue, 2005-06-28 at 16:03 -0600, Kai Wang wrote:
Hi,
We are considering to migrate to Dovecot. We can running uw-imap and have a local path which allow us to lock a user by creating a .lockdir directory in the user home directory and put our warning message to .lockdir/mbox. The locked user can still receive messages in ~/mbox. But can not access any messages except ~/.lockdir/mbox. I wonder if Dovecot has any similar feature which we can use to lock a user out without affecting the mail delivery?
Kai Wang University of Calgary
Internet Connection High Quality Web Hosting http://www.internetconnection.net/
Good idea.
The INBOX is always a symbolic link. For a unlocked user, it points to a hidden file ~/.dovebox/mbox. For a locked user, it points to another hidden ~/.lockdir/mbox. Postfix/procmail always delivers messages to ~/.dovebox/mbox.
Thank you very much Kai
Geo Carncross wrote:
tell dovecot to look for messages in ~/.dovebox/mbox using mailbox_env
ln -s ~ ~/.dovebox for all users.
to lock user, rm -f ~/.dovebox && ln -s ~/.lockdir ~/.dovebox
to unlock user, rm -f ~/.dovebox && ln -s ~ ~/.dovebox
On Tue, 2005-06-28 at 16:03 -0600, Kai Wang wrote:
Hi,
We are considering to migrate to Dovecot. We can running uw-imap and have a local path which allow us to lock a user by creating a .lockdir directory in the user home directory and put our warning message to .lockdir/mbox. The locked user can still receive messages in ~/mbox. But can not access any messages except ~/.lockdir/mbox. I wonder if Dovecot has any similar feature which we can use to lock a user out without affecting the mail delivery?
Kai Wang University of Calgary
No.
The idea is that:
- mail is delivered normally. to ~/mbox
- dovecot looks in ~/.dovebox which is NORMALLY a symlink to ~ but when you want to lock someone out, ~/.dovebox is a symlink to that directory.
Consider: what if they have multiple mailboxes/folders? Should those be visible? If so, do what you suggest, otherwise do what I suggest :)
On Wed, 2005-06-29 at 11:28 -0600, Kai Wang wrote:
Good idea.
The INBOX is always a symbolic link. For a unlocked user, it points to a hidden file ~/.dovebox/mbox. For a locked user, it points to another hidden ~/.lockdir/mbox. Postfix/procmail always delivers messages to ~/.dovebox/mbox.
Thank you very much Kai
Geo Carncross wrote:
tell dovecot to look for messages in ~/.dovebox/mbox using mailbox_env
ln -s ~ ~/.dovebox for all users.
to lock user, rm -f ~/.dovebox && ln -s ~/.lockdir ~/.dovebox
to unlock user, rm -f ~/.dovebox && ln -s ~ ~/.dovebox
On Tue, 2005-06-28 at 16:03 -0600, Kai Wang wrote:
Hi,
We are considering to migrate to Dovecot. We can running uw-imap and have a local path which allow us to lock a user by creating a .lockdir directory in the user home directory and put our warning message to .lockdir/mbox. The locked user can still receive messages in ~/mbox. But can not access any messages except ~/.lockdir/mbox. I wonder if Dovecot has any similar feature which we can use to lock a user out without affecting the mail delivery?
Kai Wang University of Calgary
-- Internet Connection High Quality Web Hosting http://www.internetconnection.net/
Excellent idea. You are right.
Thanks more :-D
Geo Carncross wrote:
No.
The idea is that:
- mail is delivered normally. to ~/mbox
- dovecot looks in ~/.dovebox which is NORMALLY a symlink to ~ but when you want to lock someone out, ~/.dovebox is a symlink to that directory.
Consider: what if they have multiple mailboxes/folders? Should those be visible? If so, do what you suggest, otherwise do what I suggest :)
On Wed, 2005-06-29 at 11:28 -0600, Kai Wang wrote:
Good idea.
The INBOX is always a symbolic link. For a unlocked user, it points to a hidden file ~/.dovebox/mbox. For a locked user, it points to another hidden ~/.lockdir/mbox. Postfix/procmail always delivers messages to ~/.dovebox/mbox.
Thank you very much Kai
Geo Carncross wrote:
tell dovecot to look for messages in ~/.dovebox/mbox using mailbox_env
ln -s ~ ~/.dovebox for all users.
to lock user, rm -f ~/.dovebox && ln -s ~/.lockdir ~/.dovebox
to unlock user, rm -f ~/.dovebox && ln -s ~ ~/.dovebox
On Tue, 2005-06-28 at 16:03 -0600, Kai Wang wrote:
Hi,
We are considering to migrate to Dovecot. We can running uw-imap and have a local path which allow us to lock a user by creating a .lockdir directory in the user home directory and put our warning message to .lockdir/mbox. The locked user can still receive messages in ~/mbox. But can not access any messages except ~/.lockdir/mbox. I wonder if Dovecot has any similar feature which we can use to lock a user out without affecting the mail delivery?
Kai Wang University of Calgary
participants (2)
-
Geo Carncross
-
Kai Wang