Hello, everyone! Is it possible to "hide" mailbox from the IMAP clients, so as to prevent any user from subscribing to the some folders? My storages are "mbox maildir". For example, to hide the directory where the personal Sieve scripts are stored or etc. =kostik
Eduardo M KALINOWSKI
2009-Oct-06 14:31 UTC
[Dovecot] how to "hide" mailbox from the IMAP clients
On Ter, 06 Out 2009, Kostik wrote:> Hello, everyone! > > Is it possible to "hide" mailbox from the IMAP clients, so as to prevent > any user from subscribing to the some folders? > > My storages are "mbox maildir". > > For example, to hide the directory where the personal Sieve scripts are > stored or etc.I think you're approaching the problem from a wrong perspective. You should not "hide" non-mail folders from clients, but you should "hide" them from the server. If it's not a mail folder, Dovecot should not treat it as one. How to do that depends on your settings, but basically you should not include the folder with scripts inside the folder with the mailboxes, but instead store it elsewhere. -- Eduardo M KALINOWSKI eduardo at kalinowski.com.br
Thomas Leuxner
2009-Oct-06 14:33 UTC
[Dovecot] how to "hide" mailbox from the IMAP clients
Am 06.10.2009 um 16:27 schrieb Kostik:> > For example, to hide the directory where the personal Sieve scripts > are > stored or etc. >With recent versions the sieve scripts are stored in the home directory per default, rather than the maildir itself. You may wan't to verify this parameter: sieve = ~/.dovecot.sieve Regards Thomas
Hello. Actually it is a problem for me. Introduction: If dovecot LDA save failed to mbox (not enough disk space, for example), it does not do rollback. Then my mailbox was corrupted. Last message is dropped in the middle of headers(body, attachments, etc). Same if I use file system quota, but does not set "quota plugin" for LDA. If user receives message which is over quota: save failed, no rollback, mbox corrupted. But if I set "quota plugin" for LDA, then LDA works fine. In my case, this problem occurs when: -- use file system quota -- and set "quota plugin" for LDA -- and set "multiple quota roots": dirsize + fs -- and mail dir size less than all user files (if user have mail and some other files on it home dir). If user receives message which is over FS quota but under dirsize quota, then "dirsize quota plugin" say: "OK". But "fs quota plugin" say: "stat((null)) failed: Bad address". And LDA tries to deliver message to mbox: save failed, no rollback, mbox corrupted. Timo or anybody! Please! Help me! :) =kostik> With dovecot-1.2.6 "multiple quota roots" complains: > "stat((null)) failed: Bad address" to log file.> My setup is: > --- > plugin { > quota = dirsize:dirsize quota > quota2 = fs:fs quota:group > } > ---> Complains from (plugins/quota/quota-fs.c): > --- > if (stat(root->>storage_mount_path, &rst) < 0) { > if (_root->quota->set->debug) { > i_error("stat(%s) failed: %m", > root->storage_mount_path); > } > return FALSE; > } > --- > root->>storage_mount_path is NULL here. > > But "single quota" setup (dirsize or fs) works fine. > > > Full log (multiple quota): > --- > Quota root: name=dirsize quota backend=dirsize args> Quota rule: root=dirsize quota mailbox=* bytes=48234496 messages=0 > Quota root: name=fs quota backend=fs args=group > mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY > fs: root=/var/virtual/home/I/I/koc, index=, control=, > inbox=/var/virtual/mail/I/I/koc > fs quota add storage dir = /var/virtual/home/I/I/koc > fs quota block device = nfsf:/export > fs quota mount point = /mount/m6 > stat((null)) failed: Bad address > stat((null)) failed: Bad address > stat((null)) failed: Bad address > ... > ---> Full log (single fs quota): > --- > Quota root: name=fs quota backend=fs args=group > Quota rule: root=fs quota mailbox=* bytes=48234496 messages=0 > mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY > fs: root=/var/virtual/home/I/I/koc, index=, control=, > inbox=/var/virtual/mail/I/I/koc > fs quota add storage dir = /var/virtual/home/I/I/koc > fs quota block device = nfsf:/export > fs quota mount point = /mount/m6 > quota-fs: host=nfsf, path=/export, gid=52304385, bytes > quota-fs: gid=52304385, value=48660480, limit=52428800, active=1 > ---
Hello. I fix this issue by manually set "mount" option to user home: --- quota2 = fs:fs quota:group:mount=%h --->From here:http://wiki.dovecot.org/Quota/FS --- mount=<path>: Report quota from given path. Default is to use the path for the mail root directory. --- But by default it is NULL. =kostik Kostik wrote:> Hi to everyone. > > Timo, > > With dovecot-1.2.6 "multiple quota roots" complains: > "stat((null)) failed: Bad address" to log file. > > My setup is: > --- > plugin { > quota = dirsize:dirsize quota > quota2 = fs:fs quota:group > } > --- > > Complains from (plugins/quota/quota-fs.c): > --- > if (stat(root->storage_mount_path, &rst) < 0) { > if (_root->quota->set->debug) { > i_error("stat(%s) failed: %m", > root->storage_mount_path); > } > return FALSE; > } > --- > root->storage_mount_path is NULL here.