Dovecot last_login plugin and Mysql
David Mehler
dave.mehler at gmail.com
Sat Apr 29 03:53:35 EEST 2017
Hello,
Here is the requested file:
driver = mysql
connect = host=/tmp/mysql.sock dbname=mail user=mail_admin password=MainBoard55
# Last Login
map {
pattern = shared/last-login/$user
table = virtual_users
username_field = user
value_field = lastlogin
fields {
user = $user
}
}
Thanks.
Dave.
On 4/28/17, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>
>> On April 29, 2017 at 12:29 AM David Mehler <dave.mehler at gmail.com> wrote:
>>
>>
>> Hello,
>>
>> Trying to implement lastlogin via mysql. I'm getting an unknown column
>> username which I don't get. Here's the log:
>>
>> Apr 28 17:18:15 ohio dovecot: imap-login: Login:
>> user=<user at example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
>> mpid=16257, secured, session=<KxiSnEBOwUx/AAAB>
>>
>> Apr 28 17:18:15 ohio dovecot: dict(17099): Error: sql dict: commit
>> failed: Unknown column 'username' in 'field list'
>>
>> Apr 28 17:18:15 ohio dovecot: imap(user at example.com): Error:
>> dict-client: server returned failure: 1493414295 (reply took 0.026
>> secs)
>>
>> Apr 28 17:18:15 ohio dovecot: imap(user at example.com): Error:
>> last_login_dict: Failed to write value for user user at example.com
>>
>>
>>
>
> You can configure all this in dovecot-dict-sql.conf, which you have not
> provided. The actual column names are defined there.
>
> Aki
>
More information about the dovecot
mailing list