This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssmtp -t alters To: header of outgoing mail


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]