Re: new problem
Everything is written in the message. Wrong permission means that dovecot can't write to some directories. Simply check... Ursprüngliche Nachricht Von: Walter Ulmke Gesendet: 14. Juni 2018 00:49:18 MESZ An: dovecot@dovecot.org Betreff: new problem 1) my inbox is "Posteingang". should I officially declare it somewhere? I now get the following error messages: Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: Couldn't create mailbox list lock /u/ulw/Mail/mailboxes.lock: file_create_locked(/u/ulw/Mail/mailboxes.lock) failed: safe_mkstemp(/u/ulw/Mail/mailboxes.lock) failed: Permission denied Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: file_dotlock_create(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: open(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied Jun 14 00:23:43 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Also, when I start Thunderbird I get the following error message: "der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der Server des Kontos antwortete (Serverbug) Internal error ocurred. Refer to server log WHERE IS THE SERVER LOG? -- -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
Re: new problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 14 Jun 2018, Walter Ulmke wrote: 1) my inbox is "Posteingang". should I officially declare it somewhere? I now get the following error messages: Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) https://www.dovecot.org/list/dovecot/2014-November/098808.html Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: Couldn't create mailbox list lock /u/ulw/Mail/mailboxes.lock: file_create_locked(/u/ulw/Mail/mailboxes.lock) failed: safe_mkstemp(/u/ulw/Mail/mailboxes.lock) failed: Permission denied Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: file_dotlock_create(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: open(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied Jun 14 00:23:43 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Also, when I start Thunderbird I get the following error message: "der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der Server des Kontos antwortete (Serverbug) Internal error ocurred. Refer to server log WHERE IS THE SERVER LOG? What you've posted amd what contains a detailed error description. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBWyH30cQnQQNheMxiAQJXkQgAybOI2jhLcRgIlEXOSuLq9tP3d3epkVHO QUZ3Ehd415NyVeXW4f7npOuycyRWpa0d8bwwnLwYITbHeNDtJMeVUWqfDMq6JIA3 x9I++9EifRlOacfcFrd24w1Ivtu2mNxs261Ii1wLDxEDaB6D8UvWPUS3vKZ+DPt8 oM7r5XS5M9NhedgmXcL+pnAiGSqUz+ucvuYSUf7ghsJZg/gJTE2Ogz+YOI+5O5HS YYt+6vqqrxUA3qcHc3iXLrf0U3AbMxXAIxaBVlxlOLkeFucyLL0R3jC6ubgB/AzL tpNqmoM7ftD0l7oJGM3fofFGaC6DrB2L8kFS2MRx263K291Z1KLFPQ== =sNJL -END PGP SIGNATURE-
new problem
1) my inbox is "Posteingang". should I officially declare it somewhere? I now get the following error messages: Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: opendir(/u/ulw/Mail) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:32 ulmke2 dovecot[3981]: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Error: Couldn't create mailbox list lock /u/ulw/Mail/mailboxes.lock: file_create_locked(/u/ulw/Mail/mailboxes.lock) failed: safe_mkstemp(/u/ulw/Mail/mailboxes.lock) failed: Permission denied Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: file_dotlock_create(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Jun 14 00:23:33 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: Mailbox INBOX: open(/u/ulw/Mail/dovecot-uidlist) failed: Permission denied Jun 14 00:23:43 ulmke2 dovecot[3981]: Error: imap(ulw)<3997><4O/Xbo1uotLAqGQd>: open(/u/ulw/Mail/dovecot.index.log) failed: Permission denied (euid=503(ulw) egid=100(users) UNIX perms appear ok (ACL/MAC wrong?)) Also, when I start Thunderbird I get the following error message: "der aktuelle Vorgang in "Posteingang" ist fehlgeschlagen. Der Server des Kontos antwortete (Serverbug) Internal error ocurred. Refer to server log WHERE IS THE SERVER LOG? -- -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
can't login to Dovecot solved
solved. It was doen to not being able to log in in "plain" -- -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
Re: Sieve_default
On 13 Jun 2018, at 12:51, Sami Ketola wrote: > Are you sure your sieve even gets executed? Anything in the logs? can you > enable mail_debug=yes and try again? > Can you post your doveconf -n? I am not sure. I’ve made a couple of changes (put the default script and compiled script into their own folder and defined sieve_global), but still no joy. In fact, things are worse now as the report scripts have stopped working: imap(kremels): Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-spam.sieve failed # ls -ls /usr/lib/dovecot/sieve/ total 72 8 drwxr-xr-x 2 root wheel 512 Jun 13 11:42 global 8 -rw-r--r-- 1 root wheel 62 May 14 06:08 mark-read.sieve 8 -rw-r--r-- 1 root wheel 192 May 14 06:12 mark-read.svbin 8 -rwxr-xr-x 1 root wheel 314 Feb 12 20:10 report-ham.sieve 8 -rwxr-xr-x 1 root wheel 448 Feb 12 20:10 report-ham.svbin 8 -rwxr-xr-x 1 root wheel 199 Feb 12 20:10 report-spam.sieve 8 -rwxr-xr-x 1 root wheel 354 Feb 12 20:10 report-spam.svbin 8 -rwxr-xr-x 1 root wheel 53 Feb 12 20:12 sa-learn-ham.sh 8 -rwxr-xr-x 1 root wheel 54 Feb 12 20:12 sa-learn-spam.sh # 2.2.35 (b1cb664): /usr/local/etc/dovecot/dovecot.conf # Pigeonhole version 0.4.23 (b2e41927) # OS: FreeBSD 11.1-RELEASE-p4 i386 # Hostname: mail.covisp.net auth_failure_delay = 5 secs auth_mechanisms = PLAIN LOGIN default_client_limit = 4096 default_process_limit = 1024 default_vsz_limit = 768 M disable_plaintext_auth = no first_valid_uid = 89 imap_id_log = * lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=<%u> %r %m %c mail_location = maildir:~/Maildir mail_max_userip_connections = 90 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 inbox { inbox = yes location = mailbox Archive { auto = subscribe special_use = \Archive } mailbox Drafts { special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam username_filter = !*@* } passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve imapsieve_mailbox3_causes = COPY imapsieve_mailbox3_name = Archive sieve = file:~/.sieve;active=~/.active_sieve sieve_default = /usr/lib/dovecot/sieve/global/default.sieve sieve_default_name = spamassassin sieve_global = /usr/lib/dovecot/sieve/global/ sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 995 ssl = yes } } ssl_cert =
Re: cant login to Dovecot
On Wed, 13 Jun 2018, Walter Ulmke wrote: I started with a fresh doveconfig directory and implemented the suf?gestions in the above Document. ... dovecot status says: ... Jun 13 15:27:32 ulmke2 dovecot[14622]: Error: service(imap-login): listen(*, 993) fai> You've chopped off the most import part at the end: the reason why it could not open the IMAP port. Nevertheless, I fed this fragment into Google and got https://bugzilla.redhat.com/show_bug.cgi?id=873188 but it's a wild guess if it has anything to do with your problem. At least before it started Right, the problem here is more basic. Once you get over this, you can move forward to success or the next problem. Joseph Tam
Re: Sieve_default
> On 13 Jun 2018, at 20.26, @lbutlr wrote: > > > >> On 12 Jun 2018, at 01:23, Alex JOST wrote: >> >> Am 12.06.2018 um 01:01 schrieb @lbutlr: >>> I created a sieve_default to move any spam-tagged messages into the Junk >>> mailbox automatically, but it doesn’t appear to be working (though the >>> other imapsieve_mailbox… scripts are working). >>> From doveconf -n >>> plugin { >>> imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve >>> imapsieve_mailbox1_causes = COPY >>> imapsieve_mailbox1_name = Junk >>> imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve >>> imapsieve_mailbox2_causes = COPY >>> imapsieve_mailbox2_from = Junk >>> imapsieve_mailbox2_name = * >>> imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve >>> imapsieve_mailbox3_causes = COPY >>> imapsieve_mailbox3_name = Archive >>> sieve = file:~/.sieve;active=~/.active_sieve >>> sieve_default = /usr/lib/dovecot/sieve/default.sieve >>> sieve_default_name = spamassassin >>> sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment >>> sieve_pipe_bin_dir = /usr/lib/dovecot/sieve >>> sieve_plugins = sieve_imapsieve sieve_extprograms >>> } >>> And >>> # cat /usr/lib/dovecot/sieve/default.sieve >>> if header :contains "X-spam-flag" "YES" { >>> fileinto "Junk"; >>> } >>> There are no user sieve files >>> # find /home -name "*sieve*" -type f >>> # >>> The x-spam-flag header in the message in my mailbox is definitely there and >>> definitely set to yes. >> >> I think you need to enable the 'fileinto' extension via 'require'. And did >> you pre-compile the script? > > I added > > require "fileinto”; > > To default.sieve > > I did not pre-compile the script, but according to the docs that should not > prevent it from working. > > Spam, messages are still not being filed in to Junk, however. Are you sure your sieve even gets executed? Anything in the logs? can you enable mail_debug=yes and try again? Can you post your doveconf -n? Sami
Re: Sieve_default
> On 13 Jun 2018, at 20:26, @lbutlr wrote: > > I added > > require "fileinto”; > > To default.sieve > > I did not pre-compile the script, but according to the docs that should not > prevent it from working. > > Spam, messages are still not being filed in to Junk, however. Anything in the logs?
Re: Sieve_default
> On 12 Jun 2018, at 01:23, Alex JOST wrote: > > Am 12.06.2018 um 01:01 schrieb @lbutlr: >> I created a sieve_default to move any spam-tagged messages into the Junk >> mailbox automatically, but it doesn’t appear to be working (though the other >> imapsieve_mailbox… scripts are working). >> From doveconf -n >> plugin { >> imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve >> imapsieve_mailbox1_causes = COPY >> imapsieve_mailbox1_name = Junk >> imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve >> imapsieve_mailbox2_causes = COPY >> imapsieve_mailbox2_from = Junk >> imapsieve_mailbox2_name = * >> imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve >> imapsieve_mailbox3_causes = COPY >> imapsieve_mailbox3_name = Archive >> sieve = file:~/.sieve;active=~/.active_sieve >> sieve_default = /usr/lib/dovecot/sieve/default.sieve >> sieve_default_name = spamassassin >> sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment >> sieve_pipe_bin_dir = /usr/lib/dovecot/sieve >> sieve_plugins = sieve_imapsieve sieve_extprograms >> } >> And >> # cat /usr/lib/dovecot/sieve/default.sieve >> if header :contains "X-spam-flag" "YES" { >> fileinto "Junk"; >> } >> There are no user sieve files >> # find /home -name "*sieve*" -type f >> # >> The x-spam-flag header in the message in my mailbox is definitely there and >> definitely set to yes. > > I think you need to enable the 'fileinto' extension via 'require'. And did > you pre-compile the script? I added require "fileinto”; To default.sieve I did not pre-compile the script, but according to the docs that should not prevent it from working. Spam, messages are still not being filed in to Junk, however.
Re: can't login to Dovecot
> On 13 June 2018 at 18:31 Walter Ulmke wrote: > > > > I've managed to turn on "plain" and now it seems I can logon. > > Jun 13 17:24:20 ulmke2 dovecot[1973]: imap(ulw)<2474><+kyqk4du5M7AqGQd>: > Namespace '': Mail storage autodetection failed with home=/u/ulw in=0 > out=373 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 > body_count=0 body_bytes=0 > Jun 13 17:24:20 ulmke2 dovecot[1973]: imap-login: Login: user=, > method=PLAIN, rip=192.168.100.29, lip=192.168.100.2, mpid=2476, > session= > Jun 13 17:24:20 ulmke2 dovecot[1973]: imap(ulw)<2476>: > Error: Namespace '': Mail storage autodetection failed with home=/u/ulw > > > All users mailboxes are $HOME/Mail > > How do I tell Dovecot this? > > -- mail_location = maildir:~/Mail # or whatever driver you use Aki
can't login to Dovecot
I've managed to turn on "plain" and now it seems I can logon. Jun 13 17:24:20 ulmke2 dovecot[1973]: imap(ulw)<2474><+kyqk4du5M7AqGQd>: Namespace '': Mail storage autodetection failed with home=/u/ulw in=0 out=373 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0 Jun 13 17:24:20 ulmke2 dovecot[1973]: imap-login: Login: user=, method=PLAIN, rip=192.168.100.29, lip=192.168.100.2, mpid=2476, session= Jun 13 17:24:20 ulmke2 dovecot[1973]: imap(ulw)<2476>: Error: Namespace '': Mail storage autodetection failed with home=/u/ulw All users mailboxes are $HOME/Mail How do I tell Dovecot this? -- -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
can't login to Dovecot
I have now deleted EVERYTHING and installed fresh. Now at least it starts doveconf -n: 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 = passdb { driver = pam } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve } ssl_cipher_list = ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH ssl_options = no_compression ssl_prefer_server_ciphers = yes userdb { driver = passwd } --- looks like PAM is already configured. I CAN'T LOKIN USING PLAIN TEXT. HOW DO i TURN THIS OFF?? -- -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
Re: cant login to Dovecot
On 2018-06-13 00:09, Joseph Tam wrote: On Tue, 12 Jun 2018, Walter Ulmke wrote: ... and just want to login using the standard Linux login Depends on what you which "standard" you mean but I'll just assume you're using PAM, as suggested by your config. auth_mechanisms = plain login digest-md5 cram-md5 ntlm rpa apop anonymous Looks like you did a kitchen sink configuration in hopes something will work, but it's probably interfering. Just "plain" and "login" is fine. passdb { driver = pam } I don't use PAM, but it looks like you may be a few parameters short. Did you install pam/dovecot config? https://wiki2.dovecot.org/PasswordDatabase/PAM Joseph Tam this is driving me mad. I still can't login. I started with a fresh doveconfig directory and implemented the sufǵgestions in the above Document. Now doveconfig -n gives me: 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 = prefix = } passdb { driver = pam } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve } ssl_cipher_list = ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH ssl_options = no_compression ssl_prefer_server_ciphers = yes userdb { driver = passwd } dovecot status says: Jun 13 15:27:32 ulmke2 systemd[1]: Started Dovecot IMAP/POP3 email server. Jun 13 15:27:32 ulmke2 systemd[1]: dovecot.service: Main process exited, code=exited,> Jun 13 15:27:32 ulmke2 dovecot[14622]: Error: service(imap-login): listen(*, 993) fai> Jun 13 15:27:32 ulmke2 dovecot[14622]: Fatal: Failed to start listeners Jun 13 15:27:32 ulmke2 systemd[1]: dovecot.service: Unit entered failed state. Jun 13 15:27:32 ulmke2 systemd[1]: dovecot.service: Failed with result 'exit-code'. At least before it started -- Best Regards, Walter Ulmke Ulmke Machine Tools, 48496 Hopsten, Germany Tel. ++49/5458/93345-0 Fax. ++49/5458/93345-45 Mobile: ++49/172/5357999 eMail: u...@ulmke.com Dipl.-Ing. Walter Ulmke e.K. AG Steinfurt HRA 4384
Re: 2.3.1 Replication is throwing scary errors
Err, attached the wrong patches. the correct ones are attached to this mail (0004, 0005, 0006). On 13.06.18 - 13:29, Thore Bödecker wrote: > > For reference: I'm using the official 2.3.1 tarball together with the > 3 attached patches, that have been taken from GitHub diffs/commits > linked to me by Aki in the #dovecot channel. > Cheers, Thore -- Thore Bödecker GPG ID: 0xD622431AF8DB80F3 GPG FP: 0F96 559D 3556 24FC 2226 A864 D622 431A F8DB 80F3 From a952e178943a5944255cb7c053d970f8e6d49336 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 5 Jun 2018 20:23:52 +0300 Subject: [PATCH] doveadm-server: Fix hang when sending a lot of output to clients Nowadays ostream adds its io to the stream's specified ioloop, not to current ioloop. --- src/doveadm/client-connection-tcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doveadm/client-connection-tcp.c b/src/doveadm/client-connection-tcp.c index a2e1358d7f..672017495d 100644 --- a/src/doveadm/client-connection-tcp.c +++ b/src/doveadm/client-connection-tcp.c @@ -336,6 +336,9 @@ static int doveadm_cmd_handle(struct client_connection_tcp *conn, running one and we can't call the original one recursively, so create a new ioloop. */ conn->ioloop = io_loop_create(); + o_stream_switch_ioloop(conn->output); + if (conn->log_out != NULL) + o_stream_switch_ioloop(conn->log_out); if (cmd_ver2 != NULL) doveadm_cmd_server_run_ver2(conn, argc, argv, cctx); From 59cd19919bf444e5c3fa429314408aacc8dd4eb8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 24 Apr 2018 18:47:28 +0300 Subject: [PATCH 1/2] lib-storage: Add mail_user_home_mkdir() --- src/lib-storage/mail-user.c | 61 + src/lib-storage/mail-user.h | 5 2 files changed, 66 insertions(+) diff --git a/src/lib-storage/mail-user.c b/src/lib-storage/mail-user.c index 947e26cee4..a15ed353ff 100644 --- a/src/lib-storage/mail-user.c +++ b/src/lib-storage/mail-user.c @@ -8,6 +8,7 @@ #include "module-dir.h" #include "home-expand.h" #include "file-create-locked.h" +#include "mkdir-parents.h" #include "safe-mkstemp.h" #include "str.h" #include "strescape.h" @@ -716,6 +717,66 @@ void mail_user_stats_fill(struct mail_user *user, struct stats *stats) user->v.stats_fill(user, stats); } +static int +mail_user_home_mkdir_try_ns(struct mail_namespace *ns, const char *home) +{ + const enum mailbox_list_path_type types[] = { + MAILBOX_LIST_PATH_TYPE_DIR, + MAILBOX_LIST_PATH_TYPE_ALT_DIR, + MAILBOX_LIST_PATH_TYPE_CONTROL, + MAILBOX_LIST_PATH_TYPE_INDEX, + MAILBOX_LIST_PATH_TYPE_INDEX_PRIVATE, + MAILBOX_LIST_PATH_TYPE_INDEX_CACHE, + MAILBOX_LIST_PATH_TYPE_LIST_INDEX, + }; + size_t home_len = strlen(home); + const char *path; + + for (unsigned int i = 0; i < N_ELEMENTS(types); i++) { + if (!mailbox_list_get_root_path(ns->list, types[i], )) + continue; + if (strncmp(path, home, home_len) == 0 && + (path[home_len] == '\0' || path[home_len] == '/')) { + return mailbox_list_mkdir_root(ns->list, path, + types[i]) < 0 ? -1 : 1; + } + } + return 0; +} + +int mail_user_home_mkdir(struct mail_user *user) +{ + struct mail_namespace *ns; + const char *home; + int ret; + + if (mail_user_get_home(user, ) < 0) + return -1; + + /* Try to create the home directory by creating the root directory for + a namespace that exists under the home. This way we end up in the + special mkdir() code in mailbox_list_try_mkdir_root_parent(). + Start from INBOX, since that's usually the correct place. */ + ns = mail_namespace_find_inbox(user->namespaces); + if ((ret = mail_user_home_mkdir_try_ns(ns, home)) != 0) + return ret < 0 ? -1 : 0; + /* try other namespaces */ + for (ns = user->namespaces; ns != NULL; ns = ns->next) { + if ((ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0) { + /* already tried the INBOX namespace */ + continue; + } + if ((ret = mail_user_home_mkdir_try_ns(ns, home)) != 0) + return ret < 0 ? -1 : 0; + } + /* fallback to a safe mkdir() with 0700 mode */ + if (mkdir_parents(home, 0700) < 0 && errno != EEXIST) { + i_error("mkdir_parents(%s) failed: %m", home); + return -1; + } + return 0; +} + static const struct var_expand_func_table mail_user_var_expand_func_table_arr[] = { { "userdb", mail_user_var_expand_func_userdb }, { NULL, NULL } diff --git a/src/lib-storage/mail-user.h
Re: 2.3.1 Replication is throwing scary errors
Hey all, almost 48h ago I upgraded both my instances to 2.3.1 again to see if the new patches would fix the replication issues for me. So far, the result is: great. I haven't been able to provoke any kind of I/O stall or persisting queued/failed resync requests in my replication setup. Newly added users are replicated instantly upon the first received mails and the home directory gets created without issues now too. For reference: I'm using the official 2.3.1 tarball together with the 3 attached patches, that have been taken from GitHub diffs/commits linked to me by Aki in the #dovecot channel. I can only encourage everyone to try out 2.3.1 again with these 3 patches to make sure it is rock-solid so that we might get a proper and stable 2.3.2 release soon-ish :) PS: For the Arch Linux users among you the dovecot-2.3.1-5 package in the official repo contains said three patches :) Cheers, Thore -- Thore Bödecker GPG ID: 0xD622431AF8DB80F3 GPG FP: 0F96 559D 3556 24FC 2226 A864 D622 431A F8DB 80F3 commit 890883f12e8d8dd3309743eb95cf0b04f6e39ea0 Author: Aki Tuomi Date: Mon Mar 19 18:39:27 2018 +0200 dsync: Revert to /tmp if home does not exist Fixes doveadm: Error: Couldn't lock .dovecot-sync.lock: safe_mkstemp(.dovecot-sync.lock) failed: No such file or directory diff --git a/src/doveadm/dsync/dsync-brain.c b/src/doveadm/dsync/dsync-brain.c index c2b8169..1e84182 100644 --- a/src/doveadm/dsync/dsync-brain.c +++ b/src/doveadm/dsync/dsync-brain.c @@ -401,6 +401,7 @@ dsync_brain_lock(struct dsync_brain *brain, const char *remote_hostname) .lock_method = FILE_LOCK_METHOD_FCNTL, }; const char *home, *error, *local_hostname = my_hostdomain(); + struct stat st; bool created; int ret; @@ -437,8 +438,21 @@ dsync_brain_lock(struct dsync_brain *brain, const char *remote_hostname) if (brain->verbose_proctitle) process_title_set(dsync_brain_get_proctitle_full(brain, DSYNC_BRAIN_TITLE_LOCKING)); - brain->lock_path = p_strconcat(brain->pool, home, - "/"DSYNC_LOCK_FILENAME, NULL); + + /* if homedir does not yet exist, create lock under tmpdir */ + if (stat(home, ) < 0) { + if (errno != ENOENT) { + i_error("stat(%s) failed: %m", home); + return -1; + } + brain->lock_path = p_strdup_printf(brain->pool, "%s/%s-%s", + brain->user->set->mail_temp_dir, + brain->user->username, + "/"DSYNC_LOCK_FILENAME); + } else { + brain->lock_path = p_strconcat(brain->pool, home, + "/"DSYNC_LOCK_FILENAME, NULL); + } brain->lock_fd = file_create_locked(brain->lock_path, _set, >lock, , ); if (brain->lock_fd == -1) From a952e178943a5944255cb7c053d970f8e6d49336 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 5 Jun 2018 20:23:52 +0300 Subject: [PATCH] doveadm-server: Fix hang when sending a lot of output to clients Nowadays ostream adds its io to the stream's specified ioloop, not to current ioloop. --- src/doveadm/client-connection-tcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doveadm/client-connection-tcp.c b/src/doveadm/client-connection-tcp.c index a2e1358d7f..672017495d 100644 --- a/src/doveadm/client-connection-tcp.c +++ b/src/doveadm/client-connection-tcp.c @@ -336,6 +336,9 @@ static int doveadm_cmd_handle(struct client_connection_tcp *conn, running one and we can't call the original one recursively, so create a new ioloop. */ conn->ioloop = io_loop_create(); + o_stream_switch_ioloop(conn->output); + if (conn->log_out != NULL) + o_stream_switch_ioloop(conn->log_out); if (cmd_ver2 != NULL) doveadm_cmd_server_run_ver2(conn, argc, argv, cctx); From 59cd19919bf444e5c3fa429314408aacc8dd4eb8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 24 Apr 2018 18:47:28 +0300 Subject: [PATCH 1/2] lib-storage: Add mail_user_home_mkdir() --- src/lib-storage/mail-user.c | 61 + src/lib-storage/mail-user.h | 5 2 files changed, 66 insertions(+) diff --git a/src/lib-storage/mail-user.c b/src/lib-storage/mail-user.c index 947e26cee4..a15ed353ff 100644 --- a/src/lib-storage/mail-user.c +++ b/src/lib-storage/mail-user.c @@ -8,6 +8,7 @@ #include "module-dir.h" #include "home-expand.h" #include "file-create-locked.h" +#include "mkdir-parents.h" #include "safe-mkstemp.h" #include "str.h" #include "strescape.h" @@ -716,6 +717,66 @@ void mail_user_stats_fill(struct mail_user *user, struct stats *stats) user->v.stats_fill(user, stats); } +static int