last_login plugin with MySQL

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Mon Oct 20 07:00:31 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 19 Oct 2014, Michael Cramer wrote:

>> Gedalya wrote on 18/10/2014 17:36:
>> 
>>> The code looks at shared/$last_login_key, so shared/last-login/username,
>>> but your map says /shared/last-login/$user, note the leading slash! That's
>>> probably all it is.
>> 
>> 
>> BINGO!
>> 
>> Now that we killed the mosters of this level, let's move to the next 
>> level.....
>> 
>> I was expecting an UPDATE...WHERE but I got this:
>> 
>> INSERT INTO mailbox (lastlogin,username) VALUES ('1413647370','username') 
>> ON
>> DUPLICATE KEY UPDATE lastlogin='1413647370'
>
> anybody knows how this can be achieved with postgresql, because 'ON DUPLICATE 
> KEY UPDATE' syntax is mysql specific

http://wiki2.dovecot.org/Quota/Dict see the section about "If you're using 
PostgreSQL, you'll need a trigger"

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVESzD3z1H7kL/d9rAQLX8wf/WoO/J8GSf5ht2ZH7tV731jxvjd29epJr
LzyqJ9DdwAt/4doR7/RK+3TKYfEzvkP7wkzOr7j6IkWhM9R2NXdXRLpYmKYG0GOb
oPueNHQ3ibAcGgYHNL14UJve/H+laxJXOWYhlxM8CgR2IT+EBeJIGiHmVWjUm3DL
f1Wxwzf4Ozdl0nRwZGr0nToVklaDabB9wdNNdBno+42UcbdENZdloWbAEs/2HjfA
0ckbJ4BXf+SR/TgeRmMPXMIN7/n4iIJnikTQuuE0MhV5DgdTfY0Xa1p+sE0Q1qSO
pxC7FxYaaI+Yxk9q/NT8HJRwMbx3T0GQ0zyh8Bo0DH/v1QSvbgtJrg==
=nZET
-----END PGP SIGNATURE-----


More information about the dovecot mailing list