-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Timo Sirainen schrieb: | On Tue, 2005-03-15 at 10:45 +0100, Andreas Goertz wrote: | |>| no - this patch doesn't seem to work, because in rawlog.c proxy is |>| not declared. So i looked for the call to rawlog_open() and saw that |>| it's only called from main.c in imap and pop3 folder. But there also |>| is no proxy declared. Do you have another idea? Thanks in advance. | | | That code was for 1.0-tests, 0.99.x has entirely different rawlog code. ah - i see. |>Hmm - while searching for another solution i found the function |>client_syslog() in imap-login/client.c. If i understand it correctly, |>i_info() only writes to the syslog and i have no clue, how to write into |>rawlog from client.c respectively client_syslog(). | | | Only rawlog.c knows about rawlog, it's also running as separate process | so it's not even possible to see it in client.c code. | | Here's a patch for 0.99.14: thank you very much Timo, i'll try this out ;-) | | --- rawlog.c.old 2005-03-15 22:59:52.731934694 +0200 | +++ rawlog.c 2005-03-15 23:01:10.535201787 +0200 | @@ -89,6 +89,7 @@ | void rawlog_open(int *hin, int *hout) | { | struct io *io_imap, *io_client; | + struct ip_addr ip; | const char *home, *path, *fname; | char timestamp[50]; | struct tm *tm; | @@ -131,6 +132,11 @@ | return; | } | | + if (net_getpeername(0, &ip, NULL) == 0) { | + str = t_strdup_printf("IP: %s\n", net_ip2addr(&ip)); | + write_full(log_out, str, strlen(str)); | + } | + | /* we need to fork the rawlog writer to separate process since | imap process does blocking writes. */ | if (socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) < 0) | Regards, Andreas. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCN/MRpAOZWzj6viQRApEJAKCRMA6DUk+6t5xwL/hKaLsCS1V2iQCgkxEH +JIHsaylXcgaRSZWjSOWST4= =Autc -----END PGP SIGNATURE-----