Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMS2

XMS2.m

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