Hi Timo
Thanks very much, hadn't finished my morning coffee and already a patch
:)
The patch does the trick:
- My dovecot.conf for the proxy:
...
login_log_format_elements = pid=%p user=%u method=%m rsock=%r:%b
lsock=%l:%a proto=%s %c
login_log_format = MYPROXY %s %$:
...
- gives me, via syslog:
Aug 14 10:14:03 withnail dovecot: imap-login: MYPROXY pid=6516,
user=pgamble at abc.co.za, method=PLAIN, rsock=127.0.0.1:48157,
lsock=127.0.0.1:1143, proto=IMAP, secured proxy(pgamble at abc.co.za):
started proxying to 127.0.0.1:143/pgamble*master:
Aug 14 10:26:02 withnail dovecot: pop3-login: MYPROXY pid=6514,
user=pgamble at abc.co.za, method=PLAIN, rsock=127.0.0.1:55991,
lsock=127.0.0.1:1110, proto=POP3, secured proxy(pgamble at abc.co.za):
started proxying to 127.0.0.1:110/pgamble*master:
This is just on a dev box, hence the odd IP's, log format, etc.
I'm using "master authentication" for the backend auth and so the
the
master user and separator character are imbedded in the backend user,
i.e. "client->proxy_user", ("pgamble*master" above) and
it would be
convenient to have them available separately, but I can live with it
as-is.
So...great stuff, thanks very much! What is your approach with regards
to incorporating these kinds of patches (in response to ad-hoc user
requests) into your main development tree? It would obviously be nice to
know that this will be incorporated at some point... Would it be
feasible to add a "config variable" for this (along the lines of %u,
%p,
%s, etc, etc)?
Regards,
Paul Gamble
-----Original Message-----
From: dovecot-bounces+pgamble=mweb.com at dovecot.org
[mailto:dovecot-bounces+pgamble=mweb.com at dovecot.org] On Behalf Of Timo
Sirainen
Sent: 14 August 2008 09:12 AM
To: Paul Gamble - MWEB
Cc: dovecot at dovecot.org
Subject: Re: [Dovecot] Proxy logging destuser
On Aug 14, 2008, at 2:36 AM, Paul Gamble - MWEB wrote:
> Is it possible for a Dovecot proxy's login process (IMAP and POP3) to
> include the "destuser", i.e. the uid used to authenticate to the
> backend
> IMAP/POP3 server, in its logging? "%u" gives me the uid provided
by
> the client of course, but it would useful for my purposes to catch the
> "destuser" in the same log line.
Could you try if this patch works:
http://hg.dovecot.org/dovecot-1.1/raw-rev/5d0406541434
New from MWEB: Cellphone and Internet bundles! Bundle your Internet access with
your cellular contract from R75 per month.
Call 08600 32000 or click
here(http://www.mweb.co.za/productsservices/MTALKMobile/tabid/1223/Default.aspx)
for more info on the great deals available.
MWEB :-) JUST LIKE THAT