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

XMR4.m

Go to the documentation of this file.
  1. XMR4 ;ISC-SF/GMB-SMTP HELP ;04/17/2002 11:17
  1. ;;8.0;MailMan;**51**;Jun 28, 2002;Build 9
  1. HELPME ;
  1. N XMALL
  1. S XMALL="HHHH^HELO^HELP^MAIL^NOOP^QUIT^RCPT^RSET^TURN^DATA"
  1. I XMP="ALL" D ALL G END
  1. I U_XMALL_U[(U_XMP_U) D SHOW(XMP) G END
  1. D SHOW("HHHH")
  1. END I 'ER S XMSG="214 " X XMSEN
  1. Q
  1. ALL ;
  1. N I,J
  1. F I=1:1:$L(XMALL,U) D SHOW($P(XMALL,U,I)) Q:ER
  1. Q
  1. SHOW(XMCMD) ;
  1. N I
  1. F I=0:1 S XMSG="214-"_$P($T(@XMCMD+I),";",3,99) Q:$L(XMSG)=4 X XMSEN Q:ER
  1. Q
  1. HHHH ;;
  1. ;;This is the simple mail transfer protocol receiver
  1. ;;Commands currently understood are:
  1. ;;HELO <domain> (which initiates a transaction)
  1. ;;MAIL FROM: <reverse-path>
  1. ;;RCPT TO: <forward-path> (which names a recipient)
  1. ;;DATA (terminated with a single line of '.')
  1. ;;HELP (which displays this text)
  1. ;;NOOP (which does nothing)
  1. ;;RSET <reason for> which stops transmission of message
  1. ;;STAT (which displays the current status of the receiver)
  1. ;;TURN (Which turns around the line; Sender becomes receiver)
  1. ;;QUIT (which terminates the connection)
  1. ;;
  1. ;;CHRS <domain> initialize a remote domain
  1. ;;Extensions:
  1. ;;MESS ID:XMREMID Sending message remote ID to allow processing to stop
  1. ;;
  1. ;;Enter HELP ALL to see further discussion on all commands, or
  1. ;;HELP <command> to see further discussion of <command>.
  1. ;;
  1. HELO ;;
  1. ;;The HELO command is used to identify the sending host to the receiver:
  1. ;;
  1. ;; HELO <domain>
  1. ;;
  1. ;; Where <domain> is the name of the sending host.
  1. ;;
  1. ;;If the receiver will accept mail, it responds with its name.
  1. ;;
  1. ;;The HELO command must be the first command of a mail sequence.
  1. ;;
  1. MAIL ;;
  1. ;;The MAIL command is used after a HELO command to ask a receiver to
  1. ;;accept a mail message. The format is:
  1. ;;
  1. ;; MAIL FROM: <user>@<site>
  1. ;;
  1. ;;where <user> is the name of the user sending the message, and <site>
  1. ;;is the name of the site sending the mail, in Internet domain
  1. ;;format.
  1. ;;
  1. ;;The receiver will respond with "250 OK" if accepted, and "501 Invalid
  1. ;;Reverse path specification" if not.
  1. ;;
  1. ;;This command is followed with RCPT and DATA commands to name
  1. ;;and transfer the data, respectively.
  1. ;;
  1. RCPT ;;
  1. ;;This command is used to identify the recipients of the mail.
  1. ;;Its format is:
  1. ;;
  1. ;; RCPT TO: <user>
  1. ;;
  1. ;;If the user is found, the receiver will respond with "250 OK";
  1. ;;Otherwise, it will say "501 Invalid forward path specification".
  1. ;;
  1. ;;Each recipient of the message is named individually. The VRFY
  1. ;;command can be used to confirm the existence of a user without
  1. ;;actually putting him on the recipient list.
  1. ;;After recipients are specified, the DATA command is used to transfer
  1. ;;the body of the message.
  1. ;;
  1. DATA ;;
  1. ;;The DATA command is used after the MAIL and RCPT commands to transmit
  1. ;;the body of the message. The command has no arguments. The receiver's
  1. ;;response to the command is to either issue an error message:
  1. ;;"503 no recipients specified" or "354 Start mail input".
  1. ;;
  1. ;;Data will be accepted until a line consisting of a single period is
  1. ;;detected. If any line begins with a period, it must have an
  1. ;;additional period inserted at the beginning of the line.
  1. ;;
  1. ;;After the DATA command is completed, the receiver will respond with
  1. ;;"250 OK" if the message was accepted, or an error message if
  1. ;;otherwise.
  1. ;;
  1. RSET ;;
  1. ;;The RSET (Reset) command is used to reset the receiver to its initial
  1. ;;state and cancel any mail in progress. The sender does not need to
  1. ;;issue HELO again.
  1. ;;
  1. VRFY ;;
  1. ;;The VRFY (Verify) command is used to verify the existence of a user
  1. ;;at the receiver. The format is:
  1. ;;
  1. ;; VRFY <user>
  1. ;;
  1. ;;The computer will respond with the user's full name if found, or
  1. ;;"550 User not found" if not. This command can be issued at any
  1. ;;time, and does not affect the recipient list.
  1. ;;
  1. EXPN ;;
  1. ;;The EXPN (Expand) command causes the receiver to expand a mailing
  1. ;;list, showing the sender the list of individuals in the list.
  1. ;;
  1. HELP ;;
  1. ;;The HELP command displays user assistance information for interactive
  1. ;;users. If issued without an argument, it gives a general introduction.
  1. ;;If given an argument naming a command, it gives further information
  1. ;;on that command. If given an argument of "ALL", it displays
  1. ;;help on all arguments.
  1. ;;
  1. NOOP ;;
  1. ;;The NOOP (no operation) command causes the receiver to respond with
  1. ;;a "250 OK" message.
  1. ;;
  1. QUIT ;;
  1. ;;The QUIT command is used to terminate the mail transfer process.
  1. ;;The connection will be closed, and any mail transfers not concluded
  1. ;;with a successful DATA command will be lost.
  1. ;;
  1. TURN ;;
  1. ;;