Paul Letta
2008-Feb-29 17:19 UTC
[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
Timo Sirainen
2008-Feb-29 18:20 UTC
[Dovecot] links causing dovecot endless search through user's homedirs
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: ignore-symlinks.diff Type: text/x-patch Size: 915 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20080229/e849f3c5/attachment-0004.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080229/e849f3c5/attachment-0005.bin>
John Gray
2008-Feb-29 18:24 UTC
[Dovecot] links causing dovecot endless search through user's homedirs
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 at 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