[nos-bbs] getting mail into the BBS

Tim Gorman ab0wr at ab0wr.net
Fri Mar 17 14:28:49 EST 2006


Did you make root part of the wheel group in your /etc/groups file? 

Do an su to root, cd to your jnos/spool/mail directory, do a "vi test", enter 
some gibberish and then try to save. See if you get a file permission error.

tim ab0wr

On Wednesday 15 March 2006 15:28, Torsten Harenberg wrote:
> Hi Tim,
>
> well.. I have no close look into the code, so I'm not 100% sure, but as
> far as I understood, the message come from here (main.c:2503)
>
>              if(IndexFile(argv[i],0) != 0)
>                  tprintf("Error writing index file for %s\n",argv[i]);
>              /* Remove the lock */
>              rmlock(Mailspool,argv[i]);
>
> So this message will be printed when IndexFile calls a return with
> something else than 0.
>
> int IndexFile(char *name,int verbose) is in index.c and has seven
> return's which give non-zero error codes.
>
> So I put some debug tprintf statements into that function and those told
> me that code snipplet down in my mail is the one doing the return != 0.
>
> So before going further down in the code and find the atomic statement
> causing the problem, I was hoping that somebody with more experience may
> know what goes wrong.
>
> File permissions is a good hint. I put everything on root:wheel 744
> (jnos is running as root). I haven't found any documentation telling me
> that this is wrong (actually I haven't found anything about file
> permissions, yet).
>
> Any thoughts on that?
>
> Best regards,
>
>   Torsten
>
> Tim Gorman wrote:
> > Are you sure you have the right code location? Your error message says it
> > is having a problem writing the index file. The code you reference has to
> > do with reading a file.
> >
> > bgets() just calls fgets() and then cycles through the string replacing
> > all 0xd and 0xa instances with \0.
> >
> > I am assuming that a write function is called somewhere and that is what
> > is actually causing the failure to write. Could this be a permission
> > problem?
> >
> > tim ab0wr
> >
> > On Wednesday 15 March 2006 03:53, Torsten Harenberg wrote:
> >> Dear all,
> >>
> >> I investigated this a bit further and I know now that the index files
> >> cannot be rewritten:
> >>
> >> jnos> index dl1thm
> >> Error writing index file for dl1thm
> >>
> >> jnos>
> >>
> >>
> >> I crawled a bit through the code and found, that I get a error code in
> >> index.c exactly here:
> >>
> >>              /* Read the 'Received...' and 'ID... lines'
> >>               * to get the msgid - WG7J
> >>               */
> >>              if(bgets(buf, sizeof(buf), fp) == NULL) {   /* "Received "
> >> line */
> >>                  default_index("",&ind);
> >>                  fclose(fp);
> >>                  close(idx);
> >>                  return ERROR;
> >>              }
> >>
> >>
> >> Files look like this:
> >>
> >> apfel:~/jnos/spool/mail root# hexdump dl1thm.ind
> >> 0000000 0000 0001 0000 0000 0000 0000
> >> 000000c
> >> apfel:~/jnos/spool/mail root# cat dl1thm.usr
> >> dl1thm 0
> >> apfel:~/jnos/spool/mail root# cat dl1thm.ind
> >> apfel:~/jnos/spool/mail root# cat dl1thm.txt
> >>  From dl1thm at dl1thm.ampr.org Wed Mar 15 10:44:05 2006
> >> Received: from dl1thm.ampr.org by dl1thm.ampr.org (JNOS2.0d) with SMTP
> >>          id AA35 ; Wed, 15 Mar 2006 10:44:05 CET
> >> Date: Wed, 15 Mar 2006 10:43:57 CET
> >> Message-Id: <33 at dl1thm.ampr.org>
> >> From: dl1thm at dl1thm.ampr.org
> >> To: dl1thm
> >> Subject: testmail
> >> X-BBS-Msg-Type: P
> >> X-JNOS-User-Port: Telnet   (dl1thm @ 127.0.0.1)  ->   Sending message
> >>
> >> Testmail
> >>
> >>  From dl1thm at dl1thm.ampr.org Wed Mar 15 10:44:18 2006
> >> Received: from dl1thm.ampr.org by dl1thm.ampr.org (JNOS2.0d) with SMTP
> >>          id AA38 ; Wed, 15 Mar 2006 10:44:18 CET
> >> Date: Wed, 15 Mar 2006 10:44:09 CET
> >> Message-Id: <36 at dl1thm.ampr.org>
> >> From: dl1thm at dl1thm.ampr.org
> >> To: dl1thm at dl1thm
> >> Subject: testmail2
> >> X-BBS-Msg-Type: P
> >> X-JNOS-User-Port: Telnet   (dl1thm @ 127.0.0.1)  ->   Sending message
> >>
> >> testmail2
> >>
> >>
> >>
> >> Any ideas?
> >>
> >> Thanks and best regards,
> >>
> >>   Torsten DL1THM
> >>
> >> Torsten Harenberg wrote:
> >>> Hi Robert,
> >>>
> >>> Robert wrote:
> >>>> Hi Torsten,
> >>>>
> >>>> Do you have following lines in your  jnos/spool/rewite  file:
> >>>>
> >>>> *!*  $2@$1  r
> >>>> *@dl1thm.ampr.org  $1  r
> >>>> *@dl1thm  $1
> >>>>
> >>>> On the other hand all mail receipents in JNOS supposed to loged in at
> >>>> least once
> >>>> in order to receive mail (maybe it is a bug).
> >>>
> >>> thanks for that hint! Mail is now internally delivered and leaves SMTP
> >>> queue.
> >>>
> >>> Now I can see the mail being delivered to the appropriate files:
> >>>
> >>> [20:03] harenber at Torsten-Harenbergs-PowerBook:~/jnos/spool/mail $ ls -l
> >>> total 32
> >>> -rw-------   1 root  staff    12 Mar 12 20:03 dl1thm.ind
> >>> -rw-r--r--   1 root  staff  1967 Mar 12 20:03 dl1thm.txt
> >>> -rw-r--r--   1 root  staff     9 Feb 18 18:39 dl1thm.usr
> >>>
> >>> But when I log into the BBS, no mails are there (I have logged in
> >>> several times before the first mail, so the user account is there):
> >>>
> >>>
> >>> JNOS (dl1thm.ampr.org)
> >>>
> >>> login: dl1thm
> >>> Password:
> >>> [JNOS-2.0d-BFHIM$]
> >>> You have 0 messages.
> >>> Area: dl1thm (#1) >
> >>>
> >>> Anybody knows what is missing?
> >>>
> >>> Thanks,
> >>>
> >>>   Torsten DL1THM
> >
> > _______________________________________________
> > nos-bbs mailing list
> > nos-bbs at lists.tapr.org
> > https://lists.tapr.org/cgi-bin/mailman/listinfo/nos-bbs




More information about the nos-bbs mailing list