more generic approach as for userdb? (was: Dict issue with PostgreSQL for last_login plugin (duplicate key))
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 22 May 2019, John Fawcett via dovecot wrote: an update when insert fails seems to be a MySQL specific extension to standard Sql. So I think that it's clear that support for PostgreSql and Sqlite needs to be implemented. The same issue likely exist in other plugins too, for example expire. My doubts are around the right solution to adopt. Initially I thought that there was a PostgreSql syntax similar to MySQL which could be easily added to the code, but closer inspection shows that the PostgreSql syntax requires specification of either a constraint name or the index column(s) for the primary/unique keys. You mean the "target" in ON CONFLICT target action, right? http://www.postgresqltutorial.com/postgresql-upsert/ Constraint names are nowhere specified in the dictionary map syntax and it's not possible either to identify with 100% certainty the primary key column(s). One could dive into Postgres-specifics to get it, but there are other SQLs, too; the quota plugin advertises to use TRIGGERs to turn an INSERT into an UPDATE silently, which is no general approach either. https://wiki2.dovecot.org/Quota/Dict 1) logic which always tries to update and falls back to insert if the update fails (or viceversa) for all sql dictionaries. 2) updates to the map syntax so that either the constraint name or primary key columns can be specified. Ideas are welcome. Maybe, one should drop the automatic at all and let the user specify the commands manually like with the userdb/passwd. Hence, the generic SQL preparation code is already present. There could/should/would be documented lots of "best practice" settings for various backends. In fact, this approach would better fit into the open and more "general" base idea Dovecot uses in other places, IMHO. Kind regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXOY0bsQnQQNheMxiAQKNOQgAmRzNVJTNn3XpHBBGnZOtZ5Ku9Cp9UZIY 70HukeDKdR6rg7XNFGhwTDGa30QRGABByoospMHLAIabZ7j9WFaajAKI01roXotc skD+T8orvpk7BH/2+f2v5f67xa3GU6LJE330yZJubFb87NFq4otdtXGjhPjCf16j /wREiuSi0CqDTMtSOXjHXtViI9EL/e+CoJtEgK+gaXINCdCP7Cb2OEjtXHpItuqm tUAQoh418wWfVt6k6NgpDVX/hD+RyRfxKI4dste0VJZ9OEhH1mpPGaRB/BIkhEh4 OJ18upVhIXbJPDyAPofSB1YGDkPl/HlChmh+QuOpVm9rolmt9SyZQg== =unPo -END PGP SIGNATURE-
Re: Dovecot not connecting to OpenLDAP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 15 May 2019, Elias Falconi via dovecot wrote: 2019-05-15 16:27:43 auth: Error: LDAP /etc/dovecot/dovecot-ldap.conf.ext: ldap_start_tls_s() failed: Can't contact LDAP server 2019-05-15 16:39:36 auth: Error: LDAP /etc/dovecot/dovecot-ldap.conf.ext: ldap_start_tls_s() failed: Connect error 2019-05-15 16:39:43 auth: Error: LDAP /etc/dovecot/dovecot-ldap.conf.ext: ldap_start_tls_s() failed: Local error # Space separated list of LDAP hosts to use. host:port is allowed too. hosts = 139.147.9.135 # Use TLS to connect to the LDAP server. tls = yes # TLS options, currently supported only with OpenLDAP: #tls_ca_cert_file =/etc/ssl/certs/ldap.crt tls_ca_cert_file =/etc/ssl/certs/ldap6_cacert.pem # is still used, only the password field is ignored in it. Before doing any # search, the binding is switched back to the default DN. auth_bind = yes # For example: # auth_bind_userdn = cn=%u,ou=people,o=org # #auth_bind_userdn = are you sure these settings fit each other? a) IP address, but force tls with cert - -> is the IP address part of the alternate subjects of the cert? you seem to use STARTTLS https://docs.oracle.com/cd/E22289_01/html/821-1273/testing-ssl-starttls-and-sasl.html b) once you've sorted TLS out looks like auth_bind conflicts with auth_bind_userdn - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXNz+EsQnQQNheMxiAQI8eggAh8bjcL6FQJgZBUd10bWBzPhR1UQmyUHx 6waUF02hPX2FJW/HnXcyHCcT/lR6sq1fIOYtT+IFniBmXt/MNb9cRi1PwGEdVWgs 6d7QNwRhesHLkfDnuK4WIt2J9/RXoWcUK/KW1DQ4cGPwXDCsDzAJnaFoqYqlN9DF PjnZKyKaKoGvstDLTM0tFk87iHDue4SkWsw72o2sWEhOxgSdVGfN0taLh1nh Spwdz03mTpZwJJW5MyDplklGofWLEZD8jiclsWsaSOb7A0+05gK7nl4YsLrnCIH7 9lADo4LNmCr4g90Xf6zO4T5HlpUjvQNME3OwiI+mIeoXPvU7wjYinA== =6QRq -END PGP SIGNATURE-
Re: Trying to track down source of duplicate messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 2 Apr 2019, Timo Sirainen via dovecot wrote: succeeded eventually. You might see these differences in Received headers. yep, post the Received lines - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXKNd4sQnQQNheMxiAQI8pAf+M0SIuJ2qeqEJVluvGixTXyG8LgApMfAg 8r4irnUQryWmvg8jRUp/xVtVLtzhC3eI6Suz0RQoo6ggFoxgnaVKEeVDLSSBugmb RV1yjngjW0G4kiGTLcUc2yak3avvGnmWQmX2BgoadpWJ2e7Rn5j1VhuYBz9sQg2j UYqFqhIZBHz7sjuhWfJY7ApMGf0C4Rttbi4/8O8gaGw/y9Z3xJO1WBOXElW39J71 S7V3GKjI/xY3dvRffjstw3n4Hf3qVGAn1Q3fEx/aXc7UVJ3mBM+Jg6LIXMux2YSw 6v+w5k5W28EA9MMZlfiJYzgi0y/U1T1PE0SQmBzDefOvok5KifUrBg== =gL5U -END PGP SIGNATURE-
Re: I have a question.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 1 Apr 2019, 김태용 via dovecot wrote: Can I limit the maximum number of messages I can sync per mailbox? That's a client setting if available. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXKHzT8QnQQNheMxiAQIflwf+J6UXc5fRZ+eIx1IlitW7Mc6GIGW2B8bY c7DJAG03Q/Hcs5a4AqaEJOhNSyZ8FmKy9V0S95372w9n0hBq52c+RpDsSlE0eGse EcSuR419lts+G42kEgVj0cEJ7LtuPPvjs5fEJYhKMZ9PjnN9VbjQG4iSYFt13rlv dOoaxPs7prvqfg5rHbGIxx7H5KLecxSwjrxRDRDEDkBrtvVeWVp/NQFj4utBLOre qahQb8K7iltm3NxUxlRyL3YaWoH3W4/CmQ94uDGx/GKS3QMVDxGkkGWjHUdVs96a BhrueZ6MtMPvPtiax1IdGEK5uu9kQ3jNfZs2FMzHM5slgl6uZtZlFg== =JsyX -END PGP SIGNATURE-
Re: dovecot.sieve shows up as a mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Mar 2019, Drexl Spivey via dovecot wrote: This did solve my problem, and created a little hiccup. Namely, all the users that had email account LOST their mail. I am just starting migrating to this new mail server setup, so mostly just insignificant testing emails. I am sure there is a way to recover the old mails? Doesn't matter, not really much there. if you didn't removed files, check out https://wiki2.dovecot.org/MailboxFormat/Maildir to get familiar with the Maildir format. You had the mailboxes in: maildir:/var/mail/vmail/%d/%n hence, there should be "new" and "cur" directories of the INBOX and some files, like indexes. And subdirectories starting with ".", which contain "new" and "cur" directories. If your mailboxes are located at maildir:~/Maildir now, the content of the "new" and "cur" directories belong into this subdirectory. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXJSJGMQnQQNheMxiAQKygAf+JEJ6afk5OPwGRHl/+J9MxGFsT1G7OquI bgHfZlMj1esvzuxyjpINLxT5NUfD/qzgQ5mnTiu3oFdC83gmx1MsyCkss40hjb5i Ube1SDNbKRNyfiQfrFXpblPA/0z9bJsqt8eXMuZVwLCNl1fiU3nlmYNf9dUUHRgh QHLYu9lU68tyIq7i0dxOkUXC51h6Y8gW+VN6K0sa+fJUqQdu5yCaf1NWOjPAkz+d ac8N1MaJHs0lfYcrJBUuHPRCeDVZ2nf06VufKCAQtSfpGwMsjH6YTaLzNoH+m2xg xLsOwCO0z7mPxLWerGU3nmYfGoAbz7e7aUYgXXQOr0Id6sr1EcjBvg== =vVxr -END PGP SIGNATURE-
Re: dovecot.sieve shows up as a mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Mar 2019, Yassine Chaouche via dovecot wrote: On 3/21/19 4:13 PM, Aki Tuomi via dovecot wrote: On 21 March 2019 17:05 Yassine Chaouche via dovecot wrote: [...] While not very intuitive, I have : mail_home = /var/mail/vmail/%d/%n/dovecot mail_location = maildir:~/.. Which works for me ^^' Yassine. Except it would have the same problem, but with 'dovecot' as folder under some configurations. Aki Well, none of my users have reported they can see that folder. I myself use webmail, thunderbird on my PC and k9 mail on my phone and don't see that folder in any of these clients. Because the "home" directory is a subdir of the mail location, some storage backends try to interprete any entry as some sort of mailbox. This is not the case with Maildir, because mailboxes start with a ".", unless you use the FS layout, I think. Then there is the potential naming conflict, that "dovecot" might become a reserved filename in a Maildir. Because of these if's and whether's it is safer to configure the mail location as subdir of the home dir. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEVAwUBXJSHisQnQQNheMxiAQJsngf9EXzlERrtLizct+RV+Cn1OgIgxZqikb6e 8nR+wYmG1Ni8Ct8AiUiqfoJPD18PaykXoE4QQmzTrF70W+/6orc7bnk52fktk9DF Vdd+t8GQ4ZvfZnw3/RAVlnQfxPTQuw5C8F8btWWK86DTnQ7hEvBM4NiF0YUaL+nG J+AK0MnkIVFUAM3bD7HuJaH24B+lDLjbsM0oF+5ATRghzpgkTqpG/tbNc2TBx/4o 5yi/nTANgWd3EDIhO+/YLWnAS2vnR+Ym7A7PSJGfQDIygAx0t/SKbO+A8s7n7a9n 3aE1hJw4E/HAOUzefEmvJHnaMjAv/xND5Jdme/5bbcqlZ9qj/KEwSw== =A15Z -END PGP SIGNATURE-