last_login plugin does not update IP
When using the last_login plugin I noticed that the IP address information is not updated. If there is no entry in the sql database for a given user, the first time the login date and time information and the IP address will be saved. Each subsequent login only updates the date and time. The IP address remains unchanged.
Example configuration for pop3 service:
map { pattern = shared/last-login/pop3/$user/$rip table = last_login value_field = last_pop3_access value_type = uint
fields { userid = $user last_pop3_ip = $rip } }
This is translated into the following sql command:
INSERT INTO last_login (last_pop3_access,userid,last_pop3_ip) VALUES (1727691183673,'test','1.2.3.4') ON DUPLICATE KEY UPDATE last_pop3_access=1727691183673
You can see that after "ON DUPLICATE KEY" only the time is updated.
Is there any way to influence the behavior of the plugin and the sql query so that the IP address is also updated? I'm using Dovecot v2.3.4
-- Best regards,
Maciej Polewczyński Do or do not. There is no try.
Hi Do you test postlogin ?
https://doc.dovecot.org/2.3/admin_manual/post_login_scripting/ https://www.lemat.priv.pl/index.php?m=page&pg_id=170
W dniu 30.09.2024 o 15:49, Maciej Polewczyński via dovecot pisze:
When using the last_login plugin I noticed that the IP address information is not updated. If there is no entry in the sql database for a given user, the first time the login date and time information and the IP address will be saved. Each subsequent login only updates the date and time. The IP address remains unchanged.
Example configuration for pop3 service:
map { pattern = shared/last-login/pop3/$user/$rip table = last_login value_field = last_pop3_access value_type = uint
fields { userid = $user last_pop3_ip = $rip } }
This is translated into the following sql command:
INSERT INTO last_login (last_pop3_access,userid,last_pop3_ip) VALUES (1727691183673,'test','1.2.3.4') ON DUPLICATE KEY UPDATE last_pop3_access=1727691183673
You can see that after "ON DUPLICATE KEY" only the time is updated.
Is there any way to influence the behavior of the plugin and the sql query so that the IP address is also updated? I'm using Dovecot v2.3.4
-- Maciej Miłaszewski Starszy Administrator Systemowy
IQ PL Sp. z o.o. ul. Geodetów 16, 80-298 Gdańsk NIP 5832736211
KRS 0000007725, www.iq.pl Sąd rejestrowy: Sąd Rejonowy w Gdańsku VII Wydział KRS, kapitał zakładowy: 140.000 PLN
Dział pomocy: https://www.iq.pl/pomoc
Informacja dotycząca przetwarzania danych osobowych: https://www.iq.pl/obowiazek-informacyjny
Yes, I use this to policy delegation. My problem could be solved this way.
The official documentation suggests that you can update more than just the time using the last_login plugin. If that's not possible, I suggest changing the documentation or fixing the plugin.
W dniu 30.09.2024 o 16:10, Maciej Milaszewski via dovecot pisze:
Hi Do you test postlogin ?
https://doc.dovecot.org/2.3/admin_manual/post_login_scripting/ https://www.lemat.priv.pl/index.php?m=page&pg_id=170
W dniu 30.09.2024 o 15:49, Maciej Polewczyński via dovecot pisze:
When using the last_login plugin I noticed that the IP address information is not updated. If there is no entry in the sql database for a given user, the first time the login date and time information and the IP address will be saved. Each subsequent login only updates the date and time. The IP address remains unchanged.
Example configuration for pop3 service:
map { pattern = shared/last-login/pop3/$user/$rip table = last_login value_field = last_pop3_access value_type = uint
fields { userid = $user last_pop3_ip = $rip } }
This is translated into the following sql command:
INSERT INTO last_login (last_pop3_access,userid,last_pop3_ip) VALUES (1727691183673,'test','1.2.3.4') ON DUPLICATE KEY UPDATE last_pop3_access=1727691183673
You can see that after "ON DUPLICATE KEY" only the time is updated.
Is there any way to influence the behavior of the plugin and the sql query so that the IP address is also updated? I'm using Dovecot v2.3.4
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
-- Best regards,
Maciej Polewczyński Do or do not. There is no try. Chief postman at cyber_Folks
mobile: +48 608-527-002 street Wierzbięcice 1B, 61-569 Poznań. Building D, floor VIII
participants (2)
-
Maciej Milaszewski
-
Maciej Polewczyński