comparison lisp/mail/rmail.el @ 59996:aac0a33f5772

Change release version from 21.4 to 22.1 throughout. Change development version from 21.3.50 to 22.0.50.
author Kim F. Storm <storm@cua.dk>
date Wed, 09 Feb 2005 15:50:47 +0000
parents 1e7f10c55429
children e2880855e3d0 3ebd9bdb4fe5
comparison
equal deleted inserted replaced
59995:8f4938738427 59996:aac0a33f5772
115 "*Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password." 115 "*Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password."
116 :type '(choice (string :tag "Password") 116 :type '(choice (string :tag "Password")
117 (const :tag "Not Required" nil)) 117 (const :tag "Not Required" nil))
118 :set-after '(rmail-pop-password) 118 :set-after '(rmail-pop-password)
119 :set #'(lambda (symbol value) 119 :set #'(lambda (symbol value)
120 (set-default symbol 120 (set-default symbol
121 (if (and (not value) 121 (if (and (not value)
122 (boundp 'rmail-pop-password) 122 (boundp 'rmail-pop-password)
123 rmail-pop-password) 123 rmail-pop-password)
124 rmail-pop-password 124 rmail-pop-password
125 value)) 125 value))
126 (setq rmail-pop-password nil)) 126 (setq rmail-pop-password nil))
127 :group 'rmail-retrieve 127 :group 'rmail-retrieve
128 :version "21.3.50.1") 128 :version "22.1")
129 129
130 (defcustom rmail-remote-password-required nil 130 (defcustom rmail-remote-password-required nil
131 "*Non-nil if a password is required when reading mail from a remote server." 131 "*Non-nil if a password is required when reading mail from a remote server."
132 :type 'boolean 132 :type 'boolean
133 :set-after '(rmail-pop-password-required) 133 :set-after '(rmail-pop-password-required)
134 :set #'(lambda (symbol value) 134 :set #'(lambda (symbol value)
135 (set-default symbol 135 (set-default symbol
136 (if (and (not value) 136 (if (and (not value)
137 (boundp 'rmail-pop-password-required) 137 (boundp 'rmail-pop-password-required)
138 rmail-pop-password-required) 138 rmail-pop-password-required)
139 rmail-pop-password-required 139 rmail-pop-password-required
140 value)) 140 value))
141 (setq rmail-pop-password-required nil)) 141 (setq rmail-pop-password-required nil))
142 :group 'rmail-retrieve 142 :group 'rmail-retrieve
143 :version "21.3.50.1") 143 :version "22.1")
144 144
145 (defcustom rmail-movemail-flags nil 145 (defcustom rmail-movemail-flags nil
146 "*List of flags to pass to movemail. 146 "*List of flags to pass to movemail.
147 Most commonly used to specify `-g' to enable GSS-API authentication 147 Most commonly used to specify `-g' to enable GSS-API authentication
148 or `-k' to enable Kerberos authentication." 148 or `-k' to enable Kerberos authentication."
1619 a remote mailbox, PASSWORD is the password if it should be 1619 a remote mailbox, PASSWORD is the password if it should be
1620 supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD 1620 supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD
1621 is non-nil if the user has supplied the password interactively. 1621 is non-nil if the user has supplied the password interactively.
1622 " 1622 "
1623 (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file) 1623 (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
1624 (let (got-password supplied-password 1624 (let (got-password supplied-password
1625 (proto (match-string 1 file)) 1625 (proto (match-string 1 file))
1626 (user (match-string 3 file)) 1626 (user (match-string 3 file))
1627 (pass (match-string 5 file)) 1627 (pass (match-string 5 file))
1628 (host (substring file (or (match-end 2) 1628 (host (substring file (or (match-end 2)
1629 (+ 3 (match-end 1)))))) 1629 (+ 3 (match-end 1))))))
1630 (if (not pass) 1630 (if (not pass)
1631 (when rmail-remote-password-required 1631 (when rmail-remote-password-required
1632 (setq got-password (not (rmail-have-password))) 1632 (setq got-password (not (rmail-have-password)))
1633 (setq supplied-password (rmail-get-remote-password 1633 (setq supplied-password (rmail-get-remote-password
1634 (string-equal proto "imap"))))) 1634 (string-equal proto "imap")))))
1635 1635
1636 (if (rmail-movemail-variant-p 'emacs) 1636 (if (rmail-movemail-variant-p 'emacs)
1637 (if (string-equal proto "pop") 1637 (if (string-equal proto "pop")
1638 (list (concat "po:" user ":" host) 1638 (list (concat "po:" user ":" host)
1639 t 1639 t
1640 (or pass supplied-password) 1640 (or pass supplied-password)
1669 (substitute-in-file-name (expand-file-name file))))) 1669 (substitute-in-file-name (expand-file-name file)))))
1670 (setq tofile (expand-file-name 1670 (setq tofile (expand-file-name
1671 ;; Generate name to move to from inbox name, 1671 ;; Generate name to move to from inbox name,
1672 ;; in case of multiple inboxes that need moving. 1672 ;; in case of multiple inboxes that need moving.
1673 (concat ".newmail-" 1673 (concat ".newmail-"
1674 (file-name-nondirectory 1674 (file-name-nondirectory
1675 (if (memq system-type '(windows-nt cygwin)) 1675 (if (memq system-type '(windows-nt cygwin))
1676 ;; cannot have "po:" in file name 1676 ;; cannot have "po:" in file name
1677 (substring file 3) 1677 (substring file 3)
1678 file))) 1678 file)))
1679 ;; Use the directory of this rmail file 1679 ;; Use the directory of this rmail file
1775 ;; abbreviation 1775 ;; abbreviation
1776 (when (rmail-movemail-variant-p 'mailutils) 1776 (when (rmail-movemail-variant-p 'mailutils)
1777 (goto-char (point-min)) 1777 (goto-char (point-min))
1778 (when (looking-at "[A-Z][A-Z0-9_]*:") 1778 (when (looking-at "[A-Z][A-Z0-9_]*:")
1779 (delete-region (point-min) (match-end 0)))) 1779 (delete-region (point-min) (match-end 0))))
1780 1780
1781 (message "movemail: %s" 1781 (message "movemail: %s"
1782 (buffer-substring (point-min) 1782 (buffer-substring (point-min)
1783 (point-max))) 1783 (point-max)))
1784 1784
1785 (sit-for 3) 1785 (sit-for 3)
1786 nil))))) 1786 nil)))))
1787 1787
1788 ;; At this point, TOFILE contains the name to read: 1788 ;; At this point, TOFILE contains the name to read:
1789 ;; Either the alternate name (if we renamed) 1789 ;; Either the alternate name (if we renamed)
1790 ;; or the actual inbox (if not renaming). 1790 ;; or the actual inbox (if not renaming).
1791 (if (file-exists-p tofile) 1791 (if (file-exists-p tofile)
1792 (let ((coding-system-for-read 'no-conversion) 1792 (let ((coding-system-for-read 'no-conversion)