- XMS2 ;ISC-SF/GMB-SMTP Send (non-standard) ;04/25/2002 14:14
- ;;8.0;MailMan;;Jun 28, 2002
- NONSTD(XMNETNAM,XMZ,XMZREC,XMRZ,XMRSET) ; Non-Standard commands,
- ; used only when communicating with other MailMan sites.
- I $O(^XMB(3.9,XMZ,2005,0)),XMC("MAILMAN")>7 D Q:ER
- . N XMBLOBER ; Send other Body parts
- . S XMBLOBER=0
- . D ^XMS0BLOB
- . I XMBLOBER S ER=1,ER("NONFATAL")=1
- D MESSID(XMNETNAM,XMZ,.XMRZ,.XMRSET) Q:ER!$G(XMRSET)
- I XMC("MAILMAN")<8 D Q:ER
- . D SPECIAL(XMZREC) Q:ER
- E D Q:ER
- . D LINES Q:ER!$G(XMRSET)
- Q
- MESSID(XMNETNAM,XMZ,XMRZ,XMRSET) ;
- ; This is a head's up on which message is being sent, and allows the
- ; receiving site to say, "don't bother, I've already received it long
- ; ago and it's already been purged." or "I've already got it, so don't
- ; bother sending the text again, but maybe you've got some new
- ; recipients for me."
- ; Send: "MESS ID:654321@LOCAL.DOMAIN.EXT"
- ; Recv: "250 OK"
- ; or: "RSET :21212@REMOTE.DOMAIN.EXT:Duplicate purged"
- ; or: "RSET :21212@REMOTE.DOMAIN.EXT:Previously received"
- N XMREMID
- S XMREMID=$$NETID^XMS3(XMZ)
- I XMREMID="" D Q
- . ; *** Maybe the thing to do here is to just assign it a net id
- . ; *** and go on our merry way.
- . D ERTRAN^XMC1(42357) ;Msg transmit aborted - remote msg with no remote msg ID
- . S ER("NONFATAL")=1
- . D DOTRAN^XMC1("")
- . N XMPARM,XMINSTR
- . S XMINSTR("FROM")="POSTMASTER"
- . S XMPARM(1)=XMZ
- . D TASKBULL^XMXBULL(.5,"XM SEND ERR REMOTE MSG ID",.XMPARM,"",.5,.XMINSTR)
- S XMSG="MESS ID:"_XMREMID X XMSEN Q:ER
- X XMREC Q:ER
- I $E(XMRG,1,4)="RSET" S XMRSET=1,XMRZ=$P(XMRG,":",2) Q
- Q
- LINES ; If message is at least 1000 lines, and it's not a PackMan message,
- ; let the other site know. If the other site says it's too many lines,
- ; we don't have to bother with the text.
- N XMLINES
- S XMLINES=$$LINE^XMXUTIL2(XMZ) Q:XMLINES<1000
- Q:$$PAKMAN^XMXSEC1(XMZ)
- S XMSG="MESS LINES:"_XMLINES X XMSEN Q:ER
- X XMREC Q:ER
- I $E(XMRG,1,4)="RSET" S XMRSET=1 Q
- Q
- SPECIAL(XMZREC) ; Special message characteristics
- ;I 'XMC("MAILMAN") D CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) Q
- N I
- S I=7 I $P(XMZREC,U,I)'="" D SPECSEND(I,$P(XMZREC,U,I)) Q:ER
- Q:ER
- F I=5,9,11,12 I "^Y^y^"[(U_$P(XMZREC,U,I)_U) D SPECSEND(I,$P(XMZREC,U,I)) Q:ER
- Q:ER
- Q
- SPECSEND(I,XMVAL) ;
- S XMSG="MESS "_$P("^^^^CONFIRMATION^^TYPE^^CLOSED^^CONFIDENTIAL^INFO",U,I)_":"_XMVAL X XMSEN Q:ER
- X XMREC
- Q
- ; *** The following is not used ***
- CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) ; If special VA-only instructions exist, send msg to user
- N I,XMSPEC
- F I=6,7 I $P(XMZREC,U,I)'="" D SPECSET(I,.XMSPEC)
- F I=5,9,11,12 I "^Y^y^"[(U_$P(XMZREC,U,I)_U) D SPECSET(I,.XMSPEC)
- Q:'$D(XMSPEC)
- N XMTEXT,J,XMINSTR,XMTO,XMIEN
- S XMINSTR("FROM")="POSTMASTER"
- S I=0
- S I=I+1,XMTEXT(I)="Your message to "_XMSITE_","
- S I=I+1,XMTEXT(I)="Subject: "_$P(XMZREC,U,1)_" ["_XMZ_"]"
- S I=I+1,XMTEXT(I)="will not include any special instructions, since that site"
- S I=I+1,XMTEXT(I)="is running a very old MailMan version: "_XMC("MAILMAN")
- S I=I+1,XMTEXT(I)=""
- S I=I+1,XMTEXT(I)="The special instructions to be ignored are:"
- S I=I+1,XMTEXT(I)=""
- S J=""
- F S J=$O(XMSPEC(J)) Q:J="" S I=I+1,XMTEXT(I)=" "_J
- S XMIEN=""
- F S XMIEN=$O(^XMB(3.9,XMZ,1,"AQUEUE",XMINST,XMIEN)) Q:XMIEN="" S XMTO($$SENDER^XMS3(XMZ,XMZREC,XMNVFROM,XMIEN))=""
- D SENDMSG^XMXSEND(.5,"Special Instructions Ignored","XMTEXT",.XMTO,.XMINSTR)
- Q
- SPECSET(I,XMSPEC) ;
- S XMSPEC($P("^^^^CONFIRMATION request^VAPORIZE date^TYPE^^CLOSED status^^CONFIDENTIAL status^INFO status",U,I))=""
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMS2 3593 printed Jan 18, 2025@03:14:15 Page 2
- XMS2 ;ISC-SF/GMB-SMTP Send (non-standard) ;04/25/2002 14:14
- +1 ;;8.0;MailMan;;Jun 28, 2002
- NONSTD(XMNETNAM,XMZ,XMZREC,XMRZ,XMRSET) ; Non-Standard commands,
- +1 ; used only when communicating with other MailMan sites.
- +2 IF $ORDER(^XMB(3.9,XMZ,2005,0))
- IF XMC("MAILMAN")>7
- Begin DoDot:1
- +3 ; Send other Body parts
- NEW XMBLOBER
- +4 SET XMBLOBER=0
- +5 DO ^XMS0BLOB
- +6 IF XMBLOBER
- SET ER=1
- SET ER("NONFATAL")=1
- End DoDot:1
- if ER
- QUIT
- +7 DO MESSID(XMNETNAM,XMZ,.XMRZ,.XMRSET)
- if ER!$GET(XMRSET)
- QUIT
- +8 IF XMC("MAILMAN")<8
- Begin DoDot:1
- +9 DO SPECIAL(XMZREC)
- if ER
- QUIT
- End DoDot:1
- if ER
- QUIT
- +10 IF '$TEST
- Begin DoDot:1
- +11 DO LINES
- if ER!$GET(XMRSET)
- QUIT
- End DoDot:1
- if ER
- QUIT
- +12 QUIT
- MESSID(XMNETNAM,XMZ,XMRZ,XMRSET) ;
- +1 ; This is a head's up on which message is being sent, and allows the
- +2 ; receiving site to say, "don't bother, I've already received it long
- +3 ; ago and it's already been purged." or "I've already got it, so don't
- +4 ; bother sending the text again, but maybe you've got some new
- +5 ; recipients for me."
- +6 ; Send: "MESS ID:654321@LOCAL.DOMAIN.EXT"
- +7 ; Recv: "250 OK"
- +8 ; or: "RSET :21212@REMOTE.DOMAIN.EXT:Duplicate purged"
- +9 ; or: "RSET :21212@REMOTE.DOMAIN.EXT:Previously received"
- +10 NEW XMREMID
- +11 SET XMREMID=$$NETID^XMS3(XMZ)
- +12 IF XMREMID=""
- Begin DoDot:1
- +13 ; *** Maybe the thing to do here is to just assign it a net id
- +14 ; *** and go on our merry way.
- +15 ;Msg transmit aborted - remote msg with no remote msg ID
- DO ERTRAN^XMC1(42357)
- +16 SET ER("NONFATAL")=1
- +17 DO DOTRAN^XMC1("")
- +18 NEW XMPARM,XMINSTR
- +19 SET XMINSTR("FROM")="POSTMASTER"
- +20 SET XMPARM(1)=XMZ
- +21 DO TASKBULL^XMXBULL(.5,"XM SEND ERR REMOTE MSG ID",.XMPARM,"",.5,.XMINSTR)
- End DoDot:1
- QUIT
- +22 SET XMSG="MESS ID:"_XMREMID
- XECUTE XMSEN
- if ER
- QUIT
- +23 XECUTE XMREC
- if ER
- QUIT
- +24 IF $EXTRACT(XMRG,1,4)="RSET"
- SET XMRSET=1
- SET XMRZ=$PIECE(XMRG,":",2)
- QUIT
- +25 QUIT
- LINES ; If message is at least 1000 lines, and it's not a PackMan message,
- +1 ; let the other site know. If the other site says it's too many lines,
- +2 ; we don't have to bother with the text.
- +3 NEW XMLINES
- +4 SET XMLINES=$$LINE^XMXUTIL2(XMZ)
- if XMLINES<1000
- QUIT
- +5 if $$PAKMAN^XMXSEC1(XMZ)
- QUIT
- +6 SET XMSG="MESS LINES:"_XMLINES
- XECUTE XMSEN
- if ER
- QUIT
- +7 XECUTE XMREC
- if ER
- QUIT
- +8 IF $EXTRACT(XMRG,1,4)="RSET"
- SET XMRSET=1
- QUIT
- +9 QUIT
- SPECIAL(XMZREC) ; Special message characteristics
- +1 ;I 'XMC("MAILMAN") D CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) Q
- +2 NEW I
- +3 SET I=7
- IF $PIECE(XMZREC,U,I)'=""
- DO SPECSEND(I,$PIECE(XMZREC,U,I))
- if ER
- QUIT
- +4 if ER
- QUIT
- +5 FOR I=5,9,11,12
- IF "^Y^y^"[(U_$PIECE(XMZREC,U,I)_U)
- DO SPECSEND(I,$PIECE(XMZREC,U,I))
- if ER
- QUIT
- +6 if ER
- QUIT
- +7 QUIT
- SPECSEND(I,XMVAL) ;
- +1 SET XMSG="MESS "_$PIECE("^^^^CONFIRMATION^^TYPE^^CLOSED^^CONFIDENTIAL^INFO",U,I)_":"_XMVAL
- XECUTE XMSEN
- if ER
- QUIT
- +2 XECUTE XMREC
- +3 QUIT
- +4 ; *** The following is not used ***
- CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) ; If special VA-only instructions exist, send msg to user
- +1 NEW I,XMSPEC
- +2 FOR I=6,7
- IF $PIECE(XMZREC,U,I)'=""
- DO SPECSET(I,.XMSPEC)
- +3 FOR I=5,9,11,12
- IF "^Y^y^"[(U_$PIECE(XMZREC,U,I)_U)
- DO SPECSET(I,.XMSPEC)
- +4 if '$DATA(XMSPEC)
- QUIT
- +5 NEW XMTEXT,J,XMINSTR,XMTO,XMIEN
- +6 SET XMINSTR("FROM")="POSTMASTER"
- +7 SET I=0
- +8 SET I=I+1
- SET XMTEXT(I)="Your message to "_XMSITE_","
- +9 SET I=I+1
- SET XMTEXT(I)="Subject: "_$PIECE(XMZREC,U,1)_" ["_XMZ_"]"
- +10 SET I=I+1
- SET XMTEXT(I)="will not include any special instructions, since that site"
- +11 SET I=I+1
- SET XMTEXT(I)="is running a very old MailMan version: "_XMC("MAILMAN")
- +12 SET I=I+1
- SET XMTEXT(I)=""
- +13 SET I=I+1
- SET XMTEXT(I)="The special instructions to be ignored are:"
- +14 SET I=I+1
- SET XMTEXT(I)=""
- +15 SET J=""
- +16 FOR
- SET J=$ORDER(XMSPEC(J))
- if J=""
- QUIT
- SET I=I+1
- SET XMTEXT(I)=" "_J
- +17 SET XMIEN=""
- +18 FOR
- SET XMIEN=$ORDER(^XMB(3.9,XMZ,1,"AQUEUE",XMINST,XMIEN))
- if XMIEN=""
- QUIT
- SET XMTO($$SENDER^XMS3(XMZ,XMZREC,XMNVFROM,XMIEN))=""
- +19 DO SENDMSG^XMXSEND(.5,"Special Instructions Ignored","XMTEXT",.XMTO,.XMINSTR)
- +20 QUIT
- SPECSET(I,XMSPEC) ;
- +1 SET XMSPEC($PIECE("^^^^CONFIRMATION request^VAPORIZE date^TYPE^^CLOSED status^^CONFIDENTIAL status^INFO status",U,I))=""
- +2 QUIT