You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// If an argument was given and the POP3 server issues a positive response with a line containing information for that message. This line is called a "scan listing" for that message.
436
+
///
437
+
/// If no argument was given and the POP3 server issues a positive response, then the response given is multi-line. After the initial +OK, for each message in the maildrop, the POP3 server responds with a line containing information for that message. This line is also called a "scan listing" for that message. If there are no messages in the maildrop, then the POP3 server responds with no scan listings--it issues a positive response followed by a line containing a termination octet and a CRLF pair.
438
+
///
439
+
/// ### Arguments:
440
+
/// - a message-number (optional), which, if present, may NOT refer to a message marked as deleted
/// The POP3 server issues a positive response with a line containing information for the maildrop. This line is called a "drop listing" for that maildrop.
/// Normally, each POP3 session starts with a USER/PASS exchange. This results in a server/user-id specific password being sent in the clear on the network. For intermittent use of POP3, this may not introduce a sizable risk. However, many POP3 client implementations connect to the POP3 server on a regular basis -- to check for new mail. Further the interval of session initiation may be on the order of five minutes. Hence, the risk of password capture is greatly enhanced.
487
+
///
488
+
/// An alternate method of authentication is required which provides for both origin authentication and replay protection, but which does not involve sending a password in the clear over the network. The APOP command provides this functionality.
489
+
///
490
+
/// A POP3 server which implements the APOP command will include a timestamp in its banner greeting. The syntax of the timestamp corresponds to the `msg-id' in [RFC822], and MUST be different each time the POP3 server issues a banner greeting. For example, on a UNIX implementation in which a separate UNIX process is used for each instance of a POP3 server, the syntax of the timestamp might be:
491
+
///
492
+
/// `<process-ID.clock@hostname>`
493
+
///
494
+
/// where `process-ID' is the decimal value of the process's PID, clock is the decimal value of the system clock, and hostname is the fully-qualified domain-name corresponding to the host where the POP3 server is running.
495
+
///
496
+
/// The POP3 client makes note of this timestamp, and then issues the APOP command. The `name` parameter has identical semantics to the `name` parameter of the USER command. The `digest` parameter is calculated by applying the MD5 algorithm [RFC1321] to a string consisting of the timestamp (including angle-brackets) followed by a shared
497
+
///
498
+
/// ### Arguments:
499
+
/// a string identifying a mailbox and a MD5 digest string (both required)
500
+
///
501
+
/// ### Restrictions:
502
+
/// may only be given in the AUTHORIZATION state after the POP3 greeting or after an unsuccessful USER or PASS command
// let response = self.send_request(request).await?;
503
546
504
-
self.state = ClientState::Transaction;
547
+
// self.state = ClientState::Transaction;
505
548
506
-
match response {
507
-
Response::Message(resp) => Ok(resp),
508
-
_ => err!(
509
-
ErrorKind::UnexpectedResponse,
510
-
"Did not received the expected auth response"
511
-
),
512
-
}
513
-
}
549
+
// match response {
550
+
// Response::Message(resp) => Ok(resp),
551
+
// _ => err!(
552
+
// ErrorKind::UnexpectedResponse,
553
+
// "Did not received the expected auth response"
554
+
// ),
555
+
// }
556
+
// }
514
557
558
+
/// ## USER & PASS
559
+
///
560
+
/// To authenticate using the USER and PASS command combination, the client must first issue the USER command. If the POP3 server responds with a positive status indicator ("+OK"), then the client may issue either the PASS command to complete the authentication, or the QUIT command to terminate the POP3 session. If the POP3 server responds with a negative status indicator ("-ERR") to the USER command, then the client may either issue a new authentication command or may issue the QUIT command.
561
+
///
562
+
/// The server may return a positive response even though no such mailbox exists. The server may return a negative response if mailbox exists, but does not permit plaintext password authentication.
563
+
///
564
+
/// When the client issues the PASS command, the POP3 server uses the argument pair from the USER and PASS commands to determine if the client should be given access to the appropriate maildrop.
565
+
///
566
+
/// Since the PASS command has exactly one argument, a POP3 server may treat spaces in the argument as part of the password, instead of as argument separators.
567
+
///
568
+
/// ### Arguments:
569
+
/// - a string identifying a mailbox (required), which is of significance ONLY to the server
570
+
/// - a server/mailbox-specific password (required)
571
+
///
572
+
/// ### Restrictions:
573
+
/// may only be given in the AUTHORIZATION state after the POP3 greeting or after an unsuccessful USER or PASS command
0 commit comments