Yes, I did see that, thank you. If I did want to get this working globally, do you know what the issue is here and how to resolve it? I think it has something to do with my database table but I am not positive what the issue is. Here’s my database table (MySQL):
CREATE TABLE mailboxLastLogin
(
email
varchar(192) NOT NULL DEFAULT ‘’,
service
varchar(16) NOT NULL DEFAULT ‘’,
timestamp
bigint(20) NOT NULL,
ipaddress
varchar(40) NOT NULL,
createdAt
datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (email
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
I also have two triggers on this table so when a new row is inserted or
an existing row is updated, a new row is inserted into another tables
named mailboxHistory
. This is working fine and should not be causing
any issues with LMTP trying to query itself.
BEGIN DECLARE mailboxUuid VARCHAR(36);
SELECT uuid INTO mailboxUuid FROM mailbox WHERE email = NEW.email;
INSERT INTO mailboxHistory (`mailboxUuid`, `service`, `command`,
ipaddress
, uuid
)
VALUES (mailboxUuid, NEW.service, 'login', NEW.ipaddress, uuidv4());
END
BEGIN DECLARE mailboxUuid VARCHAR(36);
SELECT uuid INTO mailboxUuid FROM mailbox WHERE email = NEW.email;
INSERT INTO mailboxHistory (`mailboxUuid`, `service`, `command`,
ipaddress
, uuid
)
VALUES (mailboxUuid, NEW.service, 'login', NEW.ipaddress, uuidv4());
END
CREATE TABLE mailboxHistory
(
id
int(11) unsigned NOT NULL AUTO_INCREMENT,
uuid
varchar(36) DEFAULT ‘’,
mailboxUuid
varchar(36) NOT NULL DEFAULT ‘’,
service
varchar(16) NOT NULL,
command
varchar(36) DEFAULT NULL,
extra
longtext DEFAULT NULL,
ipaddress
varchar(40) NOT NULL,
createdAt
datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (id
),
UNIQUE KEY UUID
(uuid
)
) ENGINE=InnoDB AUTO_INCREMENT=2047 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci;
Thank you,
Adam
------ Original Message ------ From "John Fawcett via dovecot" dovecot@dovecot.org To dovecot@dovecot.org Date 7/17/2024 2:07:29 PM Subject Re: Invalid/Unmapped Key with Last Login Plugin
On 17/07/2024 22:59, Adam Miller via dovecot wrote:
Yikes, this is my bad! I AM using the LMTP service for delivery. What I meant was that I do not necessarily need to track the logins to the LMTP service. I suppose it wouldn’t hurt to track them though. Any idea why it would be throwing this error? Which key is it expecting to be mapped? Am I missing a configuration specifically for this? Should the last login for LMTP use the same dict as the IMAP configuration?
Hi Adam
not sure if you saw it but in my earlier response I gave the info about excluding last_login plugin for services where it is not needed. You have it configured globally at the moment.
John
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org