Re: [vchkpw] More on clearopensmtp [FIXED]
On Jan 11, 2004, at 10:31 AM, Alejandro Aguilar Sierra wrote: In a recent post, Tom Collins wrote that the bug causing IPs with the ::: prefix in open-smtp had been fixed in 5.4-rc1. However, I got the same problem with 5.4.-rc1 and courier-imap-2.2.1. I fixed it after this hack to vpopmail.c: Here's the correct patch, along with a fix for vchkpw to strip the ::: before logging the IP. If you're running MySQL or Postgres, run 'delete from relay' to clear the old, invalid entries. If you're using the other auth modules, then look for (and delete) ~vpopmail/etc/open-smtp. Index: vchkpw.c === RCS file: /cvsroot/vpopmail/vpopmail/vchkpw.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- vchkpw.c13 Jan 2004 06:09:18 - 1.10 +++ vchkpw.c13 Jan 2004 15:59:42 - 1.11 @@ -105,7 +105,7 @@ { char *tmpstr; - if ( (IpAddr = getenv(TCPREMOTEIP)) == NULL) IpAddr=; + if ( (IpAddr = get_remote_ip()) == NULL) IpAddr=; if ( (tmpstr = getenv(TCPLOCALPORT)) == NULL) LocalPort = 110; else LocalPort = atoi(tmpstr); Index: vpopmail.c === RCS file: /cvsroot/vpopmail/vpopmail/vpopmail.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- vpopmail.c 13 Jan 2004 05:24:18 - 1.27 +++ vpopmail.c 13 Jan 2004 15:59:42 - 1.28 @@ -3058,7 +3058,7 @@ char *p; ipenv = getenv(TCPREMOTEIP); - if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; + if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipbuf))) return ipenv; strcpy (ipbuf, ipenv); ipaddr = ipbuf; -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
RE: [vchkpw] More on clearopensmtp
Ive got the same problem, I just tried your changes but I still get the tcprules: fatal: unable to parse this line: :::IPHERE: :allow,RELAYCLIENT= error. Courier has been compiled against the rc1. Tom mentioned in a reply to the first post about deleting the opensmtp file... where and what file is that -Original Message- From: Alejandro Aguilar Sierra [mailto:[EMAIL PROTECTED] Sent: Monday, 12 January 2004 5:31 a.m. To: [EMAIL PROTECTED] Subject: [vchkpw] More on clearopensmtp Hello: In a recent post, Tom Collins wrote that the bug causing IPs with the ::: prefix in open-smtp had been fixed in 5.4-rc1. However, I got the same problem with 5.4.-rc1 and courier-imap-2.2.1. I fixed it after this hack to vpopmail.c: --- vpopmail.c.orig Sun Jan 11 01:32:39 2004 +++ vpopmail.c Sun Jan 11 01:33:19 2004 @@ -3054,7 +3054,8 @@ char *p; ipenv = getenv(TCPREMOTEIP); - if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; +/* if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; */ + if (ipenv == NULL) return ipenv; strcpy (ipbuf, ipenv); ipaddr = ipbuf; -- END OF PATCH -- The commented condition (strlen(ipenv) sizeof(ipaddr)) is true for :::IPs, so they are never filtered. Then it was fixed or not? Did I made anything wrong? Best regards. -- Alejandro Aguilar Sierra [EMAIL PROTECTED]
RE: [vchkpw] More on clearopensmtp
Are you sure you applied this patch? The change is simple, in line vpopmail.c:3057 there is a condition that will be always true for strings bigger than 4 (in i32 systems). By removing that condition, the next lines have the filter for this :::IP's. Regards. -- Alejandro Aguilar Sierra [EMAIL PROTECTED] On Mon, 12 Jan 2004, Neil Spierling wrote: Ive got the same problem, I just tried your changes but I still get the tcprules: fatal: unable to parse this line: :::IPHERE: :allow,RELAYCLIENT= error. Courier has been compiled against the rc1. Tom mentioned in a reply to the first post about deleting the opensmtp file... where and what file is that -Original Message- From: Alejandro Aguilar Sierra [mailto:[EMAIL PROTECTED] Sent: Monday, 12 January 2004 5:31 a.m. To: [EMAIL PROTECTED] Subject: [vchkpw] More on clearopensmtp Hello: In a recent post, Tom Collins wrote that the bug causing IPs with the ::: prefix in open-smtp had been fixed in 5.4-rc1. However, I got the same problem with 5.4.-rc1 and courier-imap-2.2.1. I fixed it after this hack to vpopmail.c: --- vpopmail.c.orig Sun Jan 11 01:32:39 2004 +++ vpopmail.cSun Jan 11 01:33:19 2004 @@ -3054,7 +3054,8 @@ char *p; ipenv = getenv(TCPREMOTEIP); - if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; +/* if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; */ + if (ipenv == NULL) return ipenv; strcpy (ipbuf, ipenv); ipaddr = ipbuf; -- END OF PATCH -- The commented condition (strlen(ipenv) sizeof(ipaddr)) is true for :::IPs, so they are never filtered. Then it was fixed or not? Did I made anything wrong? Best regards. -- Alejandro Aguilar Sierra [EMAIL PROTECTED]
RE: [vchkpw] More on clearopensmtp
Yeah im 100% sure its applied, I even done a make clean and recompiled the lot... I deleted the bin/lib/include dirs from /home/vpopmail and done make install and still got the same error.. its wierd -Original Message- From: Alejandro Aguilar Sierra [mailto:[EMAIL PROTECTED] Sent: Monday, 12 January 2004 7:38 a.m. To: Neil Spierling Cc: [EMAIL PROTECTED] Subject: RE: [vchkpw] More on clearopensmtp Are you sure you applied this patch? The change is simple, in line vpopmail.c:3057 there is a condition that will be always true for strings bigger than 4 (in i32 systems). By removing that condition, the next lines have the filter for this :::IP's. Regards. -- Alejandro Aguilar Sierra [EMAIL PROTECTED] On Mon, 12 Jan 2004, Neil Spierling wrote: Ive got the same problem, I just tried your changes but I still get the tcprules: fatal: unable to parse this line: :::IPHERE: :allow,RELAYCLIENT= error. Courier has been compiled against the rc1. Tom mentioned in a reply to the first post about deleting the opensmtp file... where and what file is that -Original Message- From: Alejandro Aguilar Sierra [mailto:[EMAIL PROTECTED] Sent: Monday, 12 January 2004 5:31 a.m. To: [EMAIL PROTECTED] Subject: [vchkpw] More on clearopensmtp Hello: In a recent post, Tom Collins wrote that the bug causing IPs with the ::: prefix in open-smtp had been fixed in 5.4-rc1. However, I got the same problem with 5.4.-rc1 and courier-imap-2.2.1. I fixed it after this hack to vpopmail.c: --- vpopmail.c.orig Sun Jan 11 01:32:39 2004 +++ vpopmail.cSun Jan 11 01:33:19 2004 @@ -3054,7 +3054,8 @@ char *p; ipenv = getenv(TCPREMOTEIP); - if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; +/* if ((ipenv == NULL) || (strlen(ipenv) sizeof(ipaddr))) return ipenv; */ + if (ipenv == NULL) return ipenv; strcpy (ipbuf, ipenv); ipaddr = ipbuf; -- END OF PATCH -- The commented condition (strlen(ipenv) sizeof(ipaddr)) is true for :::IPs, so they are never filtered. Then it was fixed or not? Did I made anything wrong? Best regards. -- Alejandro Aguilar Sierra [EMAIL PROTECTED]