Created attachment 189626 [details] patch This patch updates Dovecot to 2.3.0. It builds on 10.3-RELEASE and 11.1-STABLE and runs on 11.1-STABLE (I didn't test 10.x for running). I tested build with all options enabled and all disabled. It also builds on Poudriere. There's one problem, when starting Dovecot there is an error: doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory It doesn't actually do anything, Dovecot starts just fine and works. I couldn't trace this error, but I guess it's OK.
Hi Piotr. Thank you for submitting this! I'm closing out this PR because there's a lot of work already underway to upgrade Dovecot. It fixes the error you've identified as well. There are a number of other FreeBSD breakages in 2.3, most of which are already fixed upstream. At this point I think I'm going to wait for 2.3.1 before I commit it to ports.
I am running latest mail/dovecot-2.3.1_1 on 11.1-RELEASE-p9 (amd64). I still get the following error message when dovecot ist started for the first time: doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory On subsequent restarts this error does not occur. In spite of the above error dovecot works as expected.
(In reply to pvoigt from comment #2) Can you verify that /var/run/dovecot/dovecot.conf is symlinked correctly to the real dovecot.conf?
(In reply to Adam Weinberger from comment #3) Same here... FreeBSD 11.1-RELEASE-p9 (amd64) Durin Dovecot startup this ocuurs: ---- Apr 8 00:39:26 mail dovecot: master: Dovecot v2.3.1 (8e2f634) starting up for pop3 Apr 8 00:39:26 mail kernel: doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory Apr 8 00:39:26 mail kernel: Starting dovecot. --- Everything works ok, but this error... Here's some ls: # ls -las /var/run/dovecot | grep ot.conf 0 lrwx------ 1 root wheel 35 Apr 8 00:39 dovecot.conf -> /usr/local/etc/dovecot/dovecot.conf so yes, it's correctly symlinked :)
Sorry for late response. Either email notification did not work or I have missed it. Here is my dovecot.conf: # dir /var/run/dovecot/dovecot.conf lrwx------ 1 root wheel 35 Apr 7 00:38 /var/run/dovecot/dovecot.conf -> /usr/local/etc/dovecot/dovecot.conf But as already mentioned the described error only occurs on first start of dovecot. Subsequent start look fine.
Just to clarify here, does this occur only the first time you spin up dovecot after upgrading, or every time you spin up dovecot?
(In reply to Adam Weinberger from comment #6) You're right, I must be more precise: I have been observing that dovecot shows this error on my machines on every first spin up after a reboot.
Problem: doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory Cause: Unknown Description: This issue arised when upgrade dovecot to version 2.3 Detail: This occurs only at start up the system, after upgrading dovecot to 2.3, then all OK with dovecot, restart normal, no fails. Support: root@server:~ # uname -a FreeBSD myserver.domain 11.1-RELEASE-p6 FreeBSD 11.1-RELEASE-p6 #3: Wed Feb 14 05:28:12 -05 2018 root@myserver.domain:/usr/obj/usr/src/sys/TCPOPEN amd64 root@server:~ # service dovecot restart Stopping dovecot. Waiting for PIDS: 1630. Starting dovecot. root@server:~ # dmesg -a | grep dovecot ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/dovecot /usr/local/lib/gcc6 /usr/local/lib/graphviz /usr/local/lib/heimdal /usr/local/lib/mysql /usr/local/lib/mysql/plugin /usr/local/lib/nss /usr/local/lib/perl5/5.26/mach/CORE /usr/local/lib/qt5 /usr/local/libexec/openldap /usr/local/llvm50/lib doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory Starting dovecot. root@server:~ # pkg info | grep dovecot dovecot-2.3.1_1 Secure, fast and powerful IMAP and POP3 server. This problem continues in my system. Why it appears here as: "Status: Closed FIXED" ?
I'm at a bit of a loss why this is happening. I don't get this behaviour on my box. The very first time after upgrading, that message is unavoidable. The /var/run/dovecot/dovecot.conf symlink always got removed by etc/rc.d/dovecot for 2.2.x, but 2.3.x needs it to exist on startup. The rc.d/dovecot script for 2.3.1 should be leaving that file alone. Can one of you please issue 'service dovecot stop', and then 'ls -lasF /var/run/dovecot'? I'm wondering whether that symlink is actually getting deleted when dovecot is stopped, instead of sticking around.
You request: " root@server:~ # service dovecot stop Stopping dovecot. Waiting for PIDS: 4126. root@server:~ # ls -lasF /var/run/dovecot total 8 4 drwxr-xr-x 2 root wheel 1024 Apr 13 09:16 ./ 4 drwxr-xr-x 13 root wheel 1024 Apr 13 03:17 ../ 0 lrwx------ 1 root wheel 35 Apr 13 02:40 dovecot.conf@ -> /usr/local/etc/dovecot/dovecot.conf "
(In reply to Adam Weinberger from comment #9) Directly after a reboot: # ls -lasF /var/run/dovecot total 9K 1K drwxr-xr-x 2 root wheel 2 Apr 13 17:13 ./ 9K drwxr-xr-x 16 root wheel 38 Apr 13 17:13 ../ Then the first spin up with the know error message: # service dovecot start doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory And after a subsequent spin down: # service dovecot stop # ls -lasF /var/run/dovecot total 10K 1K drwxr-xr-x 2 root wheel 3 Apr 13 17:19 ./ 9K drwxr-xr-x 16 root wheel 44 Apr 13 17:16 ../ 1K lrwx------ 1 root wheel 35 Apr 13 17:16 dovecot.conf -> /usr/local/etc/dovecot/dovecot.conf
Ahh, I see what's going on. It's getting removed from /etc/rc.d/cleanvar. Can you try putting [ -L ${base_dir}/dovecot.conf ] || ln -sf ${config} ${base_dir}/dovecot.conf after line 63?
I did this: " fi [ -L ${base_dir}/dovecot.conf ] || ln -sf ${config} ${base_dir}/dovecot.conf if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then " But negative, still the issue at startup
I confirm the words of previous speakers. This error message appears after the system reboots. No errors appear after restarting only dovecot. I saw this error after upgrading to dovecot-2.3.1_1, but after updating to version 2.3.1 I didn't reboot my system. 11.1-RELEASE-p9 FreeBSD 11.1-RELEASE-p9
It happens with dovecot-2.3.1 too.
Persists in 2.3.1_2 dovecot --version 2.3.1 (8e2f634) hasse@ymer:~ % pkg info |grep "dovecot" dovecot-2.3.1_2 Secure, fast and powerful IMAP and POP3 server
Sorry, I should have commented on here sooner. It's definitely a bug, I am aware of the behaviour, and I don't have a fix right now. I can't work on this much until the second week of May. I welcome patches in the meantime.
(In reply to Adam Weinberger from comment #17) Thanks, Adam, for this status message. Please let us know, when we can start testing again.
*** Bug 227919 has been marked as a duplicate of this bug. ***
Over to new maintainer
Is this still happening with 2.3.2?
(In reply to Larry Rosenman from comment #21) Yes, it is for me, running 11.2-RELEASE and Dovecot 2.3.2 (582970113)
looks like /etc/rc.d/cleanvar was changed in 11-STABLE by: revision 332038 by kevans, Wed Apr 4 17:00:18 2018 UTC to NOT remove symlinks. I think this is a better solution than working around it in the dovecot start script. Can you update to past this revision, or pull this version of /etc/rc.d/cleanvar from svn? Thanks!
https://svnweb.freebsd.org/base/stable/11/etc/rc.d/cleanvar?r1=302408&r2=332038 is the diff.
A commit references this bug: Author: ler Date: Sun Aug 19 21:00:19 UTC 2018 New revision: 477601 URL: https://svnweb.freebsd.org/changeset/ports/477601 Log: mail/dovecot, mail/dovecot22: suppress harmless error message when the symlink in /var/run/dovecot to the config file doesn't exist. PR: 225078 Reported by: pkubaj@anongoth.pl Reviewed by: adamw MFH: 2018Q3 Changes: head/mail/dovecot/Makefile head/mail/dovecot/files/dovecot.in head/mail/dovecot22/Makefile head/mail/dovecot22/files/dovecot.in
I've committed a "fix" to suppress this (harmless) error message. The reason for the message is the dovecot binary tries to access that symlink, even when the full config path is passed to the binary.
A commit references this bug: Author: ler Date: Mon Aug 20 13:26:10 UTC 2018 New revision: 477651 URL: https://svnweb.freebsd.org/changeset/ports/477651 Log: MFH: r474275 r477601 mail/dovecot: upgrade to 2.3.2.1. v2.3.2 still had a few unexpected bugs: - SSL/TLS servers may have crashed during client disconnection - lmtp: With lmtp_rcpt_check_quota=yes mail deliveries may have sometimes assert-crashed. - v2.3.2: "make check" may have crashed with 32bit systems mail/dovecot, mail/dovecot22: suppress harmless error message when the symlink in /var/run/dovecot to the config file doesn't exist. PR: 225078 Reported by: pkubaj@anongoth.pl Reviewed by: adamw Approved by: ports-secteam (miwi) Changes: _U branches/2018Q3/ branches/2018Q3/mail/dovecot/Makefile branches/2018Q3/mail/dovecot/distinfo branches/2018Q3/mail/dovecot/files/dovecot.in branches/2018Q3/mail/dovecot22/Makefile branches/2018Q3/mail/dovecot22/files/dovecot.in