From:	SMTP%"sloane@KUHUB.CC.UKANS.EDU"  7-AUG-1993 12:10:54.81
To:	EVERHART
CC:	
Subj:	Re: Error sending Mail to Usenet

Message-Id: <9308041717.AA09961@uu7.psi.com>
Date:         Wed, 4 Aug 1993 12:10:17 CDT
Reply-To: Bob Sloane <sloane@KUHUB.CC.UKANS.EDU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Bob Sloane <sloane@KUHUB.CC.UKANS.EDU>
Organization: University of Kansas Academic Computing Services
Subject:      Re: Error sending Mail to Usenet
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>

In article <23n5a8$iag@sacomm.schulz.unisa.edu.au>,
 cowleym@sacomm.schulz.unisa.edu.au () writes:
> We are having an occassional problem with control wanting to send mail to
> usenet with a line that is too long. Has anyone heard of this problem?

I received both of the control messages you mentioned and had no
problem processing either of them.  This sounds more like a MAIL
problem than a NEWS problem.  Since I can't duplicate the problem
here, I can't do much to figure out what is going on. I seem to recall
some problems with Stream-LF files and mail.  If you can duplicate the
problem reliably, you might try the following patch and see if it
helps.  If this fixes the problem, let me know I will add it to the
current release.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444

*** newscontrol.c;-1
--- newscontrol.c
**************
*** 95,101

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w"))) return(NOSCRATCHFILE);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
--- 95,101 -----

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) return(NOSCRATCHFIL
E);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
**************
*** 126,132

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w"))) return(NOSCRATCHFILE);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
--- 126,132 -----

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) return(NOSCRATCHFIL
E);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
**************
*** 158,164

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w"))) return(NOSCRATCHFILE);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
--- 158,164 -----

    strcpy(vms_address,add_transform(mail_replyto));
    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) return(NOSCRATCHFIL
E);

    fprintf(fpm,"Response-To-Control: %s message\n",argv[CONTROL]);
    fprintf(fpm,"Responding-System: %s\n",news_node);
**************
*** 272,278
      auto_cre_grp = 1;
      do_newg(locname,0,1);
      auto_cre_grp = sc;
!     if ((g = ga_exact_name(locname)) && (fpm = fopen(mail_scratch,"w"))) {
        fprintf(fpm,"Control: newgroup - created %s\n",ga[g]->grp_name);
        if (*descrip) {
          fprintf(fpm,"Control: newgroup - modified %s/TITLE=\"%s\"\n",
--- 272,278 -----
      auto_cre_grp = 1;
      do_newg(locname,0,1);
      auto_cre_grp = sc;
!     if ((g = ga_exact_name(locname)) && (fpm = fopen(mail_scratch,"w","rfm=var
","rat=cr"))) {
        fprintf(fpm,"Control: newgroup - created %s\n",ga[g]->grp_name);
        if (*descrip) {
          fprintf(fpm,"Control: newgroup - modified %s/TITLE=\"%s\"\n",
**************
*** 296,302
          if (ga[g]->grp_life) ga[g]->grp_life = 0;
          update_newsgrp(g);
          }
!       if (fpm || (fpm = fopen(mail_scratch,"w"))) {
          if (switches & EXECUTE_CONTROL) {
          fprintf(fpm,"Control: newgroup - modified %s/NOLOCAL%s/HOLD\n",ga[g]->
grp_name,(mod ? "/MOD" : ""));                  /* modified */
          } else {
--- 296,302 -----
          if (ga[g]->grp_life) ga[g]->grp_life = 0;
          update_newsgrp(g);
          }
!       if (fpm || (fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) {
          if (switches & EXECUTE_CONTROL) {
          fprintf(fpm,"Control: newgroup - modified %s/NOLOCAL%s/HOLD\n",ga[g]->
grp_name,(mod ? "/MOD" : ""));                  /* modified */
          } else {
**************
*** 319,325
          }
        }
      }
!   else if (fpm || (fpm = fopen(mail_scratch,"w"))) {
      fprintf(fpm,"$! Generated Command file from newgroup message:\n");
      fprintf(fpm,"$! use EXTRACT/NOHEAD then execute this file\n$!\n");
      fprintf(fpm,"$ NEWS/NOSCREEN\n");
--- 319,325 -----
          }
        }
      }
!   else if (fpm || (fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) {
      fprintf(fpm,"$! Generated Command file from newgroup message:\n");
      fprintf(fpm,"$! use EXTRACT/NOHEAD then execute this file\n$!\n");
      fprintf(fpm,"$ NEWS/NOSCREEN\n");
**************
*** 382,388

    if (ga[g]->grp_flags & (NEWS_M_LOCAL | NEWS_M_MAILGROUP)) return(LOCALNEWSGR
OUP);

!   fpm = fopen(mail_scratch,"w");
    if (switches & EXECUTE_DELETE) {
      delgrp_file(g);
      if (fpm) fprintf(fpm,"Control: rmgroup %s - Deleted\n",locname);
--- 382,388 -----

    if (ga[g]->grp_flags & (NEWS_M_LOCAL | NEWS_M_MAILGROUP)) return(LOCALNEWSGR
OUP);

!   fpm = fopen(mail_scratch,"w","rfm=var","rat=cr");
    if (switches & EXECUTE_DELETE) {
      delgrp_file(g);
      if (fpm) fprintf(fpm,"Control: rmgroup %s - Deleted\n",locname);
**************
*** 526,532
    if (!(fpr = fopen(fn,"r"))) return(NOACCESSINFILE);

    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w"))) {
      fclose(fpr);
      return(NOSCRATCHFILE);
      }
--- 526,532 -----
    if (!(fpr = fopen(fn,"r"))) return(NOACCESSINFILE);

    if (!*mail_scratch) sprintf(mail_scratch,"SYS$SCRATCH:NEWS_MAIL_%X.TMP",getp
id());
!   if (!(fpm = fopen(mail_scratch,"w","rfm=var","rat=cr"))) {
      fclose(fpr);
      return(NOSCRATCHFILE);
      }
