[Dovecot] PostLogin Scripting issue
Trying out the post-login scripting Timo added recently. Wanting to run a SQL query, as detailed in the example on the Wiki.
However, my "USER" env variable is set to "OK" instead of the username.
DOVECOT_VERSION=1.0.rc16 RESTRICT_GID_FIRST=127 USER=OK
All the other variables (MAIL, HOME, etc) are fine with the correct username.
Am I missing something obvious?
Thanks,
-c
On 6.1.2007, at 4.33, Cassidy B. Larson wrote:
Trying out the post-login scripting Timo added recently. Wanting to
run a SQL query, as detailed in the example on the Wiki.However, my "USER" env variable is set to "OK" instead of the
username.DOVECOT_VERSION=1.0.rc16 RESTRICT_GID_FIRST=127 USER=OK
All the other variables (MAIL, HOME, etc) are fine with the correct
username.
Umm.. Do you use %u in mail_location or anywhere else?
The only thing I can think of is that your password_query modifies
the username to be "OK". I can think of nothing in Dovecot's code
that would set USER=OK.
Umm.. Do you use %u in mail_location or anywhere else?
The only thing I can think of is that your password_query modifies the username to be "OK". I can think of nothing in Dovecot's code that would set USER=OK.
Not seeing it anywhere else except for my 'WHERE' clauses.
password_query = SELECT clearpasswd AS password FROM authenticate.users AS u WHERE u.userID = '%u' user_query = SELECT file AS home, uid, gid, concat('maildir:storage=', TRUNCATE(quota/1024,0)) AS quota FROM iwmailsystem.virtmailbox AS v WHERE v.userID = '%u'
mail_location is this: mail_location = maildir:%h
The only entry in dovecot.conf that uses %u but isnt commented is: login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
Other ideas?
-c
some more debuggage if it helps:
Jan 5 20:14:32 ubrique dovecot: auth(default): master in: REQUEST 1 22925 1 Jan 5 20:14:32 ubrique dovecot: auth-worker(default): sql(user@host.com, x.x.x.x): SELECT file AS home, uid, gid, concat('maildir:storage=', TRUNCATE(quota/1024,0)) AS quota FROM iwmailsystem.virtmailbox AS v WHERE v.userID = 'user@host.com' Jan 5 20:14:32 ubrique dovecot: auth(default): master out: USER 1 OK user@host.com home=/data/mail/host.com/us/user@ host.com/ uid=127 gid=127 quota=maildir:storage=131072 Jan 5 20:14:32 ubrique dovecot: pop3-login: Login: user=<user@host.com>, method=PLAIN, rip=x.x.x.x, lip=y.y.y.y Jan 5 20:14:33 ubrique dovecot: POP3(OK): Disconnected: Logged out top=2/3891, retr=2/36717, del=0/2, size=36681
So shouldnt the last line display 'POP3(user@host.com)' instead of POP3(OK) ? At least it does on my proxy.
-c
So shouldnt the last line display 'POP3(user@host.com)' instead of POP3(OK) ? At least it does on my proxy.
Well, it wasnt my proxy I was looking at that had the correct line, but my RC15 storage server. The RC15 box shows the correct POP3() line like it should, whereas the RC16 doesnt. The only thing the RC16 storage server has different is sieve plugin enable (but that shouldnt matter in this case).
-c
participants (2)
-
Cassidy B. Larson
-
Timo Sirainen