T.R | Title | User | Personal Name | Date | Lines |
---|
368.1 | READ/NEW | STAR::PIPER | Derrell Piper - VMS development | Thu Dec 11 1986 10:49 | 1 |
| I believe a "READ/NEW" will do it.
|
368.2 | thought I already did, guess not | PHENIX::SMITH | William P.N. (Wookie::) Smith | Thu Dec 11 1986 12:55 | 4 |
| Sure does, many thanks,
Willie
|
368.3 | READ/NEW won't work if you move systems | PEANO::GLASER | Steve Glaser DTN 226-7646 LKG1-2/A19 | Tue Jan 13 1987 23:18 | 10 |
| This only works if you have a mailbox area for the account.
If you move your directory to another machine but leave the account
behind (probably with a mail forwarding address set), you can't
get the stupid number zeroed.
Thus is you had outstanding mail when you area got moved, you will
forever get the message on login. Only way to clear the number
is to have the sysadmin point your account at some disk space so
you can get mail up enough for "READ/NEW" to do its thing.
|
368.4 | | MARVIN::WARWICK | Oh No - it's the Pathetic Sharks !!! | Wed Jan 14 1987 06:03 | 5 |
|
Doesn't SYS$EXAMPLES:MAILUAF.COM give you some way of munging
new mail counts ?
Trev
|
368.5 | Changing the count to whatever | ECCGY4::COURTS | Edwin Courts, ECC Munich | Wed Jan 14 1987 06:29 | 65 |
|
The newmail count, along with other junk like personal name, forwarding
address, etc., etc., that is specific to each user is held in the
indexed file SYS$SYSTEM:VMSMAIL.DAT Assuming to you are sufficiently
privileged to read/write to it, and know the record layout therein,
it's not difficult to change any field relevant to a specific VAXmail
account. It is this file that is referred to at login to display
the 'xx New Mail messages' message.
I just knocked up the following command file to examine the newmail
count for a specific user and optionally change it to whatever value
you like. This does not affect the contents of mail folders (esp.
NEWMAIL) etc., in the actual users mail directory. Needless to say,
you'd usually simply change it to zero to clear the newmail count).
I have other command files that also play with VMSMAIL.DAT, for
example I change my Personal name, automatically when I enter Mail
each time to a string randomly taken from a list of over 300 personal
name strings.
If anyone wants to know more about the structure of VMSMAIL.DAT,
or my other command files, mail me direct.
Edwin.
BTW, no apologies for untidiness or poor structure...I just threw
it together in a few minutes!
==========================cut here===================================
$!
$! Command file SET_NEWMAIL_COUNT.COM to examine and optionally change
$! the 'newmail' counter for a VAXmail user.
$!
$! Edwin Courts, ECC Munich, January, 1987
$!
$! check for sufficient privs to do this
$old_priv=f$setpriv("BYPASS")
$if .not. f$privilege("BYPASS") then $goto nopriv
$! if here then we're powerful enough
$inquire user "Enter User name to change " !get username to change
$user=f$edit(user,"trim,compress,upcase") !tidy up input
$open/share=write/read/write file sys$system:vmsmail.dat !open file
$read/index=0/key="''user'"/error=none_such file record !get current mail record
$new_cnt=f$cvui(33*8,16,record) !determine count from record
$write sys$output "User ''user' has ''new_cnt' new messages"
$inquire cnt "Enter new count <ret> to leave untouched " !get count to insert
$if cnt.nes."" then $goto modify
$! if here then no input, so no change
$write sys$output "Count unchanged"
$goto xit
$modify:
$! if here, we want to alter record, and re-insert it.
$record[33*8,16]=f$integer(cnt) !alter field in record
$write/update file record !put record back
$goto xit
$none_such:
$write sys$output "User ''user' does not exist"
$xit:
$! tidy up and exit
$close file
$set_priv=f$setpriv(old_priv)
$exit
$nopriv:
$write sys$output "Not enough privileges...."
$exit
|
368.6 | (-: :-) | VAXUUM::DYER | Spot the Difference | Wed Jan 14 1987 09:11 | 4 |
| > I just knocked up the following command file . . .
Funny, it doesn't look pregnant . . .
<_Jym_>
|
368.7 | VMSMAIL May change.. | MOTHRA::DUTKO | Nestor Dutko, VMS/VAXclusters CSSE | Wed Jan 14 1987 09:23 | 6 |
| Please beware, the structure of VMSMAIL.DAT is always subject to
change, and therefore the reason why the record layout is not
documented anywhere. I believe that the file format will change
with V5.0.
-- Nestor
|
368.8 | | ERIS::CALLAS | So many ratholes, so little time | Wed Jan 14 1987 11:00 | 4 |
| The file format *will* change. As a matter of fact, it has already done
so.
Jon
|
368.9 | Life is an ever changing record | ECCGY4::COURTS | Edwin Courts, ECC Munich | Wed Jan 14 1987 13:26 | 21 |
| Re .6
I had a funny feeling when I wrote that that 'knocked up' meant
something other than what *I* meant to an American. Oh well,
must just go to the toilet to wash my hands :-)
Re .7
Credit where credit is due, Nestor gave me the record definitions I
used to knock up that command file. MAILUAF.COM helped alot
too.
Re .8
To the best of my knowlege that command file works ok for VMS
V4.0 - V4.4, I've not tried it beyond that. I've come to expect
changes to any system file like that between any VMS
updates/versions, and echo Nestors comments that the record
descriptions used are not public, and subject to change without
warning.
Could someone tell me what the current changes are, and when
they took effect ?
E
|
368.10 | | PASTIS::MONAHAN | | Thu Jan 15 1987 03:39 | 4 |
| re: .6 ....yet another case of being divided by a common language.
If he had used a pencil to write the note instead of electronic
means you could have disposed of the offending word with a rubber.
:-)
|
368.11 | Time for the definition to go Public? | IOSG::PYE | Graham - ALL-IN-1 Sorcerer's Apprentice | Thu Jan 15 1987 04:59 | 12 |
| Re .8
In view of the number of hackers and *gasp* applications (including ALL-IN-1)
that actually read VMSMAIL.DAT, isn't it time the definition of it for any
particular version was included in some suitable VMS file?
E.g. SYS.STB or STARLET or something?????
Or at least made available to developers without having to go through the
contortions that Edwin describes.
Graham Pye.
|
368.12 | Hear, hear. | ECCGY4::COURTS | Edwin Courts, ECC Munich | Thu Jan 15 1987 11:34 | 0 |
368.13 | A callable interface is preferable. | ERIS::CALLAS | So many ratholes, so little time | Thu Jan 15 1987 11:48 | 19 |
| re format of VMSMAIL.DAT:
The file will change in V5.0. There are some people running a
pre-release of V5.0 MAIL around the Enet. I'm running it myself on
ERIS. For these people, the mail file format has changed. As a matter
of fact, the file name has changed to VMSMAIL_PROFILE.DATA.
I'm not a MAIL devo, just a field test site, so feel free to flame at
me for these opinions, as it won't change a thing: no, I don't think
the format of the file should be documented. I really don't think it's
any business of an application what the format of the file is. In V5.0,
there will also be callable mail, which will give you access to the
mail profile so that your programs won't break when it changes again.
The format of the mail profile is the mail system's business. Once you
have a supported way to change parameters in it, you shouldn't be
dinking the file yourself.
Jon Callas
VMS development
|
368.14 | Share The Code - Reap The Benefits | VAXUUM::DYER | Spot the Difference | Thu Jan 15 1987 16:35 | 3 |
| {RE .13} - If everyone thought like that, TOPS-20 would never have had MM and
MS. Yup, we'd've been stuck with RDMAIL and SEND, which were supported.
<_Jym_>
|
368.15 | | ERIS::CALLAS | So many ratholes, so little time | Fri Jan 16 1987 11:16 | 11 |
| Sorry, but that's what supported interfaces are for. You'll be able to
do with callable mail anything you can do without it. What's the big
deal, anyway? It's *exactly* like saying, "Don't do I/O to SYSUAF, use
$GETUAI/$SETUAI instead." It's real desireable (at least to me, anyway)
to make interfaces that don't break. But then, I forget that this is
the hacker file, and not the software engineering file. ;-)
The poor MAIL devos are so beleagured as it is, it will be real nice
for them to have the file format to themselves.
Jon
|
368.16 | Hacking is more fun with a Chainsaw! | MOTHRA::DUTKO | Nestor Dutko, VMS/VAXclusters CSSE | Fri Jan 16 1987 11:53 | 17 |
| RE:.-1
> Sorry, but that's what supported interfaces are for. You'll be able to
> do with callable mail anything you can do without it. What's the big
> deal, anyway? It's *exactly* like saying, "Don't do I/O to SYSUAF, use
> $GETUAI/$SETUAI instead." It's real desireable (at least to me, anyway)
> to make interfaces that don't break. But then, I forget that this is
> the hacker file, and not the software engineering file. ;-)
True, but too many times there are certain things that would be
nice to be done, but are NOT provided. For example, consider the
case you gave of $GETUAI. There is NO way supplied to go through
the file sequentially! Yet, the feature may appear in V5.0 (saw
it in some notesfile), but as an interrim till the supported interface
is available, others have to hack...
-- nestor
|