Hello,
I'm using Dovecot 2.3.19.1 and Pigeonhole 0.5.19 on Debian 12.1 and I'm
trying to use sieve extensions vacation and redirect but I'm having
issues because of the creation of file /home/USER/.dovecot.lda-dupes and
dir /home/USER/.dovecot.lda-dupes.locks
The error in logs is pretty clear, lda doesn't have perms to create any
of them because /home/USER/ is owned by root
# namei -mo /home/user2/
f: /home/user2/
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x root root user2
I'm using Hestia Control Panel and it chroot the users and that is the
reason the user's home is owned by root. Mail users are virtual and the
maildir home is /home/user2/mail/domain2.tld/postmaster (%h/mail/%d/%n)
but the .dovecot.lda-dupes* file and dir are trying to use /home/user2/
instead of /home/user2/mail/domain2.tld/postmaster/ where they have
perms and that should solve the issue.
So, the question, is there any way to create .dovecot.lda-dupes*
file/dir in virtual user's home %h/mail/%d/%n instead of user's home %h?
or, is there any other solution/workaround where I don't need to change
/home/USER/ owner/perms?
If you want to check them, below are the logs and my dovecot conf.
Appreciate your support.
Best regards,
sahsanu
This is the sieve log using vacation extension:
sieve: info: started log at 2023-09-21 13:17:06 +0200.
error: msgid=<102288b1348f270d83363f71bb7bc...@example.com>: vacation
action: failed to check for duplicate vacation response: internal error
occurred: refer to server log for more information. [2023-09-21
13:17:06].
This is the dovecot log using sieve vacation extension:
Sep 21 13:17:06
lda(postmas...@domain2.tld)<2711250><SHdgDzImDGXSXikAElSLcQ>: Error:
duplicate db: transaction:
file_dotlock_open(/home/user2/.dovecot.lda-dupes) failed: Permission
denied
Sep 21 13:17:06
lda(postmas...@domain2.tld)<2711250><SHdgDzImDGXSXikAElSLcQ>: Error:
duplicate db: transaction: Failed to lock
/home/user2/.dovecot.lda-dupes.locks/duplicate.lock.ea887f77f1f61464f902ada5e7bfb022:
mkdir_parents(/home/user2/.dovecot.lda-dupes.locks) failed: Permission
denied
This is the sieve log using redirect extension:
sieve: info: started log at 2023-09-21 16:51:46 +0200.
error: msgid=<8f1cdb9c-0997-4e32-a28f-65e5f3f8dca6.maildroid@localhost>:
redirect action: failed to check for duplicate forward: internal error
occurred: refer to server log for more information. [2023-09-21
16:51:46].
This is the dovecot log using sieve redirect extension:
Sep 21 16:51:46
lda(postmas...@domain2.tld)<2785960><03j9DoJYDGWogioAElSLcQ>: Error:
duplicate db: transaction:
file_dotlock_open(/home/user2/.dovecot.lda-dupes) failed: Permission
denied
Sep 21 16:51:46
lda(postmas...@domain2.tld)<2785960><03j9DoJYDGWogioAElSLcQ>: Error:
duplicate db: transaction: Failed to lock
/home/user2/.dovecot.lda-dupes.locks/duplicate.lock.291440db1d5e4457ecf50cd02882634b:
mkdir_parents(/home/user2/.dovecot.lda-dupes.locks) failed: Permission
denied
Dovecot conf:
# 2.3.19.1 (9b53102964): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.19 (4eae2f79)
# OS: Linux 6.1.0-12-amd64 x86_64 Debian 12.1
# Hostname: server.domain1.tld
auth_mechanisms = plain login
auth_verbose = yes
base_dir = /run/dovecot/
log_path = /var/log/dovecot.log
login_greeting = Mail Delivery Agent
mail_access_groups = mail
mail_attribute_dict = file:%h/mail/%d/%n/dovecot-attributes
mail_location = maildir:%h/mail/%d/%n
mail_privileged_group = mail
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 imapflags notify imapsieve vnd.dovecot.imapsieve
namespace {
inbox = yes
list = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox "Deleted Messages" {
auto = no
special_use = \Trash
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = no
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Mail" {
auto = no
special_use = \Sent
}
mailbox "Sent Messages" {
auto = no
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
separator = /
type = private
}
passdb {
args = scheme=MD5-CRYPT username_format=%n
/etc/exim4/domains/%d/passwd
driver = passwd-file
}
plugin {
imapsieve_mailbox1_before = file:/var/mail/sieve/report_spam.sieve
imapsieve_mailbox1_causes = COPY APPEND
imapsieve_mailbox1_name = Spam
imapsieve_mailbox2_before = file:/var/mail/sieve/report_ham.sieve
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_from = Spam
imapsieve_mailbox2_name = *
imapsieve_url = sieve://127.0.0.1:4190
quota = maildir:User quota
sieve = file:~/mail/%d/%n/sieve;active=~/mail/%d/%n/dovecot.sieve
sieve_extensions = +notify +imapflags
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
sieve_pipe_bin_dir = /etc/dovecot/sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_vacation_send_from_recipient = yes
}
protocols = imap sieve
service auth {
extra_groups = mail
unix_listener auth-client {
group = mail
mode = 0660
user = dovecot
}
unix_listener auth-master {
group = mail
mode = 0660
user = dovecot
}
user = dovecot
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service stats {
unix_listener stats-writer {
group = mail
mode = 0660
user = dovecot
}
}
ssl_cert = </usr/local/hestia/ssl/certificate.crt
ssl_cipher_list =
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
args = username_format=%n /etc/exim4/domains/%d/passwd
driver = passwd-file
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = " quota sieve"
}
protocol imap {
mail_plugins = quota imap_quota imap_sieve
}
protocol sieve {
managesieve_implementation_string = Dovecot Pigeonhole
managesieve_max_line_length = 64 k
}
protocol pop3 {
mail_plugins = quota
}
local_name domain1.tld {
ssl_cert = </home/user1/conf/mail/domain1.tld/ssl/domain1.tld.pem
ssl_key = # hidden, use -P to show it
}
local_name mail.domain1.tld {
ssl_cert = </home/user1/conf/mail/domain1.tld/ssl/domain1.tld.pem
ssl_key = # hidden, use -P to show it
}
local_name domain2.tld {
ssl_cert = </home/user2/conf/mail/domain2.tld/ssl/domain2.tld.pem
ssl_key = # hidden, use -P to show it
}
local_name mail.domain2.tld {
ssl_cert = </home/user2/conf/mail/domain2.tld/ssl/domain2.tld.pem
ssl_key = # hidden, use -P to show it
}
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org