;ELC   
;;; Compiled by amu@daemon on Thu Jan 11 15:04:12 2001
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.8.8/lisp/pop3.el
;;; in Emacs version 20.7.2
;;; with bytecomp version 2.56
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`pop3.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'mail-utils)
#@17 *POP3 maildrop.
(defvar pop3-maildrop (byte-code "\300 \206 \301\302!\206 \301\303!\207" [user-login-name getenv "LOGNAME" "USER"] 2) (#$ . -640))
#@17 *POP3 mailhost.
(defvar pop3-mailhost (getenv "MAILHOST") (#$ . -795))
#@13 *POP3 port.
(defvar pop3-port 110 (#$ . -872))
#@67 *Non-nil if a password is required when connecting to POP server.
(defvar pop3-password-required t (#$ . -925))
#@49 *Password to use when connecting to POP server.
(defvar pop3-password nil (#$ . -1043))
#@123 *POP3 authentication scheme.
Defaults to 'pass, for the standard USER/PASS authentication.  Other valid
values are 'apop.
(defvar pop3-authentication-scheme 'pass (#$ . -1138))
#@94 Timestamp returned when initially connected to the POP server.
Used for APOP authentication.
(defvar pop3-timestamp nil (#$ . 1321))
(byte-code "\303\300!\204 \304\300	B\303\302!\204 \304\302	B\304\207" [pop3-read-point current-load-list pop3-debug boundp nil] 2)
#@60 Transfer contents of a maildrop to the specified CRASHBOX.
(defalias 'pop3-movemail #[(&optional crashbox) "\204 \306\307!\310	\n\"\311\312!\313\314)**+\203% \315\316!!\210,\2038 *\2048 \317\320\321-\"!*.\322\232\203H \323-\"\210\202` .\324\232\203\\ \325-\"\210\326!\210\202` \327\330!\210\331!@)\332\216)X\203\304 \333\320\334)	$!\210\335\f#\210\212\fq\210\336/\337ed\340\341%\210)\316!q\210\342 \343V\203\250 eb\210\344y\210e`|\210\202\224 )\345\"\210T+\203\275 \346\313!\210\202h \346\347!\210\202h )\350\f!\210-\340\207" [crashbox pop3-mailhost pop3-port process crashbuf n expand-file-name "~/.crashbox" pop3-open-server get-buffer-create " *pop3-retr*" 1 nil switch-to-buffer process-buffer pop3-read-passwd format "Password for %s: " apop pop3-apop pass pop3-user pop3-pass error "Invalid POP3 authentication scheme" pop3-stat ((pop3-quit process)) message "Retrieving message %d of %d from %s..." pop3-retr binary write-region t nomesg buffer-size 5000 50 pop3-dele sit-for 0.1 kill-buffer message-count pop3-password pop3-debug pop3-password-required pop3-maildrop pop3-authentication-scheme coding-system-for-write] 6 (#$ . 1597)])
#@94 Open TCP connection to MAILHOST on PORT.
Returns the process associated with the connection.
(defalias 'pop3-open-server #[(mailhost port) "\306\211\307\212\310\311P!q\210\312 \210e\313\314p$\315\316\"\211\317\320\"\206* \321\317\322\"\2063 \323TO),\207" [process coding-system-for-write coding-system-for-read mailhost pop3-read-point port binary nil get-buffer-create " trace of POP session to " erase-buffer open-network-stream "POP" pop3-read-response t string-match "<" 0 ">" -1 response pop3-timestamp] 6 (#$ . 2784)])
(defalias 'pop3-process-filter #[(process output) "\212\302!q\210db\210	c)\207" [process output process-buffer] 2])
(defalias 'pop3-send-command #[(process command) "\303!q\210db\210`db\210\304\n\305P\"\207" [process pop3-read-point command process-buffer process-send-string "\n"] 4])
#@103 Read the response from the server.
Return the response string if optional second argument is non-nil.
(defalias 'pop3-read-response #[(process &optional return) "\305\211\212\306\n!q\210b\210\307\310\305\311#\204  \312\n\313\"\210b\210\202 `b\210\314\315!\2035 \316`\317Z{!\202N \314\320!\204A \305\202N \f\203M `{\202N \311+\207" [match-end case-fold-search process pop3-read-point return nil process-buffer search-forward "\n" t accept-process-output 3 looking-at "-ERR" error 2 "+OK"] 4 (#$ . 3625)])
(byte-code "\302\300!\204 \303\300	B\303\207" [pop3-read-passwd current-load-list boundp nil] 2)
(defalias 'pop3-read-passwd #[(prompt) "\204\" \302\303!\203 \303\202\" \304\305\306\"\203 \303\202\" \307\310\311\"\210\310	!\207" [pop3-read-passwd prompt fboundp read-passwd load "passwd" t autoload ange-ftp-read-passwd "ange-ftp"] 3])
(defalias 'pop3-clean-region #[(start end) "\302 \303\223\212	b\210`W\203! \304\305\306#\203! \307\310\306\211#\210\202\n 	b\210`W\203> \311\312\306#\203> \307\313\306\211#\210\303u\210\202$ )\303\211\223\207" [end start make-marker nil search-forward "\n" t replace-match "\n" re-search-forward "^\\." ""] 4])
#@58 Make a valid date header.
If NOW, use that time instead.
(defalias 'pop3-make-date #[(&optional now) "\304\305!\210\206\n \306 \307\310!8\311	\312W\203 \313	[\314\315\"\316\317\320\321\322\310!8\"@!\"\314\323\"\316\324\n	\325\245	\325\246\326\245$R+\207" [now zone sign parse-time-months require parse-time current-time 8 decode-time "+" 0 "-" format-time-string "%d" format " %s " capitalize rassoc 4 "%Y %H:%M:%S " "%s%02d%02d" 3600 60] 9 (#$ . 4814)])
#@68 Check to see if a message separator exists.  If not, generate one.
(defalias 'pop3-munge-message-separator #[(start end) "\212\214	}\210eb\210\306\307!\206 \306\310!\206 \306\311!?\205\242 \312\313\314!!\315\313\316!\206* \317 \320\"\321\322\323@\"\203M \324\325@\3268A@\3278\3308&\202[ \324\331A@@\3308\3268%\324\332\f#\322\333\n\"\203x \n\334\211\224O\n\334\225\321OP\202b eb\210\nc\210\335\336\321\337#\204\214 db\210\340c\210`d}\210deZeb\210~\210\341y\210\324\342\"c,*\207" [start end From_ date from size looking-at "From .?" "\n" "BABYL OPTIONS:" mail-strip-quoted-names mail-fetch-field "From" split-string "Date" pop3-make-date " " nil string-match "[A-Z]" format "%s %s %s %s %s" 2 4 3 "Sun %s %s %s %s" "\nFrom %s  %s\n" "," 0 search-forward "\n\n" t "\n" -1 "Content-Length: %s\n"] 8 (#$ . 5287)])
#@39 Send USER information to POP3 server.
(defalias 'pop3-user #[(process user) "\303\304\305	\"\"\210\306\307\"\211\205 \310\311\n\"?\205 \312\304\313	\"!)\207" [process user response pop3-send-command format "USER %s" pop3-read-response t string-match "+OK" error "USER %s not valid."] 6 (#$ . 6129)])
#@48 Send authentication information to the server.
(defalias 'pop3-pass #[(process) "\303\304\305	\"\"\210\306\307\"\211\205 \310\311\n\"?\205 \312!)\207" [process pop3-password response pop3-send-command format "PASS %s" pop3-read-response t string-match "+OK" pop3-quit] 6 (#$ . 6440)])
#@58 Send alternate authentication information to the server.
(defalias 'pop3-apop #[(process user) "\n\203 	\204 \306\307\310\"!	\205? \311\f	P!\312\307\313#\"\210\314\315\"\211\2056 \316\317\"?\205> \320!*)\207" [pop3-password pass pop3-password-required pop3-maildrop pop3-timestamp hash pop3-read-passwd format "Password for %s: " pop3-md5 pop3-send-command "APOP %s %s" pop3-read-response t string-match "+OK" pop3-quit process user response] 7 (#$ . 6737)])
(byte-code "\302\303!\203 \304\305\303\"\210\202$ \306\300!\204 \307\300	B\310\300\311\312#\210\305\313M\210\302\207" [pop3-md5-program current-load-list fboundp md5 defalias pop3-md5 boundp "md5" put variable-documentation "*Program to encode its input in MD5." #[(string) "\303\304\305!!\306\216rq\210	c\210\307ed\n\310p\311&\210\312\313{+\207" [#1=#:temp-buffer string pop3-md5-program get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) call-process-region t nil 1 33] 7]] 4)
#@72 Return the number of messages in the maildrop and the maildrop's size.
(defalias 'pop3-stat #[(process) "\302\303\"\210\304\305\"\306\307	\310\"A@!\306\311\307	\310\"8!)D\207" [process response pop3-send-command "STAT" pop3-read-response t string-to-int split-string " " 2] 6 (#$ . 7790)])
#@75 Scan listing of available messages.
This function currently does nothing.
(defalias 'pop3-list #[(process &optional msg) "\300\207" ["Scan listing of available messages.\nThis function currently does nothing."] 1 (#$ . 8089)])
#@45 Retrieve message-id MSG to buffer CRASHBUF.
(defalias 'pop3-retr #[(process msg crashbuf) "\306\307\310	\"\"\210\311!\210\n\312\212\313!q\210\314\315\312\316#\204` \317\320\"\210\321 \322V\203. \323\324!\210\321 \325V\2039 \323\324!\210\321 \326V\203D \323\324!\210\321 \327V\203O \323\324!\210\321 \330V\203Z \323\324!\210\fb\210\202 \331 \332\224b\210\331 \333\f\"\210\334\f\"\210\212q\210\335 \210)\336\f#\210\f|+\207" [process msg pop3-read-point end start crashbuf pop3-send-command format "RETR %s" pop3-read-response nil process-buffer re-search-forward "^\\.\n" t accept-process-output 3 buffer-size 20000 sleep-for 1 50000 100000 200000 500000 point-marker 0 pop3-clean-region pop3-munge-message-separator erase-buffer copy-to-buffer] 5 (#$ . 8322)])
#@33 Mark message-id MSG as deleted.
(defalias 'pop3-dele #[(process msg) "\302\303\304	\"\"\210\305!\207" [process msg pop3-send-command format "DELE %s" pop3-read-response] 5 (#$ . 9104)])
#@15 No-operation.
(defalias 'pop3-noop #[(process msg) "\301\302\"\210\303!\207" [process pop3-send-command "NOOP" pop3-read-response] 3 (#$ . 9298)])
#@60 Return highest accessed message-id number for the session.
(defalias 'pop3-last #[(process) "\302\303\"\210\304\305\"\306\307	\310\"A@!)\207" [process response pop3-send-command "LAST" pop3-read-response t string-to-int split-string " "] 4 (#$ . 9453)])
#@48 Remove all delete marks from current maildrop.
(defalias 'pop3-rset #[(process) "\301\302\"\210\303!\207" [process pop3-send-command "RSET" pop3-read-response] 3 (#$ . 9716)])
#@135 Close connection to POP3 server.
Tell server to remove all messages marked as deleted, unlock the maildrop,
and close the connection.
(defalias 'pop3-quit #[(process) "\301\302\"\210\303\304\"\210\205 \212\305!q\210db\210\306!)\207" [process pop3-send-command "QUIT" pop3-read-response t process-buffer delete-process] 3 (#$ . 9901)])
(provide 'pop3)
