[no subject]



Examples:
         S: 220 smtp.example.com ESMTP server ready
         C: EHLO jgm.example.com
         S: 250-smtp.example.com
         S: 250 AUTH CRAM-MD5 DIGEST-MD5
         C: AUTH FOOBAR
         S: 504 Unrecognized authentication type.
         C: AUTH CRAM-MD5
         S: 334
         PENCeUxFREJoU0NnbmhNWitOMjNGNndAZWx3b29kLmlubm9zb2Z0LmNvbT4=
         C: ZnJlZCA5ZTk1YWVlMDljNDBhZjJiODRhMGMyYjNiYmFlNzg2ZQ==
         S: 235 Authentication successful.

AND

7. Formal Syntax

   The following syntax specification uses the augmented Backus-Naur
   Form (BNF) notation as specified in [ABNF].

   Except as noted otherwise, all alphabetic characters are case-
   insensitive.  The use of upper or lower case characters to define
   token strings is for editorial clarity only.  Implementations MUST
   accept these strings in a case-insensitive fashion.

   UPALPHA         = %x41-5A            ;; Uppercase: A-Z

   LOALPHA         = %x61-7A            ;; Lowercase: a-z

   ALPHA           = UPALPHA / LOALPHA  ;; case insensitive

   DIGIT           = %x30-39            ;; Digits 0-9

   HEXDIGIT        = %x41-46 / DIGIT    ;; hexidecimal digit (uppercase)

   hexchar         = "+" HEXDIGIT HEXDIGIT

   xchar           = %x21-2A / %x2C-3C / %x3E-7E
                     ;; US-ASCII except for "+", "=", SPACE and CTL

   xtext           = *(xchar / hexchar)

   AUTH_CHAR       = ALPHA / DIGIT / "-" / "_"

   auth_type       = 1*20AUTH_CHAR

   auth_command    = "AUTH" SPACE auth_type [SPACE (base64 / "=")]
                     *(CRLF [base64]) CRLF

   auth_param      = "AUTH=" xtext
                       ;; The decoded form of the xtext MUST be either
                       ;; an addr-spec or the two characters "<>"

   base64          = base64_terminal /
                     ( 1*(4base64_CHAR) [base64_terminal] )

   base64_char     = UPALPHA / LOALPHA / DIGIT / "+" / "/"
                     ;; Case-sensitive

   base64_terminal = (2base64_char "==") / (3base64_char "=")

   continue_req    = "334" SPACE [base64] CRLF

   CR              = %x0C           ;; ASCII CR, carriage return

   CRLF            = CR LF

   CTL             = %x00-1F / %x7F ;; any ASCII control character and DEL

   LF              = %x0A           ;; ASCII LF, line feed

   SPACE           = %x20           ;; ASCII SP, space


==============================================================================

Below is a strace -etrace=write,read that has been cut up to just show the mail
handling.  This was done on Netscape 4.7 something I believe.

read(25, "220 digitalme.com Novonyx SMTP ready $Revision:   2.25  $\r\n", 1024)
= 59
write(25, "EHLO bigfoot.com\r\n", 18)   = 18
read(25, "250-digitalme.com Pleased to meet
you\r\n250-ETRN\r\n250-HELP\r\n250-EXPN\r\n250-PIPELINING\r\n250-8BITMIME\r\n250-DSN\r\n250-AUTH=LOGIN\r\n250
SIZE\r\n", 1024) = 134
write(25, "AUTH LOGIN xxxxxxx\r\n", 21) = 21  (My username in base64)
read(25, "334 UGFzc3dvcmQ6\r\n", 1024)  = 18 (Apparently this is 'Password' in
BASE64)
write(25, "xxxxxx\r\n", 14)       = 14 (My password in base64... nothing magic)
read(25, "235 Authentication successful!\r\n", 1024) = 32
write(25, "MAIL FROM:<trever_Adams bigfoot com>\r\n", 38) = 38
read(25, "250 Sender OK\r\n", 1024)     = 15
write(25, "RCPT TO:<trever_Adams bigfoot com>\r\n", 36) = 36
read(25, "250 Recipient OK\r\n", 1024)  = 18
write(25, "DATA\r\n", 6)                = 6
read(25, "354 Send message, end with <CRLF>.<CRLF>\r\n", 1024) = 42
write(25, "Sender: trever\r\n", 16)     = 16
write(25, "Message-ID: <3941249E 99E848DB bigfoot com>\r\nDate: Fri, 09 Jun 2000
13:08:46 -0400\r\nFrom: Trever Adams <trever_Adams bigfoot com>\r\nX-Mailer:
Mozilla 4.72 [en] (X11; U; Linux 2.4.0-test1 i686)\r\nX-Accept-Language:
en\r\nMIME-Version: 1.0\r\nTo: trever_Adams bigfoot com\r\nSubject:
duh\r\nContent-Type: text/plain; charset=us-ascii\r\nContent-Transfer-Encoding:
7bit\r\n\r\n\r\n-- \r\nFor the finest in family and value oriented products:
http://www.daysofyore.com\r\nFor owner friendly domain names:
http://domains.daysofyore.com";, 508) = 508write(25, "\r\n.\r\n",
5)               = 5
read(25, "250 OK\r\n", 1024)            = 8

/* Some code from a patch to qmail to show how the server asks: What it gets
back is apparently simply the password and username in BASE64 */

  if (arg && *arg) {
    /* here's the base64 encoded login */
    base64_dec_buffer(arg, smtpauthlogin, sizeof(smtpauthlogin));
  } else {
    out("334 VXNlcm5hbWU6\r\n"); /* b64 <- 'Username:' */
    flush();
    if (smtpauth_getl() > 0)
      base64_dec_buffer(smtpauth.s, smtpauthlogin, sizeof(smtpauthlogin));
    else
      die_read();
  }
  out("334 UGFzc3dvcmQ6\r\n"); /* b64 <- 'Password:' */
  flush();
  if (smtpauth_getl() > 0)
    base64_dec_buffer(smtpauth.s, smtpauthpass, sizeof(smtpauthpass));
  else
    die_read();
  if (pipe(fds)) {
    out("535 pipe failure\r\n");
    flush();
    _exit(0);
  }
  /* spawn external program

==============================================================================

Use the following patch for information on how to impliment TLS/SSL for mail in
the way that outlook express and netscape 4.5 do. 
http://www.esat.kuleuven.ac.be/~vermeule/qmail/tls.patch

Trever Adams
-- 
For the finest in family and value oriented products: http://www.daysofyore.com
For owner friendly domain names: http://domains.daysofyore.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]