delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/28/16:49:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 21:37:34 +0000
From: Robert R Schneck <schneck AT math DOT berkeley DOT edu>
To: cygwin AT cygwin DOT com
Cc: schneck AT math DOT berkeley DOT edu
Subject: Re: ssmtp -t alters To: header of outgoing mail
In-Reply-To: <20031128084335.GB3137@cygbert.vinschen.de>
References: <E1APUZU-0004iS-TU AT mk-smarthost-3 DOT mail DOT uk DOT tiscali DOT com>
<20031128084335 DOT GB3137 AT cygbert DOT vinschen DOT de>
MIME-Version: 1.0
Message-Id: <E1APqUP-00067c-1N@mk-smarthost-3.mail.uk.tiscali.com>

> Patches gratefully accepted.  Anybody here wanting to take over ssmtp
> maintainership?

A patch is below, I should have included this with my first message.

It occurs to me that this is a bug in ssmtp itself, not just
the Cygwin port.
Who to contact about that, or are you, Corinna, also the overall ssmtp
maintainer?

Sometime in the next few months I might find time to fix up a couple of
other small ssmtp problems.

Robert

*** ../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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019