On Tuesday, October 29, 2002 6:07 PM,  Brian Candler wrote:

> IMO it would be really useful to have the username logged for failed
> POP3 logins - at the moment I am migrating some users to a new

Unfortunately when LOGIN FAILED message arises user name is not available.
So I'm using this simple patch to log username at the login attempt. I did
not check it with all auth modules but it works fine in my simple authpwd
configuration.

This is one of several very old courier issues still waiting for Sam's
attention.

--- ./imap/pop3login.c.orig     Wed Aug 28 16:32:54 2002
+++ ./imap/pop3login.c  Fri Sep  6 20:01:44 2002
@@ -204,6 +204,8 @@
                                        strcpy(user, p);
                                        printf("+OK Password
required.\r\n");
                                        fflush(stdout);
+                                       fprintf(stderr, "INFO: LOGIN,
user=%s, i
p=[%s]\n", user, ip);
+                                       fflush(stderr);
                                        continue;
                                }
                        } else if (strcmp(p, "CAPA") == 0)

Same for imaplogin:

--- ./imap/imaplogin.c.orig     Wed Aug 28 16:32:54 2002
+++ ./imap/imaplogin.c  Fri Sep  6 20:01:44 2002
@@ -228,6 +228,8 @@
                if (!p || !*p)
                        p="imap";

+               fprintf(stderr, "INFO: LOGIN, user=%s, ip=[%s]\n",
+                                       userid, getenv("TCPREMOTEIP"));
                authmod_login(main_argc-1, main_argv+1, p,
                          userid, passwd);
        }

To avoid duplication of LOGIN lines in log files I've also commented out
similar constructions in pop3dserver.c and imapd.c.

--
Alexei.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to