1 ;;; pop3.el --- Post Office Protocol (RFC 1460) interface
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 ;; 2004, 2005 Free Software Foundation, Inc.
6 ;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; Most of the standard Post Office Protocol version 3 (RFC 1460) commands
30 ;; are implemented. The LIST command has not been implemented due to lack
31 ;; of actual usefulness.
32 ;; The optional POP3 command TOP has not been implemented.
34 ;; This program was inspired by Kyle E. Jones's vm-pop program.
41 "Post Office Protocol."
45 (defcustom pop3-maildrop (or (user-login-name)
49 :version "22.1" ;; Oort Gnus
53 (defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch
56 :version "22.1" ;; Oort Gnus
60 (defcustom pop3-port 110
62 :version "22.1" ;; Oort Gnus
66 (defcustom pop3-password-required t
67 "*Non-nil if a password is required when connecting to POP server."
68 :version "22.1" ;; Oort Gnus
72 ;; Should this be customizable?
73 (defvar pop3-password nil
74 "*Password to use when connecting to POP server.")
76 (defcustom pop3-authentication-scheme 'pass
77 "*POP3 authentication scheme.
78 Defaults to `pass', for the standard USER/PASS authentication. The other
79 valid value is 'apop'."
80 :type '(choice (const :tag "Normal user/password" pass)
81 (const :tag "APOP" apop))
82 :version "22.1" ;; Oort Gnus
85 (defcustom pop3-leave-mail-on-server nil
86 "*Non-nil if the mail is to be left on the POP server after fetching.
88 If `pop3-leave-mail-on-server' is non-nil the mail is to be left
89 on the POP server after fetching. Note that POP servers maintain
90 no state information between sessions, so what the client
91 believes is there and what is actually there may not match up.
92 If they do not, then the whole thing can fall apart and leave you
93 with a corrupt mailbox."
94 :version "22.1" ;; Oort Gnus
98 (defvar pop3-timestamp nil
99 "Timestamp returned when initially connected to the POP server.
100 Used for APOP authentication.")
102 (defvar pop3-read-point nil)
103 (defvar pop3-debug nil)
105 ;; Borrowed from nnheader-accept-process-output in nnheader.el.