[Dovecot] links causing dovecot endless search through user's homedirs
Hello, My user's imap folder locations are a mess. Some have them in /home/username/mail but a lot of them just have them in /home/username.
So I need to have dovecot's base imapdir pointed directly at the user's homedirs.
My problem now is that a lot of users have many links in their homedirs. Some even have circular links, such as:
/home/username/foo/foo1/foo2/foo3/foo4 -> /home/username/foo/foo1
All these links are causing some dovecot imap process to endlessly search.
An example of a strace of a running imap processes shows:
stat64("/home/xxx//jlab/jlab/dev/tail/interp/radcor/results/fake/e94010/3RDTRY/interp/radcor/results/fake/e94010/3RDTRY/interp/radcor/resul ts/fake/e94010/3RDTRY/interp/radcor/results/fake/e94010/3RDTRY/interp/radcor/results/fake/e94010/3RDTRY/interp/radcor/results/fake/e94010/3RDT RY/interp/radcor/results/fake/e94010/3RDTRY/interp/radcor/results/fa ...
and so on.
Since I can't get a hold of my users and make them all put their imap folders in /home/username/mail and configure dovecot to just search there...
Is there a way to tell dovecot to ignore links ?
Thanks, Paul
::::::::::::::::::::::::::::::::::::::::
dovecot1.jlab.org> dovecot --version 1.0.rc15
dovecot1.jlab.org> sudo dovecot -n # /etc/dovecot.conf protocols: imaps login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login login_max_processes_count: 512 login_max_connections: 1024 first_valid_uid: 100 mail_location: mbox:%h:INBOX=/var/mail/%u mmap_disable: yes mbox_read_locks: dotlock mbox_write_locks: dotlock auth default: passdb: driver: pam userdb: driver: passwd
On Fri, 2008-02-29 at 12:19 -0500, Paul Letta wrote:
Since I can't get a hold of my users and make them all put their imap folders in /home/username/mail and configure dovecot to just search there...
Couldn't you do this automatically? Move all files that look like mboxes to mail/ directory.
Is there a way to tell dovecot to ignore links ?
Attached a patch, but I don't really like the idea of adding a setting for it. It could give a false sense of security since it only changes mailbox listing, the symlinks are still followed if the mailboxes are selected.
Timo Sirainen wrote:
On Fri, 2008-02-29 at 12:19 -0500, Paul Letta wrote:
Since I can't get a hold of my users and make them all put their imap folders in /home/username/mail and configure dovecot to just search there...
Couldn't you do this automatically? Move all files that look like mboxes to mail/ directory.
If somebody has a nice tool moving everything that looks like a mbox to the mail directory, I'd sure love it have it.
I've been toying with this for some time.
John
-- John Gray gray@agora-net.com AgoraNet, Inc. (302) 224-2475 314 E. Main Street, Suite 1 (302) 224-2552 (fax) Newark, De 19711 http://www.agora-net.com
on 2-29-2008 10:24 AM John Gray spake the following:
Timo Sirainen wrote:
On Fri, 2008-02-29 at 12:19 -0500, Paul Letta wrote:
Since I can't get a hold of my users and make them all put their imap folders in /home/username/mail and configure dovecot to just search there...
Couldn't you do this automatically? Move all files that look like mboxes to mail/ directory.
If somebody has a nice tool moving everything that looks like a mbox to the mail directory, I'd sure love it have it.
I've been toying with this for some time.
John
I think most mbox files would start with "From " or the UWimap header if they were converted. You could also parse the users .subscriptions file and move what is in it.
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
participants (4)
-
John Gray
-
Paul Letta
-
Scott Silva
-
Timo Sirainen