Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_3_19910112
-
mm-dom/maiser.dif
There are no other files named maiser.dif in the archive.
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 1
LINE 1, PAGE 1
1) TITLE MAISER TOPS-20 SMTP mail server
1) SUBTTL Written by Mark Crispin - November 1982
1)
1) ; Copyright (C) 1982, 1983, 1984, 1985, 1986, 1987, 1988 Mark Crispin
1) ; All rights reserved
1)
LINE 1, PAGE 1
2) ;[SRI-NIC]SRC:<MM>MAISER.MAC.126, 2-Sep-86 14:39:20, Edit by MKL
2) ;Log unknown hosts
2)
2) TITLE MAISER TOPS-20 SMTP mail server
2) SUBTTL Written by Mark Crispin - November 1982
2)
2) ; Copyright (C) 1982, 1983, 1984, 1985 Mark Crispin. All rights reserved.
2)
LINE 10, PAGE 1
1) MLSVER==6 ; MAISER's release version (matches monitor's)
1) MLSMIN==1 ; MAISER's minor version
1) MLSEDT==^D162 ; MAISER's edit version
1)
1) SEARCH MACSYM,MONSYM ; system definitions
1) SALL ; suppress macro expansions
LINE 12, PAGE 1
2) MLSVER==5 ; MAISER's release version (matches monitor's)
2) MLSMIN==4 ; MAISER's minor version
2) MLSEDT==^D140 ; MAISER's edit version
2)
2) SEARCH MACSYM,MONSYM,JOBDAT ; system definitions
2) SALL ; suppress macro expansions
LINE 23, PAGE 1
1) IFNDEF OT%822,OT%822==:1
1)
LINE 25, PAGE 1
2)
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 2
LINE 35, PAGE 1
1) ; server can essentially support any network.
1) ;
LINE 36, PAGE 1
2) ; server can essentially support any network. The current mode of operation
2) ; is to have the network server (NETSRV or equivalent program) attach a job
2) ; running MAISER at top level to a network virtual terminal, but other
2) ; models are available by redefining primary I/O.
2) ;
LINE 43, PAGE 1
1) EXTERN $GTPRO,$GTNAM,$GTLCL,$GTHNS,$GTHSN,$GTHRL,$RMREL
1) EXTERN $WAKE
LINE 47, PAGE 1
2) EXTERN $GTPRO,$GTNAM,$GTLCL,$GTHNS,$GTHSN,$RMREL
2) EXTERN $WAKE
LINE 1, PAGE 4
1) ^L
1) SUBTTL GTDOM% definitions
1)
1) IFNDEF GTDOM%,<
1) OPDEF GTDOM% [JSYS 765]
1)
1) GD%LDO==:1B0 ; local data only (no resolve)
1) GD%MBA==:1B1 ; must be authoritative (don't use cache)
1) GD%RBK==:1B6 ; resolve in background
1) GD%EMO==:1B12 ; exact match only
1) GD%RAI==:1B13 ; uppercase output name
1) GD%QCL==:1B14 ; query class specified
1) GD%STA==:1B16 ; want status code in AC1 for marginal success
1) .GTDX0==:0 ; total success
1) .GTDXN==:1 ; data not found in namespace (authoritative)
1) .GTDXT==:2 ; timeout, any flavor
1) .GTDXF==:3 ; namespace is corrupt
1)
1) .GTDWT==:12 ; resolver wait function
1) .GTDPN==:14 ; get primary name and IP address
1) .GTDMX==:15 ; get MX (mail relay) data
1) .GTDLN==:0 ; length of argblk (inclusive)
1) .GTDTC==:1 ; QTYPE (ignored for .GTDMX),,QCLASS
1) .GTDBC==:2 ; length of output string buffer
1) .GTDNM==:3 ; canonicalized name on return
1) .GTDRD==:4 ; returned data begins here
1) .GTDML==:5 ; minimum length of argblock (words)
1) .GTDAA==:16 ; authenticate address
1) .GTDRR==:17 ; get arbitrary RR (MIT formatted RRs)
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 3
1) >;IFNDEF GTDOM%
1) ^L
1) SUBTTL Impure storage
1)
LINE 1, PAGE 4
2) ^L SUBTTL Impure storage
2)
LINE 7, PAGE 6
1) .JBUUO: BLOCK 1 ; LUUO saved here
1) .JB41: JSR UUOPC ; instruction executed on LUUO
1) UUOACS: BLOCK 20 ; save of UUO ACs
1)
1) LOC 116
1) .JBSYM: BLOCK 1 ; symbol table pointer
1) .JBUSY: BLOCK 1 ; place holder
1)
LINE 6, PAGE 5
2) IF1,<IFN <.-.JBUUO>,<.FATAL .JBUUO in wrong location>>
2) .JBUUO: BLOCK 1 ; LUUO saved here
2) .JB41: JSR UUOPC ; instruction executed on LUUO
2) BLOCK .JBSYM-.
2) .JBSYM: BLOCK 1 ; symbol table pointer
2) .JBUSY: BLOCK 1 ; place holder
2) UUOACS: BLOCK 20 ; save of UUO ACs
2)
2) IFN <.-.JBDA>,<.FATAL Low memory doesn't end at .JBDA>
2)
LINE 24, PAGE 7
1) ; Host name/address storage
1)
1) LCLHNO: BLOCK 1 ; local host address from STAT%
1) LCLHNC: BLOCK 1 ; local host address (in canonical form)
1) LCLHST: BLOCK <HSTNML/5>+1 ; local host name
1) FRNHNO: BLOCK 1 ; foreign host address from STAT%
1) FRNHST: BLOCK <HSTNML/5>+1 ; foreign host name from FRNHNO
1) FRNHNM: BLOCK <HSTNML/5>+1 ; foreign host name from HELO negotiation
LINE 24, PAGE 6
2) ; Host name/address storage. The difference between the canonical address
2) ; and the actual connection address only applies for multi-homed sites. The
2) ; canonical address is the value of $GTHSN($GTHNS(address)), where address
2) ; can be any of a multi-homed host's various addresses.
2)
2) LCLHNO: BLOCK 1 ; local host address
2) LCLHNC: BLOCK 1 ; local host address (in canonical form)
2) LCLHST: BLOCK <HSTNML/5>+1 ; local host name
2) FRNHNO: BLOCK 1 ; foreign host address from STAT%
2) FRNHNC: BLOCK 1 ; foreign host address (in canonical form)
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 4
2) FRNHST: BLOCK <HSTNML/5>+1 ; foreign host name
2) FRNHNM: BLOCK <HSTNML/5>+1 ; foreign host name from HELO negotiation
LINE 9, PAGE 11
1) IFNSK.
1) TMSG <421-Unable to get local host name>
1) JRST IMPERR
1) ENDIF.
1) HRROI A,LCLHST ; remove relative relative domain from name
1) CALL $RMREL
1) ENDIF.
1)
LINE 9, PAGE 10
2) ANNSK.
2) TMSG <421-Unable to get local host name>
2) JRST IMPERR
2) ENDIF.
2) HRROI A,LCLHST ; remove relative domain from name we got
2) CALL $RMREL
2)
LINE 4, PAGE 12
1) TMSG <220-> ; start banner
1) HRROI A,LCLHST ; output host name
LINE 4, PAGE 11
2) TMSG <220 > ; start banner
2) HRROI A,LCLHST ; output host name
LINE 21, PAGE 12
1) LOAD B,VI%EDN,EVEC+2 ; get edit version
1) IFN. B ; ignore if no edit version
1) MOVX A,.CHLPR ; edit delimiter
1) PBOUT%
1) MOVX A,.PRIOU ; now output the edit version
1) NOUT%
1) ERCAL FATAL
1) MOVX A,.CHRPR ; edit close delimiter
1) PBOUT%
1) ENDIF.
1) LOAD B,VI%WHO,EVEC+2 ; get who last edited
1) IFN. B ; ignore if last edited at DEC
1) MOVX A,"-" ; output delimiting hyphen
1) PBOUT%
1) MOVX A,.PRIOU ; now output the who version
1) NOUT%
1) ERCAL FATAL
1) ENDIF.
1) TMSG < at >
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 5
1) MOVX A,.PRIOU ; output date/time
1) SETO B, ; time now
1) MOVX C,OT%DAY!OT%SPA!OT%TMZ!OT%SCL!OT%822 ; RFC 822 standard date/time
1) ODTIM%
1) ERCAL FATAL
1) TMSG <
1) 220 Bugs/Gripes to [email protected]>
1) ; JRST GETCMD
LINE 21, PAGE 11
2) ; LOAD B,VI%EDN,EVEC+2 ; get edit version
2) ; IFN. B ; ignore if no edit version
2) ; MOVX A,.CHLPR ; edit delimiter
2) ; PBOUT%
2) ; MOVX A,.PRIOU ; now output the edit version
2) ; NOUT%
2) ; ERCAL FATAL
2) ; MOVX A,.CHRPR ; edit close delimiter
2) ; PBOUT%
2) ; ENDIF.
2) ; LOAD B,VI%WHO,EVEC+2 ; get who last edited
2) ; IFN. B ; ignore if last edited at DEC
2) ; MOVX A,"-" ; output delimiting hyphen
2) ; PBOUT%
2) ; MOVX A,.PRIOU ; now output the who version
2) ; NOUT%
2) ; ERCAL FATAL
2) ; ENDIF.
2) TMSG < at >
2) MOVX A,.PRIOU ; output date/time
2) SETO B, ; time now
2) MOVX C,OT%DAY!OT%SPA!OT%TMZ!OT%SCL ; RFC 822 standard date/time
2) ODTIM%
2) ERCAL FATAL
2) ; JRST GETCMD
LINE 12, PAGE 15
1) JRST SYNFLD
1) JUMPN C,SYNFLD ; error if not newline here
1) LOAD A,F%PRO ; get protocol used
1) CAIN A,P%TCP ; TCP?
1) IFSKP.
1) TQO F%HLO ; HELO is valid
1) HRROI D,[ASCIZ/ - Your name accepted but not validated/] ; no
1) ELSE.
1) SKIPE FRNHST ; got foreign host name yet?
1) IFSKP.
1) HRROI A,FRNHST ; get foreign host name
1) MOVE B,FRNHNO ; from foreign address
1) CALL $GTHNS
1) IFNSK.
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 6
1) TMSG <421-Unable to get foreign host name>
1) JRST IMPERR
1) ENDIF.
1) HRROI A,FRNHST ; remove relative domain from name
1) CALL $RMREL
1) ENDIF.
1) HRROI A,FRNHNM ; see if name is a literal
1) CALL $GTHRL ; parse it and return address in B
1) IFSKP.
1) CAME B,FRNHNO ; read a literal, address matches?
1) IFSKP.
1) TQO <F%HLO,F%VLH> ; yes, note host name validated
1) ELSE.
1) MOVE C,B ; in case needed to restore
1) HRROI A,BUFFER ; canonicalize address: get name for address
1) CALL $GTHNS
1) IFSKP.
1) HRROI A,BUFFER
1) CALL $RMREL
1) HRROI A,BUFFER ; see if that name matches
1) HRROI B,FRNHST
1) STCMP%
1) IFE. A
1) TQO <F%HLO,F%VLH> ; yes, note host name validated
1) ELSE.
1) HRROI A,BUFFER ; now get the address from the name
1) CALL $GTHSN
1) MOVE B,C ; restore address after failure
1) ENDIF.
1) ELSE.
1) MOVE B,C ; restore address after failure
1) ENDIF.
1) ENDIF.
1) ELSE.
1) HRROI A,FRNHNM ; point to her claimed foreign host name
1) HRROI B,FRNHST ; compare with what we think it is
1) STCMP% ; got a match?
1) IFE. A
1) TQO <F%HLO,F%VLH> ; yes, note host name validated
1) ELSE.
1) MOVX A,.GTDAA ; authenticate address
1) HRROI B,FRNHNM ; from claimed name
1) MOVE C,FRNHNO ; and its address
1) GTDOM%
1) IFNJE.
1) TQO <F%HLO,F%VLH> ; note validated if OK
1) ELSE.
1) HRROI A,FRNHNM ; point to claimed name
1) CALL $GTHSN ; get its address
1) SETO B, ; unknown name
1) ENDIF.
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 7
1) ENDIF.
1) ENDIF.
1) ANDQE. F%HLO ; if we're still not certain...
1) CAMN B,LCLHNC ; check for mirror connections
1) IFSKP.
1) TQO F%HLO ; HELO is valid
1) SKIPGE B
1) SKIPA D,[-1,,[ASCIZ/ - Never heard of that name/]]
1) HRROI D,[ASCIZ/ - You are a charlatan/]
1) ELSE.
1) HRROI A,LCLHST ; could be...allow it if it really is me!
1) HRROI B,FRNHST
1) STCMP%
1) SKIPN A
1) TQOA <F%HLO,F%VLH> ; this can happen when going by the numbers
1) HRROI D,[ASCIZ/ - You can't impersonate me/]
1) ENDIF.
1) ENDIF.
1) TQNN F%HLO ; have a valid HELO?
1) SKIPA A,[-1,,[ASCIZ/501 /]] ; HELO failure reply
LINE 12, PAGE 14
2) JRST SYMFLD
2) JUMPN C,SYMFLD ; error if not newline here
2) TQO F%HLO ; assume good HELO at this point
2) LOAD A,F%PRO ; get protocol used
2) CAIE A,P%TCP ; TCP?
2) IFSKP.
2) HRROI A,FRNHNM ; point to her claimed foreign host name
2) CALL $GTHSN ; translate name to address in B
2) IFSKP.
2) HRROI A,TMPBUF ; This code looks like an identity function,
2) CALL $GTHNS ; and usually it is. Suppose the host is
2) ANSKP. ; registered, multi-homed, going by the
2) HRROI A,TMPBUF ; numbers, and uses an address different
2) CALL $GTHSN ; from what we get as canonical. This code
2) ANSKP. ; canonicalizes it in that case.
2) CAME B,FRNHNC ; address matches who she claims to be?
2) IFSKP.
2) TQO F%VLH ; yes, note host name validated
2) HRROI D,[ASCIZ/ - Hello/]
2) ELSE.
2) HRROI D,[ASCIZ/ - You are a charlatan/] ; message if host lying
2) CAME B,LCLHNC ; even worse, is she claiming to be me?
2) ANSKP.
2) HRROI D,[ASCIZ/ - You can't impersonate me/] ; utter mendacity
2) TQZ F%HLO ; invalidate HELO as this is probably echo back
2) ENDIF.
2) ELSE.
2) HRROI D,[ASCIZ/ - Never heard of that name/] ; unknown name
2) ENDIF.
2) ELSE.
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 8
2) HRROI D,[ASCIZ/ - Your name accepted but not validated/]
2) ENDIF.
2) TQNN F%HLO ; was HELO valid?
2) SKIPA A,[-1,,[ASCIZ/501 /]] ; HELO failure reply
LINE 101, PAGE 15
1) TQNN F%VLH ; host name validated?
1) SKIPA A,D ; no, output auxillary message
1) HRROI A,[ASCIZ/ - Hello/]
1) PSOUT%
1) SKIPN FRNHST ; do we know who foreign host is?
1) IFSKP.
LINE 50, PAGE 14
2) MOVE A,D ; output auxillary message
2) PSOUT%
2) SKIPN FRNHNO ; do we know who foreign host is?
2) IFSKP.
LINE 13, PAGE 17
1) CAIE C,"""" ; quoted string?
1) IFSKP.
1) DO.
1) ILDB C,A ; get next byte to consider
1) CAIN C,"""" ; end of quoted string?
1) IFSKP.
1) SOJL D,SYNFLD ; no, make sure field isn't too large
1) JUMPE C,SYNFLD ; also make sure no premature end of line
1) IDPB C,B ; store byte in string
1) LOOP. ; get next byte
1) ENDIF.
1) ENDDO.
1) ILDB C,A ; get final byte
1) JUMPN C,SYNFLD ; make sure line ends here
1) ELSE.
1) DO.
1) MOVEI E,(C) ; get copy of character
1) IDIVI E,^D32 ; E/ word to check, F/ bit to check
1) MOVNS F
1) MOVX G,1B0 ; make bit to check
1) LSH G,(F)
1) TDNE G,SPCMSK(E) ; is it a special character?
1) JRST SYNERR ; it is, lose
1) CAIE C,.CHRAB ; disallow broket and at as specials
1) CAIN C,"@"
1) JRST SYNERR
1) CAIN C,"\" ; quote next byte literally?
1) ILDB C,A ; yes, get next byte
1) IDPB C,B ; store byte in string
1) ILDB C,A ; get next byte to consider
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 9
1) SOJL D,SYNFLD ; field too large
1) JUMPN C,TOP. ; if non-null, continue parse
1) ENDDO.
1) ENDIF.
1) IDPB C,B ; tie off string
LINE 13, PAGE 16
2) DO.
2) MOVEI E,(C) ; get copy of character
2) IDIVI E,^D32 ; E/ word to check, F/ bit to check
2) MOVNS F
2) MOVX G,1B0 ; make bit to check
2) LSH G,(F)
2) TDNE G,SPCMSK(E) ; is it a special character?
2) JRST SYNERR ; it is, lose
2) CAIE C,.CHRAB ; disallow broket and at as specials
2) CAIN C,"@"
2) JRST SYNERR
2) CAIN C,"\" ; quote next byte literally?
2) ILDB C,A ; yes, get next byte
2) IDPB C,B ; store byte in string
2) ILDB C,A ; get next byte to consider
2) SOJL D,SYMFLD ; field too large
2) JUMPN C,TOP. ; if non-null, continue parse
2) ENDDO.
2) IDPB C,B ; tie off string
LINE 91, PAGE 17
1) CALL INFOUT ; output string from inferior
1) MOVX A,"@" ; output mailbox/host delimiter
LINE 75, PAGE 16
2) CALL MBXOUT ; output string from inferior
2) MOVX A,"@" ; output mailbox/host delimiter
LINE 99, PAGE 17
1) CALL INFOUT ; output string from inferior
1) ENDIF.
1) MOVX A,.CHRAB
1) PBOUT%
1) SKIPN 1(D) ; is this the last item on the list?
1) IFSKP. <TMSG <
1) >> ; no, output CRLF (don't use CALL CRLF!!)
1) AOJA D,TOP. ; continue until done
LINE 83, PAGE 16
2) CALL MBXOUT ; output string from inferior
2) ENDIF.
2) MOVX A,.CHRAB
2) PBOUT%
2) SKIPE 1(D) ; is this the last item on the list?
2) CALL CRLF ; no, output CRLF delimiter
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 10
2) AOJA D,TOP. ; continue until done
LINE 13, PAGE 19
1) JRST SYNFLD ; syntax error in mailbox
1) MOVSI D,-MLQTBL ; pointer to table of mail queue devices
LINE 13, PAGE 18
2) JRST SYMFLD ; syntax error in mailbox
2) MOVSI D,-MLQTBL ; pointer to table of mail queue devices
LINE 63, PAGE 19
1) SKIPN FRNHST ; foreign host number known?
1) IFSKP.
LINE 63, PAGE 18
2) SKIPN FRNHNO ; foreign host number known?
2) IFSKP.
LINE 92, PAGE 19
1) SKIPE MAILBX ; was a proper return path specified?
1) IFSKP.
1) HRROI B,[ASCIZ/=DISCARD-ON-ERROR/]
1) SOUT% ; no, failures go to a black hole
1) ELSE.
1) HRROI B,[ASCIZ/=RETURN-PATH:/]
LINE 92, PAGE 18
2) SKIPN MAILBX ; was a proper return path specified?
2) IFSKP.
2) HRROI B,[ASCIZ/=RETURN-PATH:/]
LINE 106, PAGE 19
1) MOVE B,[POINT 7,MAILBX] ; now output Mailbox
1) CALL MBXOUT
1) MOVX B,"@" ; mailbox/domain delimiter
LINE 103, PAGE 18
2) MOVE A,[POINT 7,MAILBX] ; now Mailbox
2) TQZ F%QOT ; initially require no quoting
2) MOVX B,"\" ; quote for wierd characters
2) MOVE G,[POINT 7,TMPBUF] ; pointer to temporary buffer
2) DO. ; copy to TMPBUF with \ insert and " need check
2) ILDB C,A ; get character in buffer
2) MOVEI E,(C) ; make a copy of it to hack
2) IDIVI E,^D32 ; E := word to check, F := bit to check
2) MOVNS F
2) MOVX D,1B0 ; D := bit to check
2) LSH D,(F)
2) TDNE D,QOTMSK(E) ; is it a special character?
2) TQO F%QOT ; yes, note
2) TDNE D,QT1MSK(E) ; is it an wierd character?
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 11
2) IDPB B,G ; yes, put in wierd character quote
2) IDPB C,G ; now copy character
2) JUMPN C,TOP. ; continue
2) ENDDO.
2) MOVE A,MLQJFN
2) MOVX B,""""
2) TQNE F%QOT ; need to do atomic quoting?
2) BOUT% ; yes, insert it
2) HRROI B,TMPBUF ; output buffer
2) SETZ C,
2) SOUT%
2) MOVX B,""""
2) TQNE F%QOT ; need to do atomic quoting?
2) BOUT% ; yes, insert it
2) MOVX B,"@" ; mailbox/domain delimiter
LINE 126, PAGE 19
1) ENDIF.
1) HRROI B,[BYTE (7) .CHCRT,.CHLFD,.CHFFD]
1) SOUT%
1) ERCAL FATAL
1) TQO F%FRM ; flag "from" part of transaction complete
LINE 149, PAGE 18
2) HRROI B,[BYTE (7) .CHCRT,.CHLFD,.CHFFD]
2) SOUT%
2) ERCAL FATAL
2) ENDIF.
2) TQO F%FRM ; flag "from" part of transaction complete
LINE 14, PAGE 20
1) JRST SYNFLD ; syntax error
1) SKIPN DOMAIN ; if domain given, see if our own
LINE 14, PAGE 19
2) JRST SYMFLD ; syntax error
2) SKIPN DOMAIN ; if domain given, see if our own
LINE 89, PAGE 20
1) MOVX B,.MORNT ; does user want system messages?
LINE 89, PAGE 19
2) MOVX B,.MORTF ;READ USER MESSAGES
2) MTOPR%
2) IFNJE.
2) TXNN C,MO%NUM
2) JRST ENDLP.
2) ENDIF.
2) REPEAT 0,<
2) MOVX B,.MORNT ; does user want system messages?
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 12
LINE 94, PAGE 20
1) TQO F%RFS ; found an online user who's refusing
LINE 101, PAGE 19
2) >
2) TQO F%RFS ; found an online user who's refusing
LINE 26, PAGE 21
1) SKIPN FRNHST ; foreign host known?
1) SKIPA B,[-1,,[ASCIZ/not validated/]]
LINE 26, PAGE 20
2) SKIPN FRNHNO ; foreign host known?
2) SKIPA B,[-1,,[ASCIZ/not validated/]]
LINE 48, PAGE 21
1) MOVX C,OT%DAY!OT%SPA!OT%TMZ!OT%SCL!OT%822 ; RFC 822 standard date/time
1) ODTIM%
LINE 48, PAGE 20
2) MOVX C,OT%DAY!OT%SPA!OT%TMZ!OT%SCL ; RFC 822 standard date/time
2) ODTIM%
LINE 8, PAGE 22
1) TMSG < Service closing transmission channel>
1) CALL CRLF
1) INPEOF: CALL HANGUP ; hang up the connection
LINE 8, PAGE 21
2) TMSG <, have a nice day!>
2) CALL CRLF
2) call logunk
2) INPEOF: CALL HANGUP ; hang up the connection
LINE 2, PAGE 23
1) ; NOOP - NOOP null command
LINE 2, PAGE 22
2) a.1==377b11
2) a.2==377b19
2) a.3==377b27
2) a.4==377b35
2)
2) ;log unknown stuff
2) logunk: movei 1,.gthns
2) hrroi 2,frnhst
2) move 3,frnhno
2) gthst%
2) erjmp logun1
2) ret ;found it, so ignore
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 13
2) logun1: movx 1,gj%sht!gj%old
2) hrroi 2,[asciz /system:smtp-unknown.log/]
2) gtjfn%
2) erjmp r
2) move 2,[fld(7,of%bsz)+of%app]
2) openf%
2) erjmp r
2) hrroi 2,[asciz /HOST : /]
2) setz 3,
2) sout%
2) load 2,a.1,frnhno
2) movei 3,^d10
2) nout%
2) jfcl
2) movei 2,"."
2) bout%
2) load 2,a.2,frnhno
2) movei 3,^d10
2) nout%
2) jfcl
2) movei 2,"."
2) bout%
2) load 2,a.3,frnhno
2) movei 3,^d10
2) nout%
2) jfcl
2) movei 2,"."
2) bout%
2) load 2,a.4,frnhno
2) movei 3,^d10
2) nout%
2) jfcl
2) hrroi 2,[asciz / : /]
2) setz 3,
2) sout%
2) hrroi 2,frnhnm
2) sout%
2) hrroi 2,[asciz / ::::
2) /]
2) sout%
2) closf%
2) erjmp .+1
2) ret
2)
2) ^L
2) ; NOOP - NOOP null command
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 14
LINE 4, PAGE 31
1) INFOUT: SAVEAC <A,B,C> ; preserve ACs
1) STKVAR <MBXADR>
LINE 4, PAGE 31
2) MBXOUT: SAVEAC <A,B,C> ; preserve ACs
2) STKVAR <MBXADR>
LINE 19, PAGE 31
1) MOVX A,.PRIOU ; output to primary I/O
1) MOVE B,MBXADR ; get address back
1) MOVX C,<WINPAG/1000> ; page in our address space
1) DPB C,[POINT 9,B,26] ; set up as new address
1) HRLI B,(<POINT 7,>) ; make pointer
1) CALLRET MBXOUT ; output mailbox
1)
1) ENDSV.
1) ^L
1) ; Here to output mailbox with RFC822 quoting
1) ; Accepts: A/ destination designator
1) ; B/ mailbox source pointer
1) ; CALL MBXOUT
1) ; Returns +1: always
1)
1) MBXOUT: SAVEAC <C,D,E,F,G>
1) STKVAR <SRCPTR>
1) MOVEM B,SRCPTR ; save source pointer
1) TQZ F%QOT ; initially require no quoting
1) MOVX B,"\" ; quote for wierd characters
1) MOVE G,[POINT 7,TMPBUF] ; pointer to temporary buffer
1) DO. ; copy to TMPBUF with \ insert and " need check
1) ILDB C,SRCPTR ; get character from source
1) ERCAL FATAL ; in case of page mapping lossage
1) MOVEI E,(C) ; make a copy of it to hack
1) IDIVI E,^D32 ; E := word to check, F := bit to check
1) MOVNS F
1) MOVX D,1B0 ; D := bit to check
1) LSH D,(F)
1) TDNE D,QOTMSK(E) ; is it a special character?
1) TQO F%QOT ; yes, note
1) TDNE D,QT1MSK(E) ; is it an wierd character?
1) IDPB B,G ; yes, put in wierd character quote
1) IDPB C,G ; now copy character
1) JUMPN C,TOP. ; continue
1) ENDDO.
1) MOVX B,""""
1) TQNE F%QOT ; need to do atomic quoting?
1) BOUT% ; yes, insert it
1) HRROI B,TMPBUF ; output buffer
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 15
1) SETZ C,
1) SOUT%
1) MOVX B,""""
1) TQNE F%QOT ; need to do atomic quoting?
1) BOUT% ; yes, insert it
1) RET
1) ^L
LINE 19, PAGE 31
2) MOVE A,MBXADR ; get address back
2) HRROI B,777000!<WINPAG/1000> ; -1,,pageaddr shifted by 9 bits
2) DPB B,[POINT 27,A,26] ; set up as new address
2) PSOUT% ; output the string
2) ERCAL FATAL ; this could lose if page mapping loses somehow
2) RET
2)
2) ENDSV.
2) ^L
LINE 7, PAGE 35
1) SYNFLD: TMSG <500 Syntax error or field too long: >
1) JRST DMPCMD
LINE 7, PAGE 34
2) SYMFLD: TMSG <500 Syntax error or field too long: >
2) JRST DMPCMD
LINE 20, PAGE 38
1) ERJMP R
1) ELSE.
LINE 20, PAGE 37
2) ERCAL FATAL
2) ELSE.
LINE 30, PAGE 38
1) ERJMP R
1) MOVEM C,LCLHNO ; save local host address
1) ENDIF.
1) HRROI A,LCLHST ; get local host name
1) SETO B,
1) CALL $GTHNS
1) RET
1) HRROI A,LCLHST ; remove relative domain from name
1) CALL $RMREL
1) MOVEM B,LCLHNC ; save canonical local host address
1) CAMN B,LCLHNO ; same as local host address?
1) IFSKP.
1) HRROI A,BUFFER ; ugh, gotta look at this closer
1) MOVE B,LCLHNO ; get name from connection local address
1) CALL $GTHNS
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 16
1) ANSKP.
1) HRROI A,BUFFER ; remove relative domain from name
1) CALL $RMREL
1) HRROI A,LCLHST ; compare the names
1) HRROI B,BUFFER
1) STCMP%
1) ANDN. A
1) TMSG <421-> ; sorry, local ports not supported yet!!
1) HRROI A,BUFFER ; output host name
1) PSOUT%
LINE 30, PAGE 37
2) ERCAL FATAL
2) MOVEM C,LCLHNO ; save local host address
2) ENDIF.
2) HRROI A,FRNHST ; get foreign host name
2) MOVE B,FRNHNO ; from foreign address
2) CALL $GTHNS
2) IFNSK.
2) TMSG <421-Unable to get foreign host name>
2) JRST IMPERR
2) ENDIF.
2) HRROI A,FRNHST ; now get canonical address from name
2) CALL $GTHSN
2) IFNSK.
2) TMSG <421-Unable to get canonical foreign host address>
2) JRST IMPERR
2) ENDIF.
2) MOVEM B,FRNHNC ; save canonical address
2) HRROI A,LCLHST ; get local host name
2) MOVE B,LCLHNO ; from local address
2) CALL $GTHNS
2) IFNSK.
2) TMSG <421-Unable to get local host name>
2) JRST IMPERR
2) ENDIF.
2) HRROI A,LCLHST ; now get canonical address from name
2) CALL $GTHSN
2) IFNSK.
2) TMSG <421-Unable to get canonical local host address>
2) JRST IMPERR
2) ENDIF.
2) MOVEM B,LCLHNC ; save canonical local host address
2) HRROI A,BUFFER ; $GTHNS below should read into a scratch area
2) SETO B,
2) CALL $GTHNS ; not $GTLCL since we need local address
2) IFNSK.
2) TMSG <421-Unable to get local host name>
2) JRST IMPERR
2) ENDIF.
2) CAMN B,LCLHNC ; is it the same host address?
2) IFSKP.
; MAISER.MAC.1 & <MM>MAISER.MAC.135 25-Apr-88 1243 PAGE 17
2) HRROI A,LCLHST ; no, check same name in case monitor still
2) HRROI B,BUFFER ; handles multihomed hosts in bogus fashion
2) STCMP%
2) ANDN. A ; did they match?
2) TMSG <421-> ; sorry, local ports not supported yet!!
2) HRROI A,LCLHST ; output host name
2) PSOUT%