[Dovecot] hide sieve folder from imap clients
Hello,
What is the best way to hide sieve folders from IMAP clients?
old config
mail_home = /var/vmail/%d/%n
plugin { sieve_dir = /var/vmail/%d/%n/.sieve/ sieve = /var/vmail/%d/%n/.dovecot.sieve }
new config (hide sieve folder)
mail_home = /var/vmail/%d/%n maildir_stat_dirs = yes
plugin { sieve_dir = /var/vmail/%d/%n/sieve/ sieve = /var/vmail/%d/%n/.dovecot.sieve }
Is there a better way without maildir_stat_dirs = yes ?
-- Christopher
2011/6/27 Benny Pedersen me@junc.org:
On Mon, 27 Jun 2011 13:24:39 +0200, Christopher Stolzenberg wrote:
mail_home = /var/vmail/%d/%n
mail_home = /var/vmail/%d/%n/.maildir
sieve_dir = /var/vmail/%d/%n/sieve/
sieve_dir = /var/vmail/%d/%n/.sieve
Can you explain that?
-- Christopher
Op 27-6-2011 14:04, Christopher Stolzenberg schreef:
2011/6/27 Benny Pedersenme@junc.org:
On Mon, 27 Jun 2011 13:24:39 +0200, Christopher Stolzenberg wrote:
mail_home = /var/vmail/%d/%n mail_home = /var/vmail/%d/%n/.maildir sieve_dir = /var/vmail/%d/%n/sieve/ sieve_dir = /var/vmail/%d/%n/.sieve Can you explain that?
Basically, the solution is not to put your sieve storage (sieve_dir=) or active sieve script (sieve=) inside your mail directory. The above fixes this by giving the mail its own sub-directory (the '.' prefix is not necessary).
Regards,
Stephan.
2011/6/27 Stephan Bosch stephan@rename-it.nl:
Op 27-6-2011 14:04, Christopher Stolzenberg schreef:
2011/6/27 Benny Pedersenme@junc.org:
On Mon, 27 Jun 2011 13:24:39 +0200, Christopher Stolzenberg wrote:
mail_home = /var/vmail/%d/%n
mail_home = /var/vmail/%d/%n/.maildir
sieve_dir = /var/vmail/%d/%n/sieve/
sieve_dir = /var/vmail/%d/%n/.sieve
Can you explain that?
Basically, the solution is not to put your sieve storage (sieve_dir=) or active sieve script (sieve=) inside your mail directory. The above fixes this by giving the mail its own sub-directory (the '.' prefix is not necessary).
Regards,
Stephan.
And what happens with existing imap accounts? Migration necessary?
Will I lose much performance by maildir_stat_dirs = yes on an ext4 filesystem with my current workaround?
-- Christopher
On Mon, 27 Jun 2011 14:30:28 +0200, Christopher Stolzenberg wrote:
And what happens with existing imap accounts?
nothing
Migration necessary?
yes, stop dovecot, and do the dirs renaming so all mailbox'es is in .maildir pr mailbox
when done start dovecot, or use imapsync before change dovecot.conf (rename folders before change dovecot, this saves time if you have more then one mailbox to migrade)
google imapsync to find it
dont know if dovecot can do this with out external tools
Will I lose much performance by maildir_stat_dirs = yes on an ext4 filesystem with my current workaround?
is performance a workaround ?
and i dont know since i dont use it
On 2011-06-27 8:04 AM, Christopher Stolzenberg wrote:
2011/6/27 Benny Pedersen me@junc.org:
On Mon, 27 Jun 2011 13:24:39 +0200, Christopher Stolzenberg wrote:
mail_home = /var/vmail/%d/%n
mail_home = /var/vmail/%d/%n/.maildir
sieve_dir = /var/vmail/%d/%n/sieve/
sieve_dir = /var/vmail/%d/%n/.sieve
Can you explain that?
What's to explain? This separates the two directories so you won't see your sieve edirectories in your imap clients (exactly what you were asking for).
--
Best regards,
Charles
new config (hide sieve folder)
mail_home = /var/vmail/%d/%n maildir_stat_dirs = yes
plugin { sieve_dir = /var/vmail/%d/%n/sieve/ sieve = /var/vmail/%d/%n/.dovecot.sieve }
All the examples look a bit overcomplicated. Why not go with the "defaults"?
mail_location = maildir:~/maildir sieve = ~/.dovecot.sieve
However this relies on home dirs being returned from the user lookups which has not been revealed in the OP's partial config post.
Thomas
2011/6/27 Thomas Leuxner tlx@leuxner.net:
new config (hide sieve folder)
mail_home = /var/vmail/%d/%n maildir_stat_dirs = yes
plugin { sieve_dir = /var/vmail/%d/%n/sieve/ sieve = /var/vmail/%d/%n/.dovecot.sieve }
All the examples look a bit overcomplicated. Why not go with the "defaults"?
I'll try it.
mail_location = maildir:~/maildir sieve = ~/.dovecot.sieve
Have you any idea how i specify it best? mail_location and mail_home.
However this relies on home dirs being returned from the user lookups which has not been revealed in the OP's partial config post.
With MySQL.
user_query = SELECT concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 6000 AS uid, 6000 AS gid, concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
-- Christopher
2011/6/27 Thomas Leuxner tlx@leuxner.net:
new config (hide sieve folder)
mail_home = /var/vmail/%d/%n maildir_stat_dirs = yes
plugin { sieve_dir = /var/vmail/%d/%n/sieve/ sieve = /var/vmail/%d/%n/.dovecot.sieve }
All the examples look a bit overcomplicated. Why not go with the "defaults"?
mail_location = maildir:~/maildir sieve = ~/.dovecot.sieve
However this relies on home dirs being returned from the user lookups which has not been revealed in the OP's partial config post.
Okay, here is my new config:
mail_home = /var/vmail/%d/%n/ mail_location = maildir:/var/vmail/%d/%n/maildir
plugin { sieve_dir = /var/vmail/%d/%n/.sieve sieve = /var/vmail/%d/%n/.dovecot.sieve }
How should I configure mysql?
user_query = SELECT CONCAT('maildir:/var/vmail/',maildir) AS mail, 6000 AS uid, 6000 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
or
user_query = SELECT maildir, 6000 AS uid, 6000 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
mysql query return: maildir: domain.com/user/
Thank you for your help.
-- Christopher
participants (5)
-
Benny Pedersen
-
Charles Marcus
-
Christopher Stolzenberg
-
Stephan Bosch
-
Thomas Leuxner