Hi, i'm using dovecot with rawlog enabled. Well, i need to log the IP of the user, too. Could you give me a hint, how this can be implemented? Thanks and regards, Andreas Goertz.
On Fri, 2005-03-11 at 10:13 +0100, Andreas Goertz wrote:> i'm using dovecot with rawlog enabled. Well, i need to log the IP of the > user, too. Could you give me a hint, how this can be implemented?0.99.x or 1.0-test? In any case to rawlog.c something like: struct ip_addr ip; if (net_getpeername(proxy->client_in_fd, &ip, NULL) == 0) i_info("ip address = %s", net_ip2addr(&ip)); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050312/cb1dfe3e/attachment-0001.bin>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Timo, | 0.99.x or 1.0-test? In any case to rawlog.c something like: i'm using 0.99.x | struct ip_addr ip; | if (net_getpeername(proxy->client_in_fd, &ip, NULL) == 0) | i_info("ip address = %s", net_ip2addr(&ip)); I'll try this. Thank you so far ;-) Regards, Andreas Goertz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCNT/FpAOZWzj6viQRApUMAJ9GPm2ti5h2FzHUlK0LQAr7T85S+gCfVoWK PvriA33f2EAZv/uxNkUd688=UaiX -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Timo, | 0.99.x or 1.0-test? In any case to rawlog.c something like: 0.99.14 | struct ip_addr ip; | if (net_getpeername(proxy->client_in_fd, &ip, NULL) == 0) | i_info("ip address = %s", net_ip2addr(&ip)); 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. Regards, Andreas Goertz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCNZk/pAOZWzj6viQRAp+BAJ9UJkklIbod4LOf0GaD0zOrJ+vCVQCfS6l+ WHaH3et4Z86bMOUXVQdhmmA=brkV -----END PGP SIGNATURE-----