From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 22-AUG-1990 22:04:23.09
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	Yes, familiar 'bug'

Received:  by crdgw1.ge.com (5.57/GE 1.70)
	 id AA26306; Wed, 22 Aug 90 21:50:26 EDT
Message-Id:  <9008230150.AA26306@crdgw1.ge.com>
Received: From FSDEC4.WTP.CONTEL.COM by CRVAX.SRI.COM with TCP; Wed, 22 AUG 90 15:52:43 PDT
Date: 22 Aug 90 18:32:00 EDT
From: "]" <masonj@fsdec4.wtp.contel.com>
Subject: Yes, familiar 'bug'
To: "info-vax" <info-vax@sri.com>

>From:	BLUTO::WINS%"uc!cs.umn.edu!simvax.labmed.umn.edu!davidli@tut.cis.ohio-state.edu" 22-AUG-1990 17:28:11.26
>Subj:	the curious affair of phantom messages
>
>One of my users (who uses DECwindows MAIL exclusively) is continually having a
>problem with a message which indicates she has '65553 new messages'.  Using
>regular VAX MAIL, I find no such message.  Has anyone run across this problem
>before and, if so, what solution would you suggest?
>
>-- 
>
>David Paschall-Zimbel		davidli@simvax.labmed.umn.edu
>
 
     Yes, I have seen such a 'beast' as you mention. If the user's VMSMAIL
PROFILE record becomes corrrrrrupt in the VMSMAIL_PROFILE.DATA file, this 
can and will happen on occasion. Some cases can be cleared by READ/NEW in
the mail account, even though there may not be any new mail messages.
Other cases will require you to open the VMSMAIL_PROFILE.DATA file and
delete the user's profile record. I include the .COM file which I use after
my signature block below. I hope this helps. After you execute the .COM file
below, you should send a new mail message to the user, then have the user
go into DECwindows mail and see if the count is correct. I also include 
CHECK_MAIL.COM as the second command stream in order to easily check any
user's new mail count. We had a problem whereby we 'kept' the old VMS 4.7
profile, just renamed it to VMSMAIL_PROFILE.DATA, then, whenever we used
MASS11 mail, it would invariably cause a corrupt record to occur. It actually
had an incorrect record size when it wrote back to the file, so it was 'off
the correct boundary', therefore, the newmail count was not just incorrect,
the record was actually corrupt and that record had to be deleted and a 
new one created (by sending a new mail message).

#!==========================================================================!#
#! Jeff Mason, RM 1032N,                  May be reached by the following:  !#
#! Contel Federal Systems (CFS)           Voice:   (703) 818-4044           !#
#! 15000 Conference Center Drive          Inet: masonj@fsdec.wtp.contel.com !#
#! Chantilly, Virginia  22021-3808                                          !#
#!==========================================================================!#


$!---------------------------------------------------------------------------
$!
$!    MAILZAP.COM - To delete mail profile records from VMSMAIL_PROFILE.DATA
$!                  For clearing NEWMAIL counter and when you RENAME a user.
$!
$!    Author - Jeff Mason
$!    Date - 01/10/90
$!
$!---------------------------------------------------------------------------
$!
$   set noon
$   on error then continue
$   on control_y then goto exit
$!
$   w = "write sys$output"
$   cls	= "''w' ""[2J[1;1f[J"""
$   file_open = 0
$!
$!---------------------------------------------------------------------------
$!
$   cls
$   if p1 .eqs. "" 
$    then 
$      gosub get_user
$    else
$      user = p1
$    endif
$!
$   @com:check_mail 'user'
$   open/read/write/share=read/share=write fil vmsmail_profile
$   file_open = 1
$   read/key="''user'"/error=not_found fil rec
$   show sym rec
$   w ""
$   inq/nopunc zap "Zap this record (Y/N)? "
$   w ""
$   if zap then gosub zap_record
$   goto exit
$!
$!---------------------------------------------------------------------------
$!
$ exit:
$!
$   if file_open then close fil
$   exit
$!
$!---------------------------------------------------------------------------
$!
$ not_found:
$   w ""
$   w " Record Not Found "
$   w ""
$   goto exit
$!
$!---------------------------------------------------------------------------
$!
$ zap_record:
$!
$   read/key="''user'"/del fil rec
$!
$ return
$!
$!---------------------------------------------------------------------------
$!
$ get_user:
$!
$   w ""
$   inq/nopunct user "Enter user to check VMSMAIL Profile for "
$   w ""
$   if user .eqs. "" then goto get_user
$!
$ return
$!
$!---------------------------------------------------------------------------

$!==============================================================================
$!
$!                   CHECK_MAIL.COM
$!
$!==============================================================================
$!
$   file_open = 0
$   w = "write sys$output"
$   myname = p1
$   if myname .eqs. "" then goto exit
$!
$   open/read/share/err=noname file vmsmail_profile
$   file_open = 1
$   read/err=noname/nolock/index=0/key="''myname'" file line
$   line == line
$   num = f$cvui( 35*8, 16, line )
$   if num .gt. 0
$      then
$        w "''myname' has ''num' new messages"
$      else
$        w "''myname' has no new messages"
$      endif
$   goto exit
$!
$ noname:
$!
$   if file_open
$      then
$        w ""
$        w "''myname' has no entry in vmsmail_profile."
$        w ""
$      else
$        w ""
$        w "ERROR - Unable to open VMSMAIL_PROFILE.DATA"
$      endif
$   goto exit
$!
$!You could then read your mail with these commands:
$!
$ exit:
$!
$   if file_open
$      then
$        close file
$        file_open = 0
$      endif
$   exit
$!
$!------------------------------------------------------------------------------
$!
$!==============================================================================


