Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 28 Nov 2003 16:56:26 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: ssmtp -t alters To: header of outgoing mail Message-ID: <20031128215626.GB5809@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20031128084335 DOT GB3137 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i On Fri, Nov 28, 2003 at 09:37:34PM +0000, Robert R Schneck wrote: >> Patches gratefully accepted. Anybody here wanting to take over ssmtp >> maintainership? > >A patch is below, I should have included this with my first message. I can't comment on the validity of the patch itself but it seems like you're using a style (K&R) that is counter to the surrounding code (GNU) wrt the bracket placement. It's usually a good idea to use the same style as the code you're submitting the patch for. cgf >*** ../ssmtp.c Fri Nov 28 21:12:13 2003 >--- ssmtp.c Fri Oct 10 23:41:09 2003 >*************** >*** 335,346 **** >--- 335,351 ---- > void > recordRecipient (char *line) > { >+ int sawSomething = 0; >+ > char buf[MAXLINE]; > char *newaddr; > char *p = line; > > while ( *p ) > { >+ if (!(isspace(*p))) { >+ sawSomething = 1; >+ } > if ( *p == '"' ) > { > quotes( &p ); >*************** >*** 357,365 **** >--- 362,381 ---- > } > *rec++ = newaddr; > line = p+1; >+ *p = ','; /* added by Schneck 2003-06-18 */ >+ sawSomething = 0; > } > p++; > } >+ >+ /* Schneck 2003-10-10: and what if the , is the end of the line?! >+ Some servers will ignore the result, others will error. >+ Things won't work at all with an address split over two lines! */ >+ >+ if (sawSomething == 0) { >+ return; >+ } >+ > parseaddr( line, buf, MAXLINE ); > newaddr = strdup( buf ); -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/