From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: MAIL problems (not NEWMAIL count this time :-)
Date: 22 Jan 1993 12:54:25 GMT
Organization: HST Wide Field/Planetary Camera
Distribution: world
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu

In article <1993Jan21.113047.1@vxdesy.desy.de>, pawlak@vxdesy.desy.de writes:
>Environment:
>VAX-VMS 5.5-1
>Motif 1.1
>Hardware: 
>uVAX II (plase, don't laugh) displaying on a VAXStation (via DECNET).
>
>Problem: usign DECWindows MAIL I composed a message and tried to send it out
>(with a copy to myself). What I saw in the Message window was:
>
>Sending mail...
>Message sent to user ... at ....
>Error sending to user PAWLAK.
>Error writing DUA1:[PAWLAK.MAIL]MAIL.MAI;1.
>Duplicate key detected (DUP not set).
>Send completed with errors.
>                 
>There is no Facility/Ident in these messages, but the text sounds like 
>RMS DUP message (Duplicate key in indexed file and no DUPLICATES ALLOWED
>attribute set). The questions is how does MAIL construct the key then? I
>tried to send the message again (to myself only), changing the Subject
>field - nothing, I still can't put this one specific message into my
>MAIL.MAI. So it seems that neither send time nor header contents have
>anything to do with it. I checked that I can send myself other messages
>and that others can send messages to me - so the MAIL.MAI file structure
>seems OK. Any ideas how to get the message stored in my mail file?

This looks like a job for....

	$	ANAL/RMS/FDL

in particular,
	$ ANAL/RMS/FDL [.MAIL]MAIL.MAI
	$ TYPE MAIL.FDL
	IDENT	"22-JAN-1993 04:44:02	VAX/VMS ANALYZE/RMS_FILE Utility"

	SYSTEM
		SOURCE                  VAX/VMS
	
	FILE
		ALLOCATION              744
(yeah, I know, time to clean out my MAIL file :-)
		BEST_TRY_CONTIGUOUS     yes
		BUCKET_SIZE             5
		CLUSTER_SIZE            3
		CONTIGUOUS              no
		EXTENSION               15
		FILE_MONITORING         no
		GLOBAL_BUFFER_COUNT     0
		NAME                    "$1$DIA0:[CARL.MAIL]MAIL.MAI;1"
		ORGANIZATION            indexed
		OWNER                   [WFPC,CARL]
		PROTECTION              (system:RW, owner:RW, group:, world:)
	
	RECORD
		BLOCK_SPAN              yes
		CARRIAGE_CONTROL        none
		FORMAT                  variable
		SIZE                    2048
	
	AREA 0
		ALLOCATION              723
		BEST_TRY_CONTIGUOUS     yes
		BUCKET_SIZE             5
		EXTENSION               15
	
	AREA 1
		ALLOCATION              6
		BEST_TRY_CONTIGUOUS     yes
		BUCKET_SIZE             5
		EXTENSION               5
	
	AREA 2
		ALLOCATION              15
		BEST_TRY_CONTIGUOUS     yes
		BUCKET_SIZE             3
		EXTENSION               3
	
	KEY 0
		CHANGES                 no
		DATA_KEY_COMPRESSION    no
		DATA_RECORD_COMPRESSION yes
		DATA_AREA               0
		DATA_FILL               100
		DUPLICATES              no
		INDEX_AREA              1
		INDEX_COMPRESSION       no
		INDEX_FILL              100
		LEVEL1_INDEX_AREA       1
		NAME                    ""
		NULL_KEY                no
		PROLOG                  3
		SEG0_LENGTH             8
		SEG0_POSITION           0
		TYPE                    bin8
	
	KEY 1
		CHANGES                 yes
		DATA_KEY_COMPRESSION    yes
		DATA_AREA               2
		DATA_FILL               100
		DUPLICATES              yes
		INDEX_AREA              2
		INDEX_COMPRESSION       yes
		INDEX_FILL              100
		LEVEL1_INDEX_AREA       2
		NAME                    ""
		NULL_KEY                yes
		NULL_VALUE              0
		SEG0_LENGTH             39
		SEG0_POSITION           9
		TYPE                    string
	
	ANALYSIS_OF_AREA 0
		RECLAIMED_SPACE         0
	
	ANALYSIS_OF_AREA 1
		RECLAIMED_SPACE         0
	
	ANALYSIS_OF_AREA 2
		RECLAIMED_SPACE         0
	
	ANALYSIS_OF_KEY 0
		DATA_FILL               69
		DATA_KEY_COMPRESSION    0
		DATA_RECORD_COMPRESSION 13
		DATA_RECORD_COUNT       725
		DATA_SPACE_OCCUPIED     720
		DEPTH                   1
		INDEX_COMPRESSION       0
		INDEX_FILL              56
		INDEX_SPACE_OCCUPIED    5
		LEVEL1_RECORD_COUNT     144
		MEAN_DATA_LENGTH        391
		MEAN_INDEX_LENGTH       10
	
	ANALYSIS_OF_KEY 1
		DATA_FILL               76
		DATA_KEY_COMPRESSION    76
		DATA_RECORD_COUNT       54
		DATA_SPACE_OCCUPIED     12
		DEPTH                   1
		DUPLICATES_PER_SIDR     19
		INDEX_COMPRESSION       80
		INDEX_FILL              2
		INDEX_SPACE_OCCUPIED    3
		LEVEL1_RECORD_COUNT     3
		MEAN_DATA_LENGTH        86
		MEAN_INDEX_LENGTH       41

As you can see, it's KEY 0 that doesn't allow duplicates.  It's a BIN8 key,
which means it uses 8 bytes of binary data.  These 8 bytes happen to be the
system time that the message was delivered.  It appears that mail is trying to
deliver the message, but finds that another message has already arrived at
exactly the same time.  Now, this seems highly unlikely, though it's possible. 
Perhaps you could send us the output of an ANAL/RMS/FDL on YOUR mail file?
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.