XMR2 ;ISC-SF/GMB-SMTP Receiver (non-standard) ;04/17/2002 11:15
;;8.0;MailMan;;Jun 28, 2002
; *** Note that this command (MESS <what:parm>) is not standard.
; *** MESS ID, in particular, may return 'RSET', which is supposed
; to be sent only by the sender, not by the receiver.
MESS ; CHECK IF DUPLICATE MESSAGE / USERS...
N XMWHAT,XMPARM
I XMP="" D ERRCMD^XMR Q
S XMWHAT=$E($P(XMP,":"),1,6),XMPARM=$P(XMP,":",2,99)
I $T(@XMWHAT)="" D ERRCMD^XMR Q
D @XMWHAT
Q
BLOB ;; MESS BLOB
D BLOB^XMR0BLOB(XMPARM)
Q
CLOSED ;; MESS CLOSED
S XMZFDA(3.9,XMZIENS,1.95)="y"
S XMSG="250 OK" X XMSEN
Q
CONFID ;; MESS CONFIDENTIAL
S XMZFDA(3.9,XMZIENS,1.96)="y"
S XMSG="250 OK" X XMSEN
Q
CONFIR ;; MESS CONFIRMATION
S XMZFDA(3.9,XMZIENS,1.3)="y"
S XMSG="250 OK" X XMSEN
Q
ID ;;
N XMZCHK
S XMREMID=XMPARM
S XMZCHK=$$LOCALXMZ^XMR3A(XMREMID)
I 'XMZCHK S XMSG="250 OK" X XMSEN Q
I $P(XMZCHK,U,2,3)="1^P" S XMSG="250 OK" X XMSEN Q
;Message originated here. / Previously received message.
D DOTRAN^XMC1($S($P(XMZCHK,U,2):42305,1:42306))
S XMRXMZ=+XMZCHK
I $P(XMZCHK,U,3)'="E"!(XMRXMZ=XMZ) D Q
. I $P(XMZCHK,U,3)="P" D DOTRAN^XMC1(42307) ;Already purged.
. I $P(XMZCHK,U,3)="R" D DOTRAN^XMC1(42308) ;Already purged & replaced with a different message.
. S XMSG="RSET:"_XMRXMZ_"@"_^XMB("NETNAME")_":Duplicate purged" X XMSEN
D DOTRAN^XMC1(42309) ;Delivering to additional recipients.
S XMSG="RSET:"_XMRXMZ_"@"_^XMB("NETNAME")_":Previously received" X XMSEN
Q
INFO ;; MESS INFORMATION
S XMZFDA(3.9,XMZIENS,1.97)="y"
S XMSG="250 OK" X XMSEN
Q
LINES ;; MESS LINES
N XMLINES,XMLIMIT
S XMLIMIT=$P($G(^XMB(1,1,"NETWORK-LIMIT")),U,2)
S XMLINES=XMPARM
I 'XMLIMIT!(XMLINES'>XMLIMIT) S XMSG="250 OK" X XMSEN Q
S XMSG="RSET:"_XMLIMIT_":Max lines exceeded" X XMSEN
S XM2LONG=1
Q
TYPE ;; MESS TYPE
S XMZFDA(3.9,XMZIENS,1.7)=XMPARM
S XMSG="250 OK" X XMSEN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMR2 1933 printed Dec 13, 2024@02:12:53 Page 2
XMR2 ;ISC-SF/GMB-SMTP Receiver (non-standard) ;04/17/2002 11:15
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; *** Note that this command (MESS <what:parm>) is not standard.
+3 ; *** MESS ID, in particular, may return 'RSET', which is supposed
+4 ; to be sent only by the sender, not by the receiver.
MESS ; CHECK IF DUPLICATE MESSAGE / USERS...
+1 NEW XMWHAT,XMPARM
+2 IF XMP=""
DO ERRCMD^XMR
QUIT
+3 SET XMWHAT=$EXTRACT($PIECE(XMP,":"),1,6)
SET XMPARM=$PIECE(XMP,":",2,99)
+4 IF $TEXT(@XMWHAT)=""
DO ERRCMD^XMR
QUIT
+5 DO @XMWHAT
+6 QUIT
BLOB ;; MESS BLOB
+1 DO BLOB^XMR0BLOB(XMPARM)
+2 QUIT
CLOSED ;; MESS CLOSED
+1 SET XMZFDA(3.9,XMZIENS,1.95)="y"
+2 SET XMSG="250 OK"
XECUTE XMSEN
+3 QUIT
CONFID ;; MESS CONFIDENTIAL
+1 SET XMZFDA(3.9,XMZIENS,1.96)="y"
+2 SET XMSG="250 OK"
XECUTE XMSEN
+3 QUIT
CONFIR ;; MESS CONFIRMATION
+1 SET XMZFDA(3.9,XMZIENS,1.3)="y"
+2 SET XMSG="250 OK"
XECUTE XMSEN
+3 QUIT
ID ;;
+1 NEW XMZCHK
+2 SET XMREMID=XMPARM
+3 SET XMZCHK=$$LOCALXMZ^XMR3A(XMREMID)
+4 IF 'XMZCHK
SET XMSG="250 OK"
XECUTE XMSEN
QUIT
+5 IF $PIECE(XMZCHK,U,2,3)="1^P"
SET XMSG="250 OK"
XECUTE XMSEN
QUIT
+6 ;Message originated here. / Previously received message.
+7 DO DOTRAN^XMC1($SELECT($PIECE(XMZCHK,U,2):42305,1:42306))
+8 SET XMRXMZ=+XMZCHK
+9 IF $PIECE(XMZCHK,U,3)'="E"!(XMRXMZ=XMZ)
Begin DoDot:1
+10 ;Already purged.
IF $PIECE(XMZCHK,U,3)="P"
DO DOTRAN^XMC1(42307)
+11 ;Already purged & replaced with a different message.
IF $PIECE(XMZCHK,U,3)="R"
DO DOTRAN^XMC1(42308)
+12 SET XMSG="RSET:"_XMRXMZ_"@"_^XMB("NETNAME")_":Duplicate purged"
XECUTE XMSEN
End DoDot:1
QUIT
+13 ;Delivering to additional recipients.
DO DOTRAN^XMC1(42309)
+14 SET XMSG="RSET:"_XMRXMZ_"@"_^XMB("NETNAME")_":Previously received"
XECUTE XMSEN
+15 QUIT
INFO ;; MESS INFORMATION
+1 SET XMZFDA(3.9,XMZIENS,1.97)="y"
+2 SET XMSG="250 OK"
XECUTE XMSEN
+3 QUIT
LINES ;; MESS LINES
+1 NEW XMLINES,XMLIMIT
+2 SET XMLIMIT=$PIECE($GET(^XMB(1,1,"NETWORK-LIMIT")),U,2)
+3 SET XMLINES=XMPARM
+4 IF 'XMLIMIT!(XMLINES'>XMLIMIT)
SET XMSG="250 OK"
XECUTE XMSEN
QUIT
+5 SET XMSG="RSET:"_XMLIMIT_":Max lines exceeded"
XECUTE XMSEN
+6 SET XM2LONG=1
+7 QUIT
TYPE ;; MESS TYPE
+1 SET XMZFDA(3.9,XMZIENS,1.7)=XMPARM
+2 SET XMSG="250 OK"
XECUTE XMSEN
+3 QUIT