[Dovecot] Errors in log file
Hi,
just wonder about some errors I found with:
doveadm log errors:
… Dec 16 17:21:55 imap(roessner@****): Error: stat(/srv/mail/virtual/*****/roessner/.dovecot.sieve/tmp) failed: Not a directory …
And this is correct, it is a link:
.dovecot.sieve -> sieve/default.sieve
I do not see, where I have an error in my config ;)
root@mx ~ # doveconf -n # 2.2.9: /etc/dovecot/dovecot.conf # OS: Linux 3.11.2-hardened x86_64 Gentoo Base System release 2.2 ext4 auth_master_user_separator = * auth_mechanisms = plain login auth_verbose = yes default_vsz_limit = 512 M disable_plaintext_auth = no imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k mail_access_groups = mail mail_attachment_dir = /srv/mail/copymail/attachments mail_gid = mail mail_location = maildir:/srv/mail/virtual/%d/%n mail_plugins = quota acl fts fts_lucene zlib mail_log notify listescape mail_privileged_group = mail mail_uid = vmail 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 namespace { list = children location = maildir:%%h prefix = shared/%%u/ separator = / subscriptions = no type = shared } namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk-E-Mail { auto = subscribe special_use = \Junk } mailbox Junk { special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / type = private } passdb { args = /usr/local/sbin/ispcp-decrypt.py driver = checkpassword } plugin { acl = vfile acl_shared_dict = file:/srv/mail/virtual/shared-mailboxes.db fts = lucene fts_autoindex = yes fts_lucene = whitespace_chars=@. quota = dict:User quota::file:/srv/mail/virtual/%d/%n/dovecot-quota quota_grace = 10%% quota_rule = *:storage=2G:messages=20000 quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Mailbox is full quota_status_success = DUNNO quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u quota_warning3 = -storage=100%% quota-warning below %u sieve = ~/.dovecot.sieve sieve_dir = ~/sieve zlib_save = gz zlib_save_level = 6 } postmaster_address = postmaster@deltaweb.de protocols = imap pop3 lmtp sieve service auth-worker { extra_groups = ssl-cert unix_listener auth-worker { mode = 0600 user = vmail } user = vmail } service auth { extra_groups = ssl-cert unix_listener /var/spool/postfix.relay/private/auth { group = postfix mode = 0660 user = postfix } unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { mode = 0660 user = vmail } user = vmail } service config { unix_listener config { mode = 0600 user = vmail } } service dict { unix_listener dict { mode = 0600 user = vmail } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service lmtp { inet_listener lmtp { address = ::1 port = 24 } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } service pop3-login { inet_listener pop3s { port = 995 ssl = yes } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { port = 12340 } } service quota-warning { executable = script /usr/local/bin/quota-warning.sh user = vmail } ssl_cert = </etc/ssl/certs/mx_deltaweb_de.crt ssl_key = </etc/ssl/private/mx_deltaweb_de.key userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = quota acl fts fts_lucene zlib mail_log notify listescape sieve } protocol lda { mail_plugins = quota acl fts fts_lucene zlib mail_log notify listescape sieve } protocol imap { mail_max_userip_connections = 50 mail_plugins = quota acl fts fts_lucene zlib mail_log notify listescape imap_quota imap_acl imap_zlib }
Any ideas? Thanks in advance :)
Kind regards
-Christian Rößner
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
On 16.12.2013, at 23.46, Christian Rößner <cr@sys4.de> wrote:
Dec 16 17:21:55 imap(roessner@****): Error: stat(/srv/mail/virtual/*****/roessner/.dovecot.sieve/tmp) failed: Not a directory
This is why it's not a good idea to use home as the Maildir root directory. You can work around this by setting maildir_stat_dirs=yes (minor performance hit). A bigger problem comes if a user creates a "dovecot/sieve" folder.
Hi,
Dec 16 17:21:55 imap(roessner@****): Error: stat(/srv/mail/virtual/*****/roessner/.dovecot.sieve/tmp) failed: Not a directory
This is why it's not a good idea to use home as the Maildir root directory. You can work around this by setting maildir_stat_dirs=yes (minor performance hit). A bigger problem comes if a user creates a "dovecot/sieve" folder.
I fully agree. The mailboxes are historical from an old Courier-IMAP server. Maybe more than 5 years ago. I switched to Dovecot in the past.
Probably I will write a little script and rearrange the directory structure.
The workaround is okay for now. Thanks a lot
Enjoy the holidays
-Christian Rößner
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
Hi
Dec 16 17:21:55 imap(roessner@****): Error: stat(/srv/mail/virtual/*****/roessner/.dovecot.sieve/tmp) failed: Not a directory
This is why it's not a good idea to use home as the Maildir root directory. You can work around this by setting maildir_stat_dirs=yes (minor performance hit). A bigger problem comes if a user creates a "dovecot/sieve" folder.
I fully agree. The mailboxes are historical from an old Courier-IMAP server. Maybe more than 5 years ago. I switched to Dovecot in the past.
Probably I will write a little script and rearrange the directory structure.
Solved! 15.000 lines bash script and now I have a perfect clean directory structure and all problems are gone
Happy holidays Christian
On 2013-12-20 6:47 PM, Christian Rößner <cr@sys4.de> wrote:
This is why it's not a good idea to use home as the Maildir root directory. You can work around this by setting maildir_stat_dirs=yes (minor performance hit). A bigger problem comes if a user creates a "dovecot/sieve" folder.
I fully agree. The mailboxes are historical from an old Courier-IMAP server. Maybe more than 5 years ago. I switched to Dovecot in the past.
Probably I will write a little script and rearrange the directory structure.
Solved! 15.000 lines bash script and now I have a perfect clean directory structure and all problems are gone
Care to share the script? I collect cool little things like this in case I ever need something like it...
--
Best regards,
*/Charles/*
Hi,
This is why it's not a good idea to use home as the Maildir root directory. You can work around this by setting maildir_stat_dirs=yes (minor performance hit). A bigger problem comes if a user creates a "dovecot/sieve" folder.
I fully agree. The mailboxes are historical from an old Courier-IMAP server. Maybe more than 5 years ago. I switched to Dovecot in the past.
Probably I will write a little script and rearrange the directory structure.
Solved! 15.000 lines bash script and now I have a perfect clean directory structure and all problems are gone
Care to share the script? I collect cool little things like this in case I ever need something like it...
Of course. This script is a python script that generates the bash script. It assumes that the maildir is directly und a users home and that also the sieve folder lives inside the maildir. But the script is very simple, so you can adopt it to your needs:
Second, it looks for a sieve script called default.sieve, which I told roundcube to use as a name. So maybe you need to adjust this as well.
The result looks something like:
#!/bin/bash
P=/srv/mail/virtual
umask 077
…
mv ${P}/deltaweb.de/cr ${P}/deltaweb.de/__maildir__cr__
mkdir ${P}/deltaweb.de/cr
chown vmail:mail ${P}/deltaweb.de/cr
mv ${P}/deltaweb.de/__maildir__cr__ ${P}/deltaweb.de/cr/maildir
mkdir ${P}/deltaweb.de/cr/sieve
chown vmail:mail ${P}/deltaweb.de/cr/sieve
if [[ -f ${P}/deltaweb.de/cr/maildir/sieve/default.sieve ]]; then
mv ${P}/deltaweb.de/cr/maildir/sieve/default.sieve ${P}/deltaweb.de/cr/sieve/
test -f ${P}/deltaweb.de/cr/maildir/.dovecot.svbin &&
mv ${P}/deltaweb.de/cr/maildir/.dovecot.svbin ${P}/deltaweb.de/cr/
test -f ${P}/deltaweb.de/cr/maildir/.dovecot.lda-dupes &&
mv ${P}/deltaweb.de/cr/maildir/.dovecot.lda-dupes ${P}/deltaweb.de/cr/
test -f ${P}/deltaweb.de/cr/maildir/.dovecot.sieve.log &&
mv ${P}/deltaweb.de/cr/maildir/.dovecot.sieve.log ${P}/deltaweb.de/cr/
( cd ${P}/deltaweb.de/cr; ln -s sieve/default.sieve .dovecot.sieve )
rm -f ${P}/deltaweb.de/cr/maildir/.dovecot.sieve
fi
rm -rf ${P}/deltaweb.de/cr/maildir/sieve
…
exit 0
It is not perfect, but for our server it did the trick ;-) So enjoy…
-Christian Rößner
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
participants (3)
-
Charles Marcus
-
Christian Rößner
-
Timo Sirainen