Transitioning away from mail_location = maildir:~

Chris Stankevitz chris at stankevitz.com
Sun Mar 5 00:41:53 UTC 2017


Hi,

I have been using this setup for years:

mail_home = /var/mail/vhosts/%d/%n
mail_location = maildir:~

I have since learned that mail_home and mail_location should be 
different.  I plan to use this:

mail_home = /var/mail/vhosts/%d/%n
mail_location = maildir:~/mail

I would like the transition to be transparent for my email clients.  I 
don't want mail/directories/sieve_scripts to disappear.

1. Should I manually create the maildir:~/mail directories?

2. Should I move files from /var/mail/vhosts/%d/%n into maildir:~/mail? 
Which files?  (In other words: which files are "home directory" files 
and which files are "mail files"?)

Thank you,

Chris

Example home directory:

drwx------	.
drwxr-xr-x	..
drwx------	.Archives
drwx------	.Archives.2016
drwx------	.Archives.2017
drwx------	.Drafts
drwx------	.Junk
drwx------	.Notes
drwx------	.Sent
drwx------	.Sent
drwx------	.Trash
drwx------	.work
drwx------	.home
drwx------	.todo
lrwx------	.dovecot.sieve
-rw-------	.dovecot.sieve.log
-rw-------	.dovecot.sieve.log.0
-rw-------	.dovecot.svbin
drwx------	cur
-rw-------	dovecot-keywords
-rw-------	dovecot-uidlist
-rw-------	dovecot-uidvalidity
-r--r--r--	dovecot-uidvalidity.55411048
-rw-------	dovecot.index
-rw-------	dovecot.index.cache
-rw-------	dovecot.index.log
-rw-------	dovecot.mailbox.log
drwx------	new
drwx------	sieve
-rw-------	subscriptions
drwx------	tmp

$ dovecot -n
# 2.2.27 (c0f36b0): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: FreeBSD 10.3-RELEASE-p11 amd64
lmtp_save_to_detail_mailbox = yes
mail_gid = 1002
mail_home = /var/mail/vhosts/%d/%n
mail_location = maildir:~
mail_privileged_group = vpostfix
mail_uid = 1002
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify 
environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     special_use = \Drafts
   }
   mailbox Junk {
     special_use = \Junk
   }
   mailbox Sent {
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
}
passdb {
   args = scheme=CRYPT username_format=%u /usr/local/etc/dovecot/users
   driver = passwd-file
}
plugin {
   recipient_delimiter = -
   sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = imap pop3 lmtp sieve
recipient_delimiter = -
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0666
     user = postfix
   }
   unix_listener auth-userdb {
     group = postfix
     mode = 0600
     user = postfix
   }
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0666
     user = postfix
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
}
ssl_cert = xxx
ssl_key =  xxx
userdb {
   args = username_format=%u /usr/local/etc/dovecot/users
   driver = passwd-file
}
protocol lmtp {
   mail_plugins = " sieve"
   postmaster_address = xxx
}
protocol lda {
   mail_plugins = " sieve"
}


More information about the dovecot mailing list