On Mon, 11 Feb 2008, Osvaldo Alvarez Pozo wrote:
Hi
did another test if I run from the console
mysql postfix -e "update mailbox set last_log = now() WHERE username
= '[EMAIL PROTECTED]'"
the field last_log gets updated.
but no way to make it work from /etc/dovecot.dovecot.conf
Sounds like a permissions problem. Put something like the following in a
file readable only by root, which is what the PostLogin script runs as
unless you've configured it to drop privileges before it runs:
$ cat foo.mysql
# MySQL connection data
[client]
user=someone
password=whatever
Then, change the line to:
mysql --defaults-file=foo.mysql postfix -e "update ..."
I also think that $USER is the variable you want, not $UID. UID = user ID,
which is usually numeric. But, dovecot sets USER to something useful
(IIRC, it depends on what variables you use elsewhere in your config as to
whether it includes the domain.).
Best,
Ben