Skip to main content

Scheme Mechanics: XRSQ R and XRSQ T

Scheme mechanics: XRSQ R (Recipients first)​

In the recipients-first scheme, XRCP is used to specify names which the FTP server stores in a list or table. Normally the reply for each XRCP will be either a 200 for acceptance, or a 4xx/5xx code for rejection; 450 and all 5xx codes are permanent rejections (e.g. user not known) which should be reported to the human sender, whereas 4xx codes in general connote some temporary error that may be rectified later. None of the 4xx/5xx replies impinge on previous or succeeding XRCP commands, except for 440 which indicates that no further XRCP's will succeed unless a message is sent to the already stored recipients or a reset is done.

Sending message text to stored recipients is done by giving a MAIL or MLFL command with no argument; that is, just MAIL<CRLF> or MLFL<CRLF>. Transmission of the message text is exactly the same as for normal MAIL/MLFL; however, a positive acknowledgement at the end of transmission means that the message has been sent to ALL recipients that were remembered with XRCP, and a failure code means that it should be considered to have failed for ALL of these specified recipients. This applies regardless of the actual error code; and whether the reply signifies success or failure, all stored recipient names are flushed and forgotten - in other words, things are reset to their initial state. This purging of the recipient name list must also be done as the "reset" side effect of any use of XRSQ.

A 440 reply to an XRCP can thus be handled by using a MAIL/MLFL to specify the message for currently stored recipients, and then sending more XRCP's and another MAIL/MLFL, as many times as necessary; for example, if a server only had room for 10 names this would result in a 50-recipient message being sent 5 times, to 10 different recipients each time.

If a user attempts to specify message text (MAIL/MLFL with no argument) before any successful XRCP's have been given, this should be treated exactly as a "normal" MAIL/MLFL with a null recipient would be; most servers will return an error of some type, such as "450 Null recipient".

See Appendix B for an example using XRSQ R.

Scheme mechanics: XRSQ T (Text first)​

In the text-first scheme, MAIL/MLFL with no argument is used to specify message text, which the server stores away. Succeeding XRCP's are then treated as if they were MAIL/MLFL commands, except that none of the text transfer manipulations are done; the stored message text is sent to the specified recipient, and a reply code is returned identical to that which an actual MAIL/MLFL would invoke. (Note ANY 2xx code indicates success.)

The stored message text is not forgotten until the next MAIL/MLFL or XRSQ, which will either replace it with new text or flush it entirely. Any use of XRSQ will reset this scheme by flushing stored text, as will any use of MAIL/MLFL with a non-null argument.

If an XRCP is seen before any message text has been stored, the user in effect is trying to send a null message; some servers might allow this, others would return an error code.

See Appendix C for an example using XRSQ T.