Hi,
I have tried to implement last_login with PostgreSQL and I found an old thread
from June 2019. I have found a simple solution that I want to share with you:
I followed the instructions on how to set up a last_login on the official
documentation. Therefor I creates a very simple table
‐‐‐ Original Message ‐‐‐
On Wednesday, May 29, 2019 8:01 AM, Aki Tuomi
wrote:
> We'll take this under consideration, but no promises.
Thank you very much Aki for consdering this. It would be really fair for all
the PostgreSQL users out there.
> On May 29, 2019, at 2:01 PM, Aki Tuomi via dovecot
> wrote:
>
> We'll take this under consideration, but no promises.
Dear Aki,
I reported this issue and request before:
https://marc.info/?t=15541153161=1=2
Hope we can have this feature soon. :)
Thank you very much.
On 28.5.2019 22.34, mabi via dovecot wrote:
> ‐‐‐ Original Message ‐‐‐
> On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot
> wrote:
>
>> there's no field name that is obviously the primary key. I've
>> reworked the patch to use the postgres default primary key constraint
>> name
‐‐‐ Original Message ‐‐‐
On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot
wrote:
> there's no field name that is obviously the primary key. I've reworked the
> patch to use the postgres default primary key constraint name
> (tablename_pkey).
>
> The attached fix should work
On 23/05/2019 07:49, Steffen Kaiser via dovecot wrote:
> 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
> 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,
-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
On 21/05/2019 15:45, mabi via dovecot wrote:
> ‐‐‐ Original Message ‐‐‐
> On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot
> wrote:
>
>> So looking into this with a postgresql databse to work with: the
>> above query does not work. You have to specify either the column name
>>
‐‐‐ Original Message ‐‐‐
On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot
wrote:
> So looking into this with a postgresql databse to work with: the above query
> does not work. You have to specify either the column name or the constraint
> name that you expect to be violated
‐‐‐ Original Message ‐‐‐
On Sunday, May 19, 2019 10:45 PM, John Fawcett via dovecot
wrote:
> so basically if this works just as well:
>
> INSERT INTO last_logins (last_login,username,domain) VALUES
> (1558273000,'u...@domain.tld','domain.tld') ON CONFLICT DO UPDATE SET
>
On 19/05/2019 22:45, John Fawcett via dovecot wrote:
> On 19/05/2019 22:37, John Fawcett via dovecot wrote:
>> On 19/05/2019 20:31, mabi via dovecot wrote:
>>>
>>> ‐‐‐ Original Message ‐‐‐
>>> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
>>> wrote:
Attached is a
On 19/05/2019 22:37, John Fawcett via dovecot wrote:
> On 19/05/2019 20:31, mabi via dovecot wrote:
>>
>> ‐‐‐ Original Message ‐‐‐
>> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
>> wrote:
>>>
>>> Attached is a tentative patch. I've verified no regression for
>>> mysql. There
On 19/05/2019 20:31, mabi via dovecot wrote:
>
> ‐‐‐ Original Message ‐‐‐
> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
> wrote:
>>
>> Attached is a tentative patch. I've verified no regression for mysql.
>> There should be no regression for sqlite as the code path is
‐‐‐ Original Message ‐‐‐
On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
wrote:
> Attached is a tentative patch. I've verified no regression for mysql. There
> should be no regression for sqlite as the code path is identical.
>
> Are you able to test for pgsql? As mentioned
On 19/05/2019 17:08, mabi via dovecot wrote:
> ‐‐‐ Original Message ‐‐‐
> On Sunday, May 19, 2019 4:44 PM, John Fawcett via dovecot
> wrote:
>
>> I don't have PostgresSql, would you be able to verify if this syntax
>> would work: INSERT INTO last_logins (last_login,username,domain)
>>
‐‐‐ Original Message ‐‐‐
On Sunday, May 19, 2019 4:44 PM, John Fawcett via dovecot
wrote:
> I don't have PostgresSql, would you be able to verify if this syntax would
> work: INSERT INTO last_logins (last_login,username,domain) VALUES
> (1558273000,'u...@domain.tld','domain.tld') ON
On 19/05/2019 16:25, John Fawcett via dovecot wrote:
> INSERT INTO last_logins (last_login,username,domain) VALUES
> (1558273000,'u...@domain.tld','domain.tld')
I don't have PostgresSql, would you be able to verify if this syntax would work:
INSERT INTO last_logins (last_login,username,domain)
‐‐‐ Original Message ‐‐‐
On Sunday, May 19, 2019 3:57 PM, Aki Tuomi wrote:
> It would be a feature request, also note that it's only available since
> version 9.5, so it really won't help anyone before that.
Would opening an issue as feature request on GitHub on the dovecot/core
On 19/05/2019 15:42, mabi via dovecot wrote:
> ‐‐‐ Original Message ‐‐‐
> On Sunday, May 19, 2019 2:58 PM, John Fawcett via dovecot
> wrote:
>
>> I guess it is not supported for PostgreSQL or Sqlite, since they don't
>> have "ON DUPLICATE KEY UPDATE" statement which is what is being used
> On 19 May 2019 16:42 mabi via dovecot wrote:
>
>
> ‐‐‐ Original Message ‐‐‐
> On Sunday, May 19, 2019 2:58 PM, John Fawcett via dovecot
> wrote:
>
> > I guess it is not supported for PostgreSQL or Sqlite, since they don't
> > have "ON DUPLICATE KEY UPDATE" statement which is
‐‐‐ Original Message ‐‐‐
On Sunday, May 19, 2019 2:58 PM, John Fawcett via dovecot
wrote:
> I guess it is not supported for PostgreSQL or Sqlite, since they don't
> have "ON DUPLICATE KEY UPDATE" statement which is what is being used in
> MySQL.
That's it, PostgreSQL does not have "ON
On 19/05/2019 12:52, mabi via dovecot wrote:
> Hello,
>
> I am trying to setup the last_login plugin on Dovecot 2.3 in order to log a
> user's last IMAP login into a separate PostgreSQL table called last_login. I
> am actually following that guide:
>
Hello,
I am trying to setup the last_login plugin on Dovecot 2.3 in order to log a
user's last IMAP login into a separate PostgreSQL table called last_login. I am
actually following that guide:
https://docs.iredmail.org/track.user.last.login.html with the exception that I
use PostgreSQL
24 matches
Mail list logo