I am using dovecot 2.2.13 on gentoo 64bit.
When new email arrives it stays in new/ directory instead to be moved to cur/ directory.
I read that maildir_empty_new = yes
was added to /etc/dovecot/conf.d/10-mail.conf
but that is not working.
Do I have to uncomment something else as well in order this to work (or comment something else)?
This is important to me because dovecot-uidlist is updated with next UID only when I check new email with my mail client. I have some procmail pipe script and I need next uid (which i am getting by parsing dovecot-uidlist).
Maybe I can use doveadm
along with my pipe script in order to move from new/ to cur/ and then update dovecot-uidlist.
This is my dovecot -n
:
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.5-gentoo x86_64 Gentoo Base System release 2.2
auth_mechanisms = plain login digest-md5
first_valid_gid = 500
last_valid_gid = 2000
last_valid_uid = 2000
login_greeting = Santa server is ready.
mail_gid = vmail
mail_location = /var/vmail/%d/%n/:INDEX=/var/vmail/%d/%n/indexes
mail_uid = vmail
maildir_empty_new = yes
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 ihave duplicate
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 = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0666
user = vmail
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0666
user = postfix
}
}
ssl_ca = </etc/ssl/dovecot/server.in.crt
ssl_cert = </etc/ssl/dovecot/server.csr.rapid
ssl_key = </etc/ssl/dovecot/server.key.rapid
ssl_key_password = pass
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
UPDATE
I found this on dovecot website:
~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the
messages for INBOX. The tmp directory is used during delivery, new
messages arrive in new and read shall be moved to cur by the clients.
So it seams that moving new message to cur is not default dovecot behaviour.
It would be great if I could somehow do that manually then but with update of dovecot-uidlist.
Best Answer
If you want to use maildir format, you need to specify that in your configuration. Try changing:
to:
I use procmail with MAILDIR specified as
$HOME/Maildir/
. Mail is delivered to$HOME/Maildir/new
with names like1417748317.25141_1.myhost
. When I pick mail up dovecot move them to$HOME/Maildir/new
and appends:2,
to the filename. When the file is read flags are appended. I don't need to know dovecot's uid to handle the messages. I have procmail filtering mail into other mailboxes, and those are handled well without knowing dovecot's UIDs for that folder.