$OpenBSD: patch-com_gw_c,v 1.2 2005/12/24 08:20:40 pvalchev Exp $ --- com_gw.c.orig Thu Feb 8 17:34:55 2001 +++ com_gw.c Fri Dec 23 23:43:42 2005 @@ -9,7 +9,7 @@ #endif #include #include -#include +#include #include #include #include @@ -169,7 +169,7 @@ simpleServerPipe(int netfd, encoding *en int cnt = 0; \ while(cnt < ENTLEN && *from && *from!=';' && !isspace(*from)) \ {\ - *to++=*str++;\ + *to++=*from++;\ cnt++;\ }\ *to='\0';\ @@ -222,12 +222,15 @@ EmailGateway (int fromfile,int tofile, c if(!strncasecmp(buf,"Content-Type:",13)) { parseContentType(buf+13,ctype,ocharset,garbage); - fprintf(stderr,"Content: %s, charset: %s\n",ctype,ocharset); +// if enabled, crushes into the mail - mailers get crazy +// fprintf(stderr,"Content: %s, charset: %s\n",ctype,ocharset); if(!strcasecmp(ctype,"text/plain") && strcasecmp(ocharset,"us-ascii") && strlen(garbage)==0) { - fprintf(stderr,"Content: %s, charset: %s\n",ctype,ocharset); - sprintf(buf,"Content-Type: text/plain; charset=%s\n",charset); +// if enabled, crushes into the mail - mailers get crazy +// fprintf(stderr,"Content: %s, charset: %s\n",ctype,ocharset); +// not everyone lives in the UNIX world... \r is still needed :) + sprintf(buf,"Content-Type: text/plain; charset=%s\r\n",charset); blen = strlen(buf); } }