From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34458 Path: main.gmane.org!not-for-mail From: "Steven E. Harris" Newsgroups: gmane.emacs.gnus.general Subject: SMTP question (not quite Gnus-related) Date: 29 Jan 2001 10:04:06 -0800 Organization: Tenzing Communications Inc. Sender: owner-ding@hpc.uh.edu Message-ID: <87y9vujkvd.fsf@torus.tenzing.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035170380 30508 80.91.224.250 (21 Oct 2002 03:19:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:19:40 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id 5C625D049D for ; Mon, 29 Jan 2001 13:09:19 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id MAC16598; Mon, 29 Jan 2001 12:09:07 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 29 Jan 2001 12:08:26 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id MAA03947 for ; Mon, 29 Jan 2001 12:08:16 -0600 (CST) Original-Received: from ts-exch01.tenzing.com (ts-exch01.tenzing.com [63.115.0.25]) by mailhost.sclp.com (Postfix) with ESMTP id 70677D049D for ; Mon, 29 Jan 2001 13:08:45 -0500 (EST) Original-Received: from torus (63.115.3.217 [63.115.3.217]) by ts-exch01.tenzing.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id D49BGTDP; Mon, 29 Jan 2001 10:08:34 -0800 Original-Received: from seh by torus with local (Exim 3.12 #1 (Debian)) id 14NIes-0003jT-00 for ; Mon, 29 Jan 2001 10:04:06 -0800 Original-To: ding@gnus.org User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef) Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 77 Xref: main.gmane.org gmane.emacs.gnus.general:34458 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34458 I'm not sure if this question is appropriate for this forum, but I trust that avid Gnus contributors and users may know the answer. Regarding the SMTP DATA command: must a *completely blank* e-mail message be submitted as: . or simply as . RFC821 is somewhat ambiguous - or contradictory - about the point. In section 4.1.1 (Command Semantics), under DATA, we find: ,----[ RFC821 4.1.1 ] | The mail data is terminated by a line containing only a period, that | is the character sequence "." (see Section 4.5.2 on | Transparency). This is the end of mail data indication `---- This suggests that the *first* - the terminator for the line before - is actually part of the terminating sequence, and hence is not actually part of the mail body. We know that the at the end of the DATA command is mandatory, for section 4.1.2 (Command Syntax) shows it to be so. Therefore, we can't quite argue that an empty body is specified by DATA. because we'd still be missing a . Section 4.5.2 (Transparency) contains the contradiction: ,----[ RFC821 4.5.2 ] | Without some provision for data transparency the character sequence | "." ends the mail text and cannot be sent by the user. | | [...] | | 2. When a line of mail text is received by the receiver-SMTP | it checks the line. If the line is composed of a single | period it is the end of mail. If the first character is a | period and there are other characters on the line, the first | character is deleted `---- The second point suggests that all it takes is a period and a on a line of its own to terminate the message. If that's the case, then an empty, terminated message would be missing the first in the first paragraph's required termination sequence. The fragment "When a line of mail text is received" implies that the only way you know you're at the beginning of a line is if you're just seen a , or if you're at the start of the data. In the former case, you'd have the first before the period. In the second case - the "blank message" case - you wouldn't have the first . I've tried connecting to two SMTP servers (sendmail and exim) by telnet and manually submitting a blank message. In each case, the server accepted a period and newline as an acceptably-terminated body. That is, I didn't have to hit . Existing implementations therefore seem to to tolerate a terminator that's not quite what RFC821 requires. I would like to know both whether the first is required and if the first is part of the body text or part of the terminator. The distinction is relevant as I'm writing a state machine-based stream filter to process input from the DATA command. (Yes, it's an SMTP server.) Any insight would be greatly appreciated. (Or, if I should ask elsewhere, please advise.) -- Steven E. Harris :: steven.harris@tenzing.com Tenzing :: http://www.tenzing.com