Aidas Kasparas wrote: > Please find bellow a patch which check EOF condition instead of no > input. Without fix for this bug package is virtually not useable (I > experienced mysterious attachment cuts, so I can not relay on it at it's > present form :-( Please consider importance of this bug as "serious" at > the very least. > > --- ssmtp.c.R 2005-08-25 19:41:15.000000000 +0300 > +++ ssmtp.c 2005-08-25 19:45:11.000000000 +0300 > @@ -1532,7 +1532,13 @@ > stdio functions like fgets in the first place */ > fcntl(STDIN_FILENO,F_SETFL,O_NONBLOCK); > > - while(fgets(buf, sizeof(buf), stdin)) { > + while(!feof(stdin)) { > + if (!fgets(buf, sizeof(buf), stdin)) { > + /* if nothing was received, then no transmission > + * over smtp should be done */ > + sleep(1); > + continue; > + } > /* Trim off \n, double leading .'s */ > standardise(buf); > > --------------------- 8< --------------------------------
Upon investigation of this problem I noticed that ssmtp (oldstable and stable) always strips the last line of the input before sending. gluck!joey(pts/4):~> seq 1 10|sendmail [EMAIL PROTECTED] --> 1..9 gluck!joey(pts/4):~> echo seq 1 10|sendmail [EMAIL PROTECTED] --> no lines This is not fixed by the above patch. Regards, Joey -- WARNING: Do not execute! This call violates patent DE10108564. http://www.elug.de/projekte/patent-party/patente/DE10108564 wget -O patinfo-`date +"%Y%m%d"`.html http://patinfo.ffii.org/ Please always Cc to me when replying to me on the lists. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]