Mercurial > emacs
comparison lisp/mail/mbox-changes/rmail.el.changes @ 97530:920b055d2ec5
Notes on changes made to merge from the Rmail/mbox branch into the trunk.
author | Paul Reilly <pmr@pajato.com> |
---|---|
date | Mon, 18 Aug 2008 05:18:52 +0000 |
parents | |
children | 7704da81c9da |
comparison
equal
deleted
inserted
replaced
97529:1b1837ac37e2 | 97530:920b055d2ec5 |
---|---|
1 RCS file: /cvsroot/emacs/emacs/lisp/mail/rmail.el,v | |
2 Working file: rmail.el | |
3 head: 1.454 | |
4 branch: | |
5 locks: strict | |
6 access list: | |
7 symbolic names: | |
8 remove-vms: 1.454 | |
9 before-remove-vms: 1.454 | |
10 remove-carbon: 1.454 | |
11 before-remove-carbon: 1.454 | |
12 before-merge-emacs-app-to-trunk: 1.454 | |
13 font-backend: 1.453.0.2 | |
14 font-backend-base: 1.453 | |
15 EMACS_22_2: 1.433.2.10 | |
16 EMACS_PRETEST_22_1_92: 1.433.2.10 | |
17 lisp-bob: 1.452 | |
18 EMACS_PRETEST_22_1_91: 1.433.2.9 | |
19 merge-unicode-to-trunk: 1.447 | |
20 before-merge-unicode-to-trunk: 1.446 | |
21 EMACS_PRETEST_22_1_90: 1.433.2.8 | |
22 lexbind-base: 1.454 | |
23 merge-multi-tty-to-trunk: 1.439 | |
24 before-merge-multi-tty-to-trunk: 1.439 | |
25 EMACS_22_1: 1.433.2.1 | |
26 EMACS_PRETEST_22_0_990: 1.433.2.1 | |
27 multi-tty: 1.433.0.4 | |
28 multi-tty-base: 1.439 | |
29 EMACS_22_BRANCHPOINT: 1.433.2.1 | |
30 EMACS_PRETEST_22_0_99: 1.433 | |
31 EMACS_22_BASE: 1.433.0.2 | |
32 EMACS_PRETEST_22_0_98: 1.433 | |
33 EMACS_PRETEST_22_0_97: 1.433 | |
34 EMACS_PRETEST_22_0_96: 1.432 | |
35 EMACS_PRETEST_22_0_95: 1.432 | |
36 EMACS_PRETEST_22_0_94: 1.431 | |
37 EMACS_PRETEST_22_0_93: 1.431 | |
38 EMACS_PRETEST_22_0_92: 1.430 | |
39 EMACS_PRETEST_22_0_91: 1.430 | |
40 EMACS_PRETEST_22_0_90: 1.429 | |
41 unicode-post-font-backend: 1.371.4.29 | |
42 unicode-pre-font-backend: 1.371.4.29 | |
43 unicode-xft: 1.371.4.27.0.2 | |
44 unicode-xft-base: 1.371.4.38 | |
45 ttn-vms-21-2-B4: 1.349.4.3 | |
46 ttn-vms-21-2-B3: 1.349.4.3 | |
47 ttn-vms-21-2-B2: 1.349.4.3 | |
48 XFT_JHD_BRANCH_base: 1.397 | |
49 XFT_JHD_BRANCH: 1.397.0.2 | |
50 EMACS_19_34: 1.194 | |
51 after-merge-gnus-5_10: 1.392 | |
52 before-merge-gnus-5_10: 1.392 | |
53 gnus-5_10-post-merge-josefsson: 1.391 | |
54 gnus-5_10-pre-merge-josefsson: 1.391 | |
55 gnus-5_10-post-merge-yamaoka: 1.391 | |
56 gnus-5_10-pre-merge-yamaoka: 1.391 | |
57 gnus-5_10-branch: 1.391.0.2 | |
58 gnus-5_10-branchpoint: 1.392 | |
59 emacs-unicode-2-pre-sync: 1.371.4.3 | |
60 ttn-vms-21-3-stash: 1.349.4.5.0.2 | |
61 ttn-vms-21-2-stash: 1.349.4.3.0.2 | |
62 EMACS_21_2: 1.349.4.3 | |
63 handa-temp-tag: 1.387 | |
64 emacs-bidi: 1.371.0.6 | |
65 emacs-bidi-base: 1.371 | |
66 emacs-unicode-2: 1.371.0.4 | |
67 emacs-unicode-2-base: 1.446 | |
68 Boehm-GC: 1.371.0.2 | |
69 Boehm-GC-base: 1.371 | |
70 EMACS_21_3: 1.349.4.5 | |
71 rmail-mbox-branch: 1.368.0.2 | |
72 RMAIL-MBOX-BASE: 1.368 | |
73 EMACS_PRETEST_21_2_95: 1.349.4.5 | |
74 EMACS_PRETEST_21_2_94: 1.349.4.5 | |
75 EMACS_PRETEST_21_2_93: 1.349.4.5 | |
76 EMACS_PRETEST_21_2_92: 1.349.4.5 | |
77 EMACS_PRETEST_21_2_91: 1.349.4.5 | |
78 lexbind: 1.360.0.2 | |
79 emacs-unicode: 1.355.0.2 | |
80 emacs-unicode-base: 1.355 | |
81 fx-branch-base: 1.328 | |
82 EMACS_21_1: 1.349 | |
83 EMACS_21_1_RC: 1.349.0.4 | |
84 EMACS_21_1_BASE: 1.349 | |
85 patches_21_0: 1.349.0.2 | |
86 patches_21_0_base: 1.349 | |
87 EMACS_PRETEST_21_0_106: 1.349 | |
88 EMACS_PRETEST_21_0_105: 1.348 | |
89 EMACS_PRETEST_21_0_104: 1.347 | |
90 EMACS_20_2: 1.236 | |
91 gerd_big: 1.341.0.8 | |
92 gerd_int: 1.341.0.6 | |
93 gerd_dbe: 1.341.0.4 | |
94 gerd_defvaralias: 1.341.0.2 | |
95 EMACS_20_4: 1.305 | |
96 EMACS_PRETEST_21_0_103: 1.339 | |
97 EMACS_PRETEST_21_0_102: 1.333 | |
98 EMACS_PRETEST_21_0_101: 1.333 | |
99 EMACS_PRETEST_21_0_100: 1.332 | |
100 EMACS_PRETEST_21_0_99: 1.329 | |
101 EMACS_PRETEST_21_0_98: 1.329 | |
102 fx-branch: 1.328.0.2 | |
103 EMACS_PRETEST_21_0_97: 1.328 | |
104 EMACS_PRETEST_21_0_96: 1.327 | |
105 EMACS_PRETEST_21_0_95: 1.325 | |
106 EMACS_PRETEST_21_0_93: 1.325 | |
107 EMACS_PRETEST_21_0_92: 1.323 | |
108 EMACS_PRETEST_21_0_91: 1.321 | |
109 EMACS_PRETEST_21_0_90: 1.321 | |
110 keyword substitution: kv | |
111 total revisions: 661; selected revisions: 661 | |
112 description: | |
113 ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs. | |
114 ---------------------------- | |
115 revision 1.454 (patched) | |
116 date: 2008-05-06 07:22:26 +0000; author: gm; state: Exp; lines: +4 -6; commitid: nPdVwGEZ0V6bhS1t; | |
117 Switch to recommended form of GPLv3 permissions notice. | |
118 ---------------------------- | |
119 revision 1.453 (applied) | |
120 date: 2008-04-10 14:10:19 +0000; author: monnier; state: Exp; lines: +1 -1; commitid: vwbWV2GwRKWGmzYs; | |
121 Fix up comment convention on the arch-tag lines. | |
122 ---------------------------- | |
123 revision 1.452 (applied) | |
124 date: 2008-02-20 05:59:41 +0000; author: gm; state: Exp; lines: +9 -1; commitid: afzSfvXamNShg6Ss; | |
125 (rmail-autodetect): Add .exe extension to movemail on Windows. | |
126 ---------------------------- | |
127 revision 1.451 (patched) | |
128 date: 2008-02-13 20:58:26 +0000; author: bastien1; state: Exp; lines: +13 -15; commitid: lqRKtg2wkubzshRs; | |
129 ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail | |
130 | |
131 ;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, | |
132 ;; 2006, 2007, 2008 Free Software Foundation, Inc. | |
133 | |
134 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> | |
135 ;; Maintainer: Simon Josefsson <simon@josefsson.org> | |
136 ;; w32 Maintainer: Brian D. Carlstrom <bdc@ai.mit.edu> | |
137 ;; ESMTP support: Simon Leinen <simon@switch.ch> | |
138 ;; Hacked by Mike Taylor, 11th October 1999 to add support for | |
139 ;; automatically appending a domain to RCPT TO: addresses. | |
140 ;; AUTH=LOGIN support: Stephen Cranefield <scranefield@infoscience.otago.ac.nz> | |
141 ;; Keywords: mail | |
142 | |
143 ;; This file is part of GNU Emacs. | |
144 | |
145 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
146 ;; it under the terms of the GNU General Public License as published by | |
147 ;; the Free Software Foundation; either version 3, or (at your option) | |
148 ;; any later version. | |
149 | |
150 ;; GNU Emacs is distributed in the hope that it will be useful, | |
151 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
152 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
153 ;; GNU General Public License for more details. | |
154 | |
155 ;; You should have received a copy of the GNU General Public License | |
156 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
157 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
158 ;; Boston, MA 02110-1301, USA. | |
159 | |
160 ;;; Commentary: | |
161 | |
162 ;; Send Mail to smtp host from smtpmail temp buffer. | |
163 | |
164 ;; Please add these lines in your .emacs(_emacs) or use customize. | |
165 ;; | |
166 ;;(setq send-mail-function 'smtpmail-send-it) ; if you use `mail' | |
167 ;;(setq message-send-mail-function 'smtpmail-send-it) ; if you use message/Gnus | |
168 ;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST") | |
169 ;;(setq smtpmail-local-domain "YOUR DOMAIN NAME") | |
170 ;;(setq smtpmail-sendto-domain "YOUR DOMAIN NAME") | |
171 ;;(setq smtpmail-debug-info t) ; only to debug problems | |
172 ;;(setq smtpmail-auth-credentials ; or use ~/.authinfo | |
173 ;; '(("YOUR SMTP HOST" 25 "username" "password"))) | |
174 ;;(setq smtpmail-starttls-credentials | |
175 ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) | |
176 ;; Where the 25 equals the value of `smtpmail-smtp-service', it can be an | |
177 ;; integer or a string, just as long as they match (eq). | |
178 | |
179 ;; To queue mail, set smtpmail-queue-mail to t and use | |
180 ;; smtpmail-send-queued-mail to send. | |
181 | |
182 ;; Modified by Stephen Cranefield <scranefield@infoscience.otago.ac.nz>, | |
183 ;; 22/6/99, to support SMTP Authentication by the AUTH=LOGIN mechanism. | |
184 ;; See http://help.netscape.com/products/server/messaging/3x/info/smtpauth.html | |
185 ;; Rewritten by Simon Josefsson to use same credential variable as AUTH | |
186 ;; support below. | |
187 | |
188 ;; Modified by Simon Josefsson <jas@pdc.kth.se>, 22/2/99, to support SMTP | |
189 ;; Authentication by the AUTH mechanism. | |
190 ;; See http://www.ietf.org/rfc/rfc2554.txt | |
191 | |
192 ;; Modified by Simon Josefsson <simon@josefsson.org>, 2000-10-07, to support | |
193 ;; STARTTLS. Requires external program | |
194 ;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz. | |
195 ;; See http://www.ietf.org/rfc/rfc2246.txt, http://www.ietf.org/rfc/rfc2487.txt | |
196 | |
197 ;;; Code: | |
198 | |
199 (require 'sendmail) | |
200 (autoload 'starttls-open-stream "starttls") | |
201 (autoload 'starttls-negotiate "starttls") | |
202 (autoload 'mail-strip-quoted-names "mail-utils") | |
203 (autoload 'message-make-date "message") | |
204 (autoload 'message-make-message-id "message") | |
205 (autoload 'rfc2104-hash "rfc2104") | |
206 (autoload 'netrc-parse "netrc") | |
207 (autoload 'netrc-machine "netrc") | |
208 (autoload 'netrc-get "netrc") | |
209 | |
210 ;;; | |
211 (defgroup smtpmail nil | |
212 "SMTP protocol for sending mail." | |
213 :group 'mail) | |
214 | |
215 | |
216 (defcustom smtpmail-default-smtp-server nil | |
217 "*Specify default SMTP server. | |
218 This only has effect if you specify it before loading the smtpmail library." | |
219 :type '(choice (const nil) string) | |
220 :group 'smtpmail) | |
221 | |
222 (defcustom smtpmail-smtp-server | |
223 (or (getenv "SMTPSERVER") smtpmail-default-smtp-server) | |
224 "*The name of the host running SMTP server." | |
225 :type '(choice (const nil) string) | |
226 :group 'smtpmail) | |
227 | |
228 (defcustom smtpmail-smtp-service 25 | |
229 "*SMTP service port number. | |
230 The default value would be \"smtp\" or 25." | |
231 :type '(choice (integer :tag "Port") (string :tag "Service")) | |
232 :group 'smtpmail) | |
233 | |
234 (defcustom smtpmail-local-domain nil | |
235 "*Local domain name without a host name. | |
236 If the function `system-name' returns the full internet address, | |
237 don't define this value." | |
238 :type '(choice (const nil) string) | |
239 :group 'smtpmail) | |
240 | |
241 (defcustom smtpmail-sendto-domain nil | |
242 "*Local domain name without a host name. | |
243 This is appended (with an @-sign) to any specified recipients which do | |
244 not include an @-sign, so that each RCPT TO address is fully qualified. | |
245 \(Some configurations of sendmail require this.) | |
246 | |
247 Don't bother to set this unless you have get an error like: | |
248 Sending failed; SMTP protocol error | |
249 when sending mail, and the *trace of SMTP session to <somewhere>* | |
250 buffer includes an exchange like: | |
251 RCPT TO: <someone> | |
252 501 <someone>: recipient address must contain a domain | |
253 " | |
254 :type '(choice (const nil) string) | |
255 :group 'smtpmail) | |
256 | |
257 (defcustom smtpmail-debug-info nil | |
258 "Whether to print info in buffer *trace of SMTP session to <somewhere>*. | |
259 See also `smtpmail-debug-verb' which determines if the SMTP protocol should | |
260 be verbose as well." | |
261 :type 'boolean | |
262 :group 'smtpmail) | |
263 | |
264 (defcustom smtpmail-debug-verb nil | |
265 "Whether this library sends the SMTP VERB command or not. | |
266 The commands enables verbose information from the SMTP server." | |
267 :type 'boolean | |
268 :group 'smtpmail) | |
269 | |
270 (defcustom smtpmail-code-conv-from nil ;; *junet* | |
271 "*smtpmail code convert from this code to *internal*..for tiny-mime.." | |
272 :type 'boolean | |
273 :group 'smtpmail) | |
274 | |
275 (defcustom smtpmail-queue-mail nil | |
276 "*If set, mail is queued; otherwise it is sent immediately. | |
277 If queued, it is stored in the directory `smtpmail-queue-dir' | |
278 and sent with `smtpmail-send-queued-mail'." | |
279 :type 'boolean | |
280 :group 'smtpmail) | |
281 | |
282 (defcustom smtpmail-queue-dir "~/Mail/queued-mail/" | |
283 "*Directory where `smtpmail.el' stores queued mail." | |
284 :type 'directory | |
285 :group 'smtpmail) | |
286 | |
287 (defcustom smtpmail-auth-credentials "~/.authinfo" | |
288 "Specify username and password for servers, directly or via .netrc file. | |
289 This variable can either be a filename pointing to a file in netrc(5) | |
290 format, or list of four-element lists that contain, in order, | |
291 `servername' (a string), `port' (an integer), `user' (a string) and | |
292 `password' (a string, or nil to query the user when needed). If you | |
293 need to enter a `realm' too, add it to the user string, so that it | |
294 looks like `user@realm'." | |
295 :type '(choice file | |
296 (repeat (list (string :tag "Server") | |
297 (integer :tag "Port") | |
298 (string :tag "Username") | |
299 (choice (const :tag "Query when needed" nil) | |
300 (string :tag "Password"))))) | |
301 :version "22.1" | |
302 :group 'smtpmail) | |
303 | |
304 (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) | |
305 "Specify STARTTLS keys and certificates for servers. | |
306 This is a list of four-element list with `servername' (a string), | |
307 `port' (an integer), `key' (a filename) and `certificate' (a | |
308 filename). | |
309 If you do not have a certificate/key pair, leave the `key' and | |
310 `certificate' fields as `nil'. A key/certificate pair is only | |
311 needed if you want to use X.509 client authenticated | |
312 connections." | |
313 :type '(repeat (list (string :tag "Server") | |
314 (integer :tag "Port") | |
315 (file :tag "Key") | |
316 (file :tag "Certificate"))) | |
317 :version "21.1" | |
318 :group 'smtpmail) | |
319 | |
320 (defcustom smtpmail-warn-about-unknown-extensions nil | |
321 "*If set, print warnings about unknown SMTP extensions. | |
322 This is mainly useful for development purposes, to learn about | |
323 new SMTP extensions that might be useful to support." | |
324 :type 'boolean | |
325 :version "21.1" | |
326 :group 'smtpmail) | |
327 | |
328 (defvar smtpmail-queue-index-file "index" | |
329 "File name of queued mail index. | |
330 This is relative to `smtpmail-queue-dir'.") | |
331 | |
332 (defvar smtpmail-address-buffer) | |
333 (defvar smtpmail-recipient-address-list) | |
334 | |
335 (defvar smtpmail-queue-counter 0) | |
336 | |
337 ;; Buffer-local variable. | |
338 (defvar smtpmail-read-point) | |
339 | |
340 (defvar smtpmail-queue-index (concat smtpmail-queue-dir | |
341 smtpmail-queue-index-file)) | |
342 | |
343 (defconst smtpmail-auth-supported '(cram-md5 plain login) | |
344 "List of supported SMTP AUTH mechanisms.") | |
345 | |
346 ;;; | |
347 ;;; | |
348 ;;; | |
349 | |
350 (defvar smtpmail-mail-address nil | |
351 "Value to use for envelope-from address for mail from ambient buffer.") | |
352 | |
353 ;;;###autoload | |
354 (defun smtpmail-send-it () | |
355 (let ((errbuf (if mail-interactive | |
356 (generate-new-buffer " smtpmail errors") | |
357 0)) | |
358 (tembuf (generate-new-buffer " smtpmail temp")) | |
359 (case-fold-search nil) | |
360 delimline | |
361 (mailbuf (current-buffer)) | |
362 ;; Examine this variable now, so that | |
363 ;; local binding in the mail buffer will take effect. | |
364 (smtpmail-mail-address | |
365 (or (and mail-specify-envelope-from (mail-envelope-from)) | |
366 user-mail-address)) | |
367 (smtpmail-code-conv-from | |
368 (if enable-multibyte-characters | |
369 (let ((sendmail-coding-system smtpmail-code-conv-from)) | |
370 (select-message-coding-system))))) | |
371 (unwind-protect | |
372 (save-excursion | |
373 (set-buffer tembuf) | |
374 (erase-buffer) | |
375 ;; Use the same buffer-file-coding-system as in the mail | |
376 ;; buffer, otherwise any write-region invocations (e.g., in | |
377 ;; mail-do-fcc below) will annoy with asking for a suitable | |
378 ;; encoding. | |
379 (set-buffer-file-coding-system smtpmail-code-conv-from nil t) | |
380 (insert-buffer-substring mailbuf) | |
381 (goto-char (point-max)) | |
382 ;; require one newline at the end. | |
383 (or (= (preceding-char) ?\n) | |
384 (insert ?\n)) | |
385 ;; Change header-delimiter to be what sendmail expects. | |
386 (mail-sendmail-undelimit-header) | |
387 (setq delimline (point-marker)) | |
388 ;; (sendmail-synch-aliases) | |
389 (if mail-aliases | |
390 (expand-mail-aliases (point-min) delimline)) | |
391 (goto-char (point-min)) | |
392 ;; ignore any blank lines in the header | |
393 (while (and (re-search-forward "\n\n\n*" delimline t) | |
394 (< (point) delimline)) | |
395 (replace-match "\n")) | |
396 (let ((case-fold-search t)) | |
397 ;; We used to process Resent-... headers here, | |
398 ;; but it was not done properly, and the job | |
399 ;; is done correctly in smtpmail-deduce-address-list. | |
400 ;; Don't send out a blank subject line | |
401 (goto-char (point-min)) | |
402 (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t) | |
403 (replace-match "") | |
404 ;; This one matches a Subject just before the header delimiter. | |
405 (if (and (re-search-forward "^Subject:\\([ \t]*\n\\)+" delimline t) | |
406 (= (match-end 0) delimline)) | |
407 (replace-match ""))) | |
408 ;; Put the "From:" field in unless for some odd reason | |
409 ;; they put one in themselves. | |
410 (goto-char (point-min)) | |
411 (if (not (re-search-forward "^From:" delimline t)) | |
412 (let* ((login smtpmail-mail-address) | |
413 (fullname (user-full-name))) | |
414 (cond ((eq mail-from-style 'angles) | |
415 (insert "From: " fullname) | |
416 (let ((fullname-start (+ (point-min) 6)) | |
417 (fullname-end (point-marker))) | |
418 (goto-char fullname-start) | |
419 ;; Look for a character that cannot appear unquoted | |
420 ;; according to RFC 822. | |
421 (if (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" | |
422 fullname-end 1) | |
423 (progn | |
424 ;; Quote fullname, escaping specials. | |
425 (goto-char fullname-start) | |
426 (insert "\"") | |
427 (while (re-search-forward "[\"\\]" | |
428 fullname-end 1) | |
429 (replace-match "\\\\\\&" t)) | |
430 (insert "\"")))) | |
431 (insert " <" login ">\n")) | |
432 ((eq mail-from-style 'parens) | |
433 (insert "From: " login " (") | |
434 (let ((fullname-start (point))) | |
435 (insert fullname) | |
436 (let ((fullname-end (point-marker))) | |
437 (goto-char fullname-start) | |
438 ;; RFC 822 says \ and nonmatching parentheses | |
439 ;; must be escaped in comments. | |
440 ;; Escape every instance of ()\ ... | |
441 (while (re-search-forward "[()\\]" fullname-end 1) | |
442 (replace-match "\\\\\\&" t)) | |
443 ;; ... then undo escaping of matching parentheses, | |
444 ;; including matching nested parentheses. | |
445 (goto-char fullname-start) | |
446 (while (re-search-forward | |
447 "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" | |
448 fullname-end 1) | |
449 (replace-match "\\1(\\3)" t) | |
450 (goto-char fullname-start)))) | |
451 (insert ")\n")) | |
452 ((null mail-from-style) | |
453 (insert "From: " login "\n"))))) | |
454 ;; Insert a `Message-Id:' field if there isn't one yet. | |
455 (goto-char (point-min)) | |
456 (unless (re-search-forward "^Message-Id:" delimline t) | |
457 (insert "Message-Id: " (message-make-message-id) "\n")) | |
458 ;; Insert a `Date:' field if there isn't one yet. | |
459 (goto-char (point-min)) | |
460 (unless (re-search-forward "^Date:" delimline t) | |
461 (insert "Date: " (message-make-date) "\n")) | |
462 ;; Possibly add a MIME header for the current coding system | |
463 (let (charset) | |
464 (goto-char (point-min)) | |
465 (and (eq mail-send-nonascii 'mime) | |
466 (not (re-search-forward "^MIME-version:" delimline t)) | |
467 (progn (skip-chars-forward "\0-\177") | |
468 (/= (point) (point-max))) | |
469 smtpmail-code-conv-from | |
470 (setq charset | |
471 (coding-system-get smtpmail-code-conv-from | |
472 'mime-charset)) | |
473 (goto-char delimline) | |
474 (insert "MIME-version: 1.0\n" | |
475 "Content-type: text/plain; charset=" | |
476 (symbol-name charset) | |
477 "\nContent-Transfer-Encoding: 8bit\n"))) | |
478 ;; Insert an extra newline if we need it to work around | |
479 ;; Sun's bug that swallows newlines. | |
480 (goto-char (1+ delimline)) | |
481 (if (eval mail-mailer-swallows-blank-line) | |
482 (newline)) | |
483 ;; Find and handle any FCC fields. | |
484 (goto-char (point-min)) | |
485 (if (re-search-forward "^FCC:" delimline t) | |
486 ;; Force mail-do-fcc to use the encoding of the mail | |
487 ;; buffer to encode outgoing messages on FCC files. | |
488 (let ((coding-system-for-write smtpmail-code-conv-from)) | |
489 (mail-do-fcc delimline))) | |
490 (if mail-interactive | |
491 (with-current-buffer errbuf | |
492 (erase-buffer)))) | |
493 ;; | |
494 ;; | |
495 ;; | |
496 (setq smtpmail-address-buffer (generate-new-buffer "*smtp-mail*")) | |
497 (setq smtpmail-recipient-address-list | |
498 (smtpmail-deduce-address-list tembuf (point-min) delimline)) | |
499 (kill-buffer smtpmail-address-buffer) | |
500 | |
501 (smtpmail-do-bcc delimline) | |
502 ; Send or queue | |
503 (if (not smtpmail-queue-mail) | |
504 (if (not (null smtpmail-recipient-address-list)) | |
505 (if (not (smtpmail-via-smtp | |
506 smtpmail-recipient-address-list tembuf)) | |
507 (error "Sending failed; SMTP protocol error")) | |
508 (error "Sending failed; no recipients")) | |
509 (let* ((file-data | |
510 (expand-file-name | |
511 (format "%s_%i" | |
512 (format-time-string "%Y-%m-%d_%H:%M:%S") | |
513 (setq smtpmail-queue-counter | |
514 (1+ smtpmail-queue-counter))) | |
515 smtpmail-queue-dir)) | |
516 (file-data (convert-standard-filename file-data)) | |
517 (file-elisp (concat file-data ".el")) | |
518 (buffer-data (create-file-buffer file-data)) | |
519 (buffer-elisp (create-file-buffer file-elisp)) | |
520 (buffer-scratch "*queue-mail*")) | |
521 (unless (file-exists-p smtpmail-queue-dir) | |
522 (make-directory smtpmail-queue-dir t)) | |
523 (with-current-buffer buffer-data | |
524 (erase-buffer) | |
525 (set-buffer-file-coding-system smtpmail-code-conv-from nil t) | |
526 (insert-buffer-substring tembuf) | |
527 (write-file file-data) | |
528 (set-buffer buffer-elisp) | |
529 (erase-buffer) | |
530 (insert (concat | |
531 "(setq smtpmail-recipient-address-list '" | |
532 (prin1-to-string smtpmail-recipient-address-list) | |
533 ")\n")) | |
534 (write-file file-elisp) | |
535 (set-buffer (generate-new-buffer buffer-scratch)) | |
536 (insert (concat file-data "\n")) | |
537 (append-to-file (point-min) | |
538 (point-max) | |
539 smtpmail-queue-index) | |
540 ) | |
541 (kill-buffer buffer-scratch) | |
542 (kill-buffer buffer-data) | |
543 (kill-buffer buffer-elisp)))) | |
544 (kill-buffer tembuf) | |
545 (if (bufferp errbuf) | |
546 (kill-buffer errbuf))))) | |
547 | |
548 ;;;###autoload | |
549 (defun smtpmail-send-queued-mail () | |
550 "Send mail that was queued as a result of setting `smtpmail-queue-mail'." | |
551 (interactive) | |
552 (with-temp-buffer | |
553 ;;; Get index, get first mail, send it, update index, get second | |
554 ;;; mail, send it, etc... | |
555 (let ((file-msg "")) | |
556 (insert-file-contents smtpmail-queue-index) | |
557 (goto-char (point-min)) | |
558 (while (not (eobp)) | |
559 (setq file-msg (buffer-substring (point) (line-end-position))) | |
560 (load file-msg) | |
561 ;; Insert the message literally: it is already encoded as per | |
562 ;; the MIME headers, and code conversions might guess the | |
563 ;; encoding wrongly. | |
564 (with-temp-buffer | |
565 (let ((coding-system-for-read 'no-conversion)) | |
566 (insert-file-contents file-msg)) | |
567 (let ((smtpmail-mail-address | |
568 (or (and mail-specify-envelope-from (mail-envelope-from)) | |
569 user-mail-address))) | |
570 (if (not (null smtpmail-recipient-address-list)) | |
571 (if (not (smtpmail-via-smtp smtpmail-recipient-address-list | |
572 (current-buffer))) | |
573 (error "Sending failed; SMTP protocol error")) | |
574 (error "Sending failed; no recipients")))) | |
575 (delete-file file-msg) | |
576 (delete-file (concat file-msg ".el")) | |
577 (delete-region (point-at-bol) (point-at-bol 2))) | |
578 (write-region (point-min) (point-max) smtpmail-queue-index)))) | |
579 | |
580 ;(defun smtpmail-via-smtp (host,port,sender,destination,smtpmail-text-buffer) | |
581 | |
582 (defun smtpmail-fqdn () | |
583 (if smtpmail-local-domain | |
584 (concat (system-name) "." smtpmail-local-domain) | |
585 (system-name))) | |
586 | |
587 (defsubst smtpmail-cred-server (cred) | |
588 (nth 0 cred)) | |
589 | |
590 (defsubst smtpmail-cred-port (cred) | |
591 (nth 1 cred)) | |
592 | |
593 (defsubst smtpmail-cred-key (cred) | |
594 (nth 2 cred)) | |
595 | |
596 (defsubst smtpmail-cred-user (cred) | |
597 (nth 2 cred)) | |
598 | |
599 (defsubst smtpmail-cred-cert (cred) | |
600 (nth 3 cred)) | |
601 | |
602 (defsubst smtpmail-cred-passwd (cred) | |
603 (nth 3 cred)) | |
604 | |
605 (defun smtpmail-find-credentials (cred server port) | |
606 (catch 'done | |
607 (let ((l cred) el) | |
608 (while (setq el (pop l)) | |
609 (when (and (equal server (smtpmail-cred-server el)) | |
610 (equal port (smtpmail-cred-port el))) | |
611 (throw 'done el)))))) | |
612 | |
613 (defun smtpmail-maybe-append-domain (recipient) | |
614 (if (or (not smtpmail-sendto-domain) | |
615 (string-match "@" recipient)) | |
616 recipient | |
617 (concat recipient "@" smtpmail-sendto-domain))) | |
618 | |
619 (defun smtpmail-intersection (list1 list2) | |
620 (let ((result nil)) | |
621 (dolist (el2 list2) | |
622 (when (memq el2 list1) | |
623 (push el2 result))) | |
624 (nreverse result))) | |
625 | |
626 (defvar starttls-extra-args) | |
627 (defvar starttls-extra-arguments) | |
628 | |
629 (defun smtpmail-open-stream (process-buffer host port) | |
630 (let ((cred (smtpmail-find-credentials | |
631 smtpmail-starttls-credentials host port))) | |
632 (if (null (and cred (condition-case () | |
633 (with-no-warnings | |
634 (require 'starttls) | |
635 (call-process (if starttls-use-gnutls | |
636 starttls-gnutls-program | |
637 starttls-program))) | |
638 (error nil)))) | |
639 ;; The normal case. | |
640 (open-network-stream "SMTP" process-buffer host port) | |
641 (let* ((cred-key (smtpmail-cred-key cred)) | |
642 (cred-cert (smtpmail-cred-cert cred)) | |
643 (starttls-extra-args | |
644 (append | |
645 starttls-extra-args | |
646 (when (and (stringp cred-key) (stringp cred-cert) | |
647 (file-regular-p | |
648 (setq cred-key (expand-file-name cred-key))) | |
649 (file-regular-p | |
650 (setq cred-cert (expand-file-name cred-cert)))) | |
651 (list "--key-file" cred-key "--cert-file" cred-cert)))) | |
652 (starttls-extra-arguments | |
653 (append | |
654 starttls-extra-arguments | |
655 (when (and (stringp cred-key) (stringp cred-cert) | |
656 (file-regular-p | |
657 (setq cred-key (expand-file-name cred-key))) | |
658 (file-regular-p | |
659 (setq cred-cert (expand-file-name cred-cert)))) | |
660 (list "--x509keyfile" cred-key "--x509certfile" cred-cert))))) | |
661 (starttls-open-stream "SMTP" process-buffer host port))))) | |
662 | |
663 (defun smtpmail-try-auth-methods (process supported-extensions host port) | |
664 (let* ((mechs (cdr-safe (assoc 'auth supported-extensions))) | |
665 (mech (car (smtpmail-intersection smtpmail-auth-supported mechs))) | |
666 (cred (if (stringp smtpmail-auth-credentials) | |
667 (let* ((netrc (netrc-parse smtpmail-auth-credentials)) | |
668 (port-name (format "%s" (or port "smtp"))) | |
669 (hostentry (netrc-machine netrc host port-name | |
670 port-name))) | |
671 (when hostentry | |
672 (list host port | |
673 (netrc-get hostentry "login") | |
674 (netrc-get hostentry "password")))) | |
675 (smtpmail-find-credentials | |
676 smtpmail-auth-credentials host port))) | |
677 (passwd (when cred | |
678 (or (smtpmail-cred-passwd cred) | |
679 (read-passwd | |
680 (format "SMTP password for %s:%s: " | |
681 (smtpmail-cred-server cred) | |
682 (smtpmail-cred-port cred)))))) | |
683 ret) | |
684 (when (and cred mech) | |
685 (cond | |
686 ((eq mech 'cram-md5) | |
687 (smtpmail-send-command process (upcase (format "AUTH %s" mech))) | |
688 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
689 (not (integerp (car ret))) | |
690 (>= (car ret) 400)) | |
691 (throw 'done nil)) | |
692 (when (eq (car ret) 334) | |
693 (let* ((challenge (substring (cadr ret) 4)) | |
694 (decoded (base64-decode-string challenge)) | |
695 (hash (rfc2104-hash 'md5 64 16 passwd decoded)) | |
696 (response (concat (smtpmail-cred-user cred) " " hash)) | |
697 ;; Osamu Yamane <yamane@green.ocn.ne.jp>: | |
698 ;; SMTP auth fails because the SMTP server identifies | |
699 ;; only the first part of the string (delimited by | |
700 ;; new line characters) as a response from the | |
701 ;; client, and the rest as distinct commands. | |
702 | |
703 ;; In my case, the response string is 80 characters | |
704 ;; long. Without the no-line-break option for | |
705 ;; base64-encode-sting, only the first 76 characters | |
706 ;; are taken as a response to the server, and the | |
707 ;; authentication fails. | |
708 (encoded (base64-encode-string response t))) | |
709 (smtpmail-send-command process (format "%s" encoded)) | |
710 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
711 (not (integerp (car ret))) | |
712 (>= (car ret) 400)) | |
713 (throw 'done nil))))) | |
714 ((eq mech 'login) | |
715 (smtpmail-send-command process "AUTH LOGIN") | |
716 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
717 (not (integerp (car ret))) | |
718 (>= (car ret) 400)) | |
719 (throw 'done nil)) | |
720 (smtpmail-send-command | |
721 process (base64-encode-string (smtpmail-cred-user cred) t)) | |
722 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
723 (not (integerp (car ret))) | |
724 (>= (car ret) 400)) | |
725 (throw 'done nil)) | |
726 (smtpmail-send-command process (base64-encode-string passwd t)) | |
727 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
728 (not (integerp (car ret))) | |
729 (>= (car ret) 400)) | |
730 (throw 'done nil))) | |
731 ((eq mech 'plain) | |
732 ;; We used to send an empty initial request, and wait for an | |
733 ;; empty response, and then send the password, but this | |
734 ;; violate a SHOULD in RFC 2222 paragraph 5.1. Note that this | |
735 ;; is not sent if the server did not advertise AUTH PLAIN in | |
736 ;; the EHLO response. See RFC 2554 for more info. | |
737 (smtpmail-send-command process | |
738 (concat "AUTH PLAIN " | |
739 (base64-encode-string | |
740 (concat "\0" | |
741 (smtpmail-cred-user cred) | |
742 "\0" | |
743 passwd) t))) | |
744 (if (or (null (car (setq ret (smtpmail-read-response process)))) | |
745 (not (integerp (car ret))) | |
746 (not (equal (car ret) 235))) | |
747 (throw 'done nil))) | |
748 | |
749 (t | |
750 (error "Mechanism %s not implemented" mech))) | |
751 ;; Remember the password. | |
752 (when (and (not (stringp smtpmail-auth-credentials)) | |
753 (null (smtpmail-cred-passwd cred))) | |
754 (setcar (cdr (cdr (cdr cred))) passwd))))) | |
755 | |
756 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) | |
757 (let ((process nil) | |
758 (host (or smtpmail-smtp-server | |
759 (error "`smtpmail-smtp-server' not defined"))) | |
760 (port smtpmail-smtp-service) | |
761 ;; smtpmail-mail-address should be set to the appropriate | |
762 ;; buffer-local value by the caller, but in case not: | |
763 (envelope-from (or smtpmail-mail-address | |
764 (and mail-specify-envelope-from | |
765 (mail-envelope-from)) | |
766 user-mail-address)) | |
767 response-code | |
768 greeting | |
769 process-buffer | |
770 (supported-extensions '())) | |
771 (unwind-protect | |
772 (catch 'done | |
773 ;; get or create the trace buffer | |
774 (setq process-buffer | |
775 (get-buffer-create (format "*trace of SMTP session to %s*" host))) | |
776 | |
777 ;; clear the trace buffer of old output | |
778 (with-current-buffer process-buffer | |
779 (setq buffer-undo-list t) | |
780 (erase-buffer)) | |
781 | |
782 ;; open the connection to the server | |
783 (setq process (smtpmail-open-stream process-buffer host port)) | |
784 (and (null process) (throw 'done nil)) | |
785 | |
786 ;; set the send-filter | |
787 (set-process-filter process 'smtpmail-process-filter) | |
788 | |
789 (with-current-buffer process-buffer | |
790 (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix) | |
791 (make-local-variable 'smtpmail-read-point) | |
792 (setq smtpmail-read-point (point-min)) | |
793 | |
794 | |
795 (if (or (null (car (setq greeting (smtpmail-read-response process)))) | |
796 (not (integerp (car greeting))) | |
797 (>= (car greeting) 400)) | |
798 (throw 'done nil) | |
799 ) | |
800 | |
801 (let ((do-ehlo t) | |
802 (do-starttls t)) | |
803 (while do-ehlo | |
804 ;; EHLO | |
805 (smtpmail-send-command process (format "EHLO %s" (smtpmail-fqdn))) | |
806 | |
807 (if (or (null (car (setq response-code | |
808 (smtpmail-read-response process)))) | |
809 (not (integerp (car response-code))) | |
810 (>= (car response-code) 400)) | |
811 (progn | |
812 ;; HELO | |
813 (smtpmail-send-command | |
814 process (format "HELO %s" (smtpmail-fqdn))) | |
815 | |
816 (if (or (null (car (setq response-code | |
817 (smtpmail-read-response process)))) | |
818 (not (integerp (car response-code))) | |
819 (>= (car response-code) 400)) | |
820 (throw 'done nil))) | |
821 (dolist (line (cdr (cdr response-code))) | |
822 (let ((name | |
823 (with-case-table ascii-case-table | |
824 (mapcar (lambda (s) (intern (downcase s))) | |
825 (split-string (substring line 4) "[ ]"))))) | |
826 (and (eq (length name) 1) | |
827 (setq name (car name))) | |
828 (and name | |
829 (cond ((memq (if (consp name) (car name) name) | |
830 '(verb xvrb 8bitmime onex xone | |
831 expn size dsn etrn | |
832 enhancedstatuscodes | |
833 help xusr | |
834 auth=login auth starttls)) | |
835 (setq supported-extensions | |
836 (cons name supported-extensions))) | |
837 (smtpmail-warn-about-unknown-extensions | |
838 (message "Unknown extension %s" name))))))) | |
839 | |
840 (if (and do-starttls | |
841 (smtpmail-find-credentials smtpmail-starttls-credentials host port) | |
842 (member 'starttls supported-extensions) | |
843 (numberp (process-id process))) | |
844 (progn | |
845 (smtpmail-send-command process (format "STARTTLS")) | |
846 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
847 (not (integerp (car response-code))) | |
848 (>= (car response-code) 400)) | |
849 (throw 'done nil)) | |
850 (starttls-negotiate process) | |
851 (setq do-starttls nil)) | |
852 (setq do-ehlo nil)))) | |
853 | |
854 (smtpmail-try-auth-methods process supported-extensions host port) | |
855 | |
856 (if (or (member 'onex supported-extensions) | |
857 (member 'xone supported-extensions)) | |
858 (progn | |
859 (smtpmail-send-command process (format "ONEX")) | |
860 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
861 (not (integerp (car response-code))) | |
862 (>= (car response-code) 400)) | |
863 (throw 'done nil)))) | |
864 | |
865 (if (and smtpmail-debug-verb | |
866 (or (member 'verb supported-extensions) | |
867 (member 'xvrb supported-extensions))) | |
868 (progn | |
869 (smtpmail-send-command process (format "VERB")) | |
870 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
871 (not (integerp (car response-code))) | |
872 (>= (car response-code) 400)) | |
873 (throw 'done nil)))) | |
874 | |
875 (if (member 'xusr supported-extensions) | |
876 (progn | |
877 (smtpmail-send-command process (format "XUSR")) | |
878 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
879 (not (integerp (car response-code))) | |
880 (>= (car response-code) 400)) | |
881 (throw 'done nil)))) | |
882 | |
883 ;; MAIL FROM:<sender> | |
884 (let ((size-part | |
885 (if (or (member 'size supported-extensions) | |
886 (assoc 'size supported-extensions)) | |
887 (format " SIZE=%d" | |
888 (with-current-buffer smtpmail-text-buffer | |
889 ;; size estimate: | |
890 (+ (- (point-max) (point-min)) | |
891 ;; Add one byte for each change-of-line | |
892 ;; because of CR-LF representation: | |
893 (count-lines (point-min) (point-max))))) | |
894 "")) | |
895 (body-part | |
896 (if (member '8bitmime supported-extensions) | |
897 ;; FIXME: | |
898 ;; Code should be added here that transforms | |
899 ;; the contents of the message buffer into | |
900 ;; something the receiving SMTP can handle. | |
901 ;; For a receiver that supports 8BITMIME, this | |
902 ;; may mean converting BINARY to BASE64, or | |
903 ;; adding Content-Transfer-Encoding and the | |
904 ;; other MIME headers. The code should also | |
905 ;; return an indication of what encoding the | |
906 ;; message buffer is now, i.e. ASCII or | |
907 ;; 8BITMIME. | |
908 (if nil | |
909 " BODY=8BITMIME" | |
910 "") | |
911 ""))) | |
912 ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) | |
913 (smtpmail-send-command process (format "MAIL FROM:<%s>%s%s" | |
914 envelope-from | |
915 size-part | |
916 body-part)) | |
917 | |
918 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
919 (not (integerp (car response-code))) | |
920 (>= (car response-code) 400)) | |
921 (throw 'done nil) | |
922 )) | |
923 | |
924 ;; RCPT TO:<recipient> | |
925 (let ((n 0)) | |
926 (while (not (null (nth n recipient))) | |
927 (smtpmail-send-command process (format "RCPT TO:<%s>" (smtpmail-maybe-append-domain (nth n recipient)))) | |
928 (setq n (1+ n)) | |
929 | |
930 (setq response-code (smtpmail-read-response process)) | |
931 (if (or (null (car response-code)) | |
932 (not (integerp (car response-code))) | |
933 (>= (car response-code) 400)) | |
934 (throw 'done nil) | |
935 ) | |
936 )) | |
937 | |
938 ;; DATA | |
939 (smtpmail-send-command process "DATA") | |
940 | |
941 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
942 (not (integerp (car response-code))) | |
943 (>= (car response-code) 400)) | |
944 (throw 'done nil) | |
945 ) | |
946 | |
947 ;; Mail contents | |
948 (smtpmail-send-data process smtpmail-text-buffer) | |
949 | |
950 ;;DATA end "." | |
951 (smtpmail-send-command process ".") | |
952 | |
953 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
954 (not (integerp (car response-code))) | |
955 (>= (car response-code) 400)) | |
956 (throw 'done nil) | |
957 ) | |
958 | |
959 ;;QUIT | |
960 ; (smtpmail-send-command process "QUIT") | |
961 ; (and (null (car (smtpmail-read-response process))) | |
962 ; (throw 'done nil)) | |
963 t )) | |
964 (if process | |
965 (with-current-buffer (process-buffer process) | |
966 (smtpmail-send-command process "QUIT") | |
967 (smtpmail-read-response process) | |
968 | |
969 ; (if (or (null (car (setq response-code (smtpmail-read-response process)))) | |
970 ; (not (integerp (car response-code))) | |
971 ; (>= (car response-code) 400)) | |
972 ; (throw 'done nil) | |
973 ; ) | |
974 (delete-process process) | |
975 (unless smtpmail-debug-info | |
976 (kill-buffer process-buffer))))))) | |
977 | |
978 | |
979 (defun smtpmail-process-filter (process output) | |
980 (with-current-buffer (process-buffer process) | |
981 (goto-char (point-max)) | |
982 (insert output))) | |
983 | |
984 (defun smtpmail-read-response (process) | |
985 (let ((case-fold-search nil) | |
986 (response-strings nil) | |
987 (response-continue t) | |
988 (return-value '(nil ())) | |
989 match-end) | |
990 (catch 'done | |
991 (while response-continue | |
992 (goto-char smtpmail-read-point) | |
993 (while (not (search-forward "\r\n" nil t)) | |
994 (unless (memq (process-status process) '(open run)) | |
995 (throw 'done nil)) | |
996 (accept-process-output process) | |
997 (goto-char smtpmail-read-point)) | |
998 | |
999 (setq match-end (point)) | |
1000 (setq response-strings | |
1001 (cons (buffer-substring smtpmail-read-point (- match-end 2)) | |
1002 response-strings)) | |
1003 | |
1004 (goto-char smtpmail-read-point) | |
1005 (if (looking-at "[0-9]+ ") | |
1006 (let ((begin (match-beginning 0)) | |
1007 (end (match-end 0))) | |
1008 (if smtpmail-debug-info | |
1009 (message "%s" (car response-strings))) | |
1010 | |
1011 (setq smtpmail-read-point match-end) | |
1012 | |
1013 ;; ignore lines that start with "0" | |
1014 (if (looking-at "0[0-9]+ ") | |
1015 nil | |
1016 (setq response-continue nil) | |
1017 (setq return-value | |
1018 (cons (string-to-number | |
1019 (buffer-substring begin end)) | |
1020 (nreverse response-strings))))) | |
1021 | |
1022 (if (looking-at "[0-9]+-") | |
1023 (progn (if smtpmail-debug-info | |
1024 (message "%s" (car response-strings))) | |
1025 (setq smtpmail-read-point match-end) | |
1026 (setq response-continue t)) | |
1027 (progn | |
1028 (setq smtpmail-read-point match-end) | |
1029 (setq response-continue nil) | |
1030 (setq return-value | |
1031 (cons nil (nreverse response-strings))))))) | |
1032 (setq smtpmail-read-point match-end)) | |
1033 return-value)) | |
1034 | |
1035 | |
1036 (defun smtpmail-send-command (process command) | |
1037 (goto-char (point-max)) | |
1038 (if (= (aref command 0) ?P) | |
1039 (insert "PASS <omitted>\r\n") | |
1040 (insert command "\r\n")) | |
1041 (setq smtpmail-read-point (point)) | |
1042 (process-send-string process command) | |
1043 (process-send-string process "\r\n")) | |
1044 | |
1045 (defun smtpmail-send-data-1 (process data) | |
1046 (goto-char (point-max)) | |
1047 | |
1048 (if (and (multibyte-string-p data) | |
1049 smtpmail-code-conv-from) | |
1050 (setq data (string-as-multibyte | |
1051 (encode-coding-string data smtpmail-code-conv-from)))) | |
1052 | |
1053 (if smtpmail-debug-info | |
1054 (insert data "\r\n")) | |
1055 | |
1056 (setq smtpmail-read-point (point)) | |
1057 ;; Escape "." at start of a line | |
1058 (if (eq (string-to-char data) ?.) | |
1059 (process-send-string process ".")) | |
1060 (process-send-string process data) | |
1061 (process-send-string process "\r\n") | |
1062 ) | |
1063 | |
1064 (defun smtpmail-send-data (process buffer) | |
1065 (let ((data-continue t) sending-data) | |
1066 (with-current-buffer buffer | |
1067 (goto-char (point-min))) | |
1068 (while data-continue | |
1069 (with-current-buffer buffer | |
1070 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) | |
1071 (end-of-line 2) | |
1072 (setq data-continue (not (eobp)))) | |
1073 (smtpmail-send-data-1 process sending-data)))) | |
1074 | |
1075 (defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) | |
1076 "Get address list suitable for smtp RCPT TO: <address>." | |
1077 (unwind-protect | |
1078 (with-current-buffer smtpmail-address-buffer | |
1079 (erase-buffer) | |
1080 (let | |
1081 ((case-fold-search t) | |
1082 (simple-address-list "") | |
1083 this-line | |
1084 this-line-end | |
1085 addr-regexp) | |
1086 (insert-buffer-substring smtpmail-text-buffer header-start header-end) | |
1087 (goto-char (point-min)) | |
1088 ;; RESENT-* fields should stop processing of regular fields. | |
1089 (save-excursion | |
1090 (setq addr-regexp | |
1091 (if (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" | |
1092 header-end t) | |
1093 "^Resent-\\(to\\|cc\\|bcc\\):" | |
1094 "^\\(To:\\|Cc:\\|Bcc:\\)"))) | |
1095 | |
1096 (while (re-search-forward addr-regexp header-end t) | |
1097 (replace-match "") | |
1098 (setq this-line (match-beginning 0)) | |
1099 (forward-line 1) | |
1100 ;; get any continuation lines | |
1101 (while (and (looking-at "^[ \t]+") (< (point) header-end)) | |
1102 (forward-line 1)) | |
1103 (setq this-line-end (point-marker)) | |
1104 (setq simple-address-list | |
1105 (concat simple-address-list " " | |
1106 (mail-strip-quoted-names (buffer-substring this-line this-line-end)))) | |
1107 ) | |
1108 (erase-buffer) | |
1109 (insert " " simple-address-list "\n") | |
1110 (subst-char-in-region (point-min) (point-max) 10 ? t);; newline --> blank | |
1111 (subst-char-in-region (point-min) (point-max) ?, ? t);; comma --> blank | |
1112 (subst-char-in-region (point-min) (point-max) 9 ? t);; tab --> blank | |
1113 | |
1114 (goto-char (point-min)) | |
1115 ;; tidyness in case hook is not robust when it looks at this | |
1116 (while (re-search-forward "[ \t]+" header-end t) (replace-match " ")) | |
1117 | |
1118 (goto-char (point-min)) | |
1119 (let (recipient-address-list) | |
1120 (while (re-search-forward " \\([^ ]+\\) " (point-max) t) | |
1121 (backward-char 1) | |
1122 (setq recipient-address-list (cons (buffer-substring (match-beginning 1) (match-end 1)) | |
1123 recipient-address-list)) | |
1124 ) | |
1125 (setq smtpmail-recipient-address-list recipient-address-list)) | |
1126 | |
1127 ) | |
1128 ) | |
1129 ) | |
1130 ) | |
1131 | |
1132 | |
1133 (defun smtpmail-do-bcc (header-end) | |
1134 "Delete [Resent-]BCC: and their continuation lines from the header area. | |
1135 There may be multiple BCC: lines, and each may have arbitrarily | |
1136 many continuation lines." | |
1137 (let ((case-fold-search t)) | |
1138 (save-excursion | |
1139 (goto-char (point-min)) | |
1140 ;; iterate over all BCC: lines | |
1141 (while (re-search-forward "^\\(RESENT-\\)?BCC:" header-end t) | |
1142 (delete-region (match-beginning 0) | |
1143 (progn (forward-line 1) (point))) | |
1144 ;; get rid of any continuation lines | |
1145 (while (and (looking-at "^[ \t].*\n") (< (point) header-end)) | |
1146 (replace-match "")))))) | |
1147 | |
1148 | |
1149 (provide 'smtpmail) | |
1150 | |
1151 ;;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 | |
1152 ;;; smtpmail.el ends here | |
1153 ---------------------------- | |
1154 revision 1.450 (applied) | |
1155 date: 2008-02-12 07:13:29 +0000; author: bastien1; state: Exp; lines: +9 -23; commitid: kUIzo78FXw0mV4Rs; | |
1156 Reverted wrong changes to rmail.el. | |
1157 ---------------------------- | |
1158 revision 1.449 (irrelevant) | |
1159 date: 2008-02-12 07:10:49 +0000; author: bastien1; state: Exp; lines: +23 -9; commitid: U6bdsg13J3PmU4Rs; | |
1160 2008-02-11 Drew Adams <drew.adams@oracle.com> | |
1161 | |
1162 * help.el (describe-key): Joined some split lines to facilitate | |
1163 filling. | |
1164 * help-fns.el (describe-function-1): Fill text of overlong lines. | |
1165 ---------------------------- | |
1166 revision 1.448 (patched) | |
1167 date: 2008-02-10 22:10:09 +0000; author: bastien1; state: Exp; lines: +4 -2; commitid: XXphXBYKRXGPWTQs; | |
1168 (rmail-nonignored-headers): Allow to be nil. | |
1169 (rmail-clear-headers): Don't check `rmail-nonignored-headers' when | |
1170 it is nil. | |
1171 ---------------------------- | |
1172 revision 1.447 (defer) | |
1173 date: 2008-02-01 16:01:27 +0000; author: miles; state: Exp; lines: +11 -11; commitid: A9tHDrKNUaDbcIPs; | |
1174 Merge unicode branch | |
1175 | |
1176 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1037 | |
1177 ---------------------------- | |
1178 revision 1.446 (patched) | |
1179 date: 2008-02-01 02:40:23 +0000; author: miles; state: Exp; lines: +1 -1; commitid: XnTPkNPE8wPKLDPs; | |
1180 Merge from emacs--rel--22 | |
1181 | |
1182 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1032 | |
1183 ---------------------------- | |
1184 revision 1.445 (defer) | |
1185 date: 2008-01-13 18:16:04 +0000; author: m061211; state: Exp; lines: +75 -70; commitid: 542CxzVsGawCyhNs; | |
1186 (rmail-convert-to-babyl-format): Remove | |
1187 save-excursion to avoid infinite looping. | |
1188 ---------------------------- | |
1189 revision 1.444 (patched) | |
1190 date: 2008-01-08 20:45:07 +0000; author: miles; state: Exp; lines: +1 -1; commitid: GLqjDoDkbCnkxEMs; | |
1191 Merge from emacs--rel--22 | |
1192 | |
1193 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987 | |
1194 ---------------------------- | |
1195 revision 1.443 (patched) | |
1196 date: 2007-11-27 06:57:06 +0000; author: dann; state: Exp; lines: +9 -0; commitid: 2IinMqAAxCxbjbHs; | |
1197 * progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify | |
1198 byte compiler. | |
1199 (cperl-mode): Use with-no-warnings for setting vc-header-alist. | |
1200 | |
1201 * progmodes/idlwave.el (idlwave-shell-get-path-info) | |
1202 (idlwave-shell-temp-file, idlwave-shell-is-running) | |
1203 (widget-value, comint-dynamic-complete-filename, Info-goto-node): | |
1204 * progmodes/idlw-help.el (idlwave-prepare-structure-tag-completion) | |
1205 (idlwave-all-method-classes, idlwave-all-method-keyword-classes) | |
1206 (idlwave-beginning-of-statement, idlwave-best-rinfo-assoc) | |
1207 (idlwave-class-found-in, idlwave-class-or-superclass-with-tag) | |
1208 (idlwave-completing-read, idlwave-current-routine) | |
1209 (idlwave-downcase-safe, idlwave-entry-find-keyword) | |
1210 (idlwave-expand-keyword, idlwave-find-class-definition) | |
1211 (idlwave-find-inherited-class, idlwave-find-struct-tag) | |
1212 (idlwave-get-buffer-visiting, idlwave-in-quote) | |
1213 (idlwave-make-full-name, idlwave-members-only) | |
1214 (idlwave-popup-select, idlwave-routine-source-file) | |
1215 (idlwave-routines, idlwave-sintern-class) | |
1216 (idlwave-sintern-keyword, idlwave-sintern-method) | |
1217 (idlwave-sintern-routine-or-method) | |
1218 (idlwave-substitute-link-target, idlwave-sys-dir) | |
1219 (idlwave-this-word, idlwave-what-module-find-class) | |
1220 (idlwave-where): | |
1221 * progmodes/idlw-complete-structtag.el (idlwave-shell-buffer): | |
1222 * mail/uce.el (rmail-msg-is-pruned) | |
1223 (rmail-maybe-set-message-counters, rmail-msgbeg, rmail-msgend) | |
1224 (rmail-toggle-header): | |
1225 * mail/sendmail.el (dired-view-file, dired-get-filename): | |
1226 * mail/rmailkwd.el (rmail-maybe-set-message-counters) | |
1227 (rmail-display-labels, rmail-msgbeg) | |
1228 (rmail-set-message-deleted-p, rmail-message-labels-p) | |
1229 (rmail-show-message, mail-comma-list-regexp) | |
1230 (mail-parse-comma-list): | |
1231 * mail/rmail.el (rmail-spam-filter, rmail-summary-goto-msg) | |
1232 (rmail-summary-mark-undeleted, rmail-summary-mark-deleted) | |
1233 (rfc822-addresses, mail-abbrev-make-syntax-table) | |
1234 (mail-sendmail-delimit-header, mail-header-end): | |
1235 * mail/hashcash.el (message-narrow-to-headers-or-head) | |
1236 (message-fetch-field, message-goto-eoh) | |
1237 (message-narrow-to-headers): | |
1238 * vc.el (view-mode-exit): Declare as functions. | |
1239 | |
1240 * mail/vms-pmail.el: | |
1241 * vmsproc.el: | |
1242 * vms-patch.el: Don't byte compile these files, they don't work. | |
1243 | |
1244 * Makefile.in (SOME_MACHINE_LISP): Remove VMS files, they are not | |
1245 compiled anymore. | |
1246 ---------------------------- | |
1247 revision 1.442 (applied) | |
1248 date: 2007-11-25 16:48:31 +0000; author: dann; state: Exp; lines: +4 -0; commitid: AG5BA1V4T2VeEYGs; | |
1249 * mail/mspools.el (rmail-get-new-mail): | |
1250 * mail/reporter.el (mail-position-on-field, mail-text): | |
1251 * mail/rmail.el (mail-position-on-field, mail-text-start) | |
1252 (rmail-update-summary): | |
1253 * mail/rmailedit.el (rmail-summary-disable) | |
1254 (rmail-summary-enable): | |
1255 * mail/rmailmsc.el (rmail-parse-file-inboxes) | |
1256 (rmail-show-message): | |
1257 * mail/rmailout.el (rmail-update-summary): | |
1258 * mail/rmailsort.el (rmail-update-summary): | |
1259 * mail/sendmail.el (dired-move-to-filename, dired-get-filename) | |
1260 (dired-view-file): | |
1261 * mail/uce.el (mail-strip-quoted-names): | |
1262 * mail/undigest.el (rmail-update-summary): | |
1263 * mail/unrmail.el (mail-strip-quoted-names): | |
1264 * ediff.el (diff-latest-backup-file): Declare as functions. | |
1265 | |
1266 * obsolete/mlsupport.el (ml-previous-page): Fix typo. | |
1267 (kill-to-end-of-line): | |
1268 * obsolete/rnews.el (news-set-minor-modes): Remove non working | |
1269 functions. | |
1270 ---------------------------- | |
1271 revision 1.441 (applied) | |
1272 date: 2007-11-21 04:55:58 +0000; author: miles; state: Exp; lines: +3 -1; commitid: sh9id2ij5oqKPoGs; | |
1273 Merge from emacs--rel--22 | |
1274 | |
1275 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-937 | |
1276 ---------------------------- | |
1277 revision 1.440 (patched) | |
1278 date: 2007-10-12 03:05:02 +0000; author: gm; state: Exp; lines: +3 -2; commitid: KgZKUHr3QcvrvfBs; | |
1279 Re-fill copyright header. | |
1280 (rmail-list-to-menu): Use mapc rather than mapcar. | |
1281 ---------------------------- | |
1282 revision 1.439 (applied) | |
1283 date: 2007-08-22 03:36:42 +0000; author: gm; state: Exp; lines: +7 -4; commitid: snSlmOInawCWjHus; | |
1284 (rmail-movemail-variant-p): Call on load to set movemail related variables. | |
1285 (rmail-insert-inbox-text): Use only rmail-movemail-program, which | |
1286 will now be set before this is called. | |
1287 ---------------------------- | |
1288 revision 1.438 (applied) | |
1289 date: 2007-08-20 09:30:12 +0000; author: schwab; state: Exp; lines: +1 -1; commitid: we67G0c0GiHcltus; | |
1290 (rmail-autodetect): Doc fix. | |
1291 ---------------------------- | |
1292 revision 1.437 (patched) | |
1293 date: 2007-08-13 13:41:26 +0000; author: miles; state: Exp; lines: +2 -2; commitid: VsOBiVySwfx6XAts; | |
1294 Merge from emacs--rel--22 | |
1295 | |
1296 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-851 | |
1297 ---------------------------- | |
1298 revision 1.436 (irrelevant) | |
1299 date: 2007-07-26 05:27:13 +0000; author: miles; state: Exp; lines: +1 -1; commitid: IKTBbGNFxqtbNers; | |
1300 Merge from emacs--rel--22 | |
1301 | |
1302 Patches applied: | |
1303 | |
1304 * emacs--rel--22 (patch 70-73) | |
1305 | |
1306 - Update from CVS | |
1307 | |
1308 2007-07-25 Glenn Morris <rgm@gnu.org> | |
1309 | |
1310 * Relicense all FSF files to GPLv3 or later. | |
1311 | |
1312 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828 | |
1313 ---------------------------- | |
1314 revision 1.435 (applied) | |
1315 date: 2007-06-09 12:52:02 +0000; author: ttn; state: Exp; lines: +1 -1; commitid: qAfHMYDnHTNVLels; | |
1316 (rmail-movemail-variant-in-use): Fix doc typo. | |
1317 ---------------------------- | |
1318 revision 1.434 (defer) | |
1319 date: 2007-05-14 19:58:45 +0000; author: eliz; state: Exp; lines: +7 -6; commitid: Lc0wnr2BZzX0YVhs; | |
1320 (rmail-convert-to-babyl-format): Check content-transfer-encoding _last_, | |
1321 because it's its position that we need as value of base64-header-field-end. | |
1322 ---------------------------- | |
1323 revision 1.433 (defer) | |
1324 date: 2007-04-03 11:11:27 +0000; author: eliz; state: Exp; lines: +17 -7; | |
1325 branches: 1.433.2; 1.433.4; | |
1326 (rmail-convert-to-babyl-format): Don't try to decode base-64 encoded body | |
1327 if its content-type is something other than text/* or message/*. | |
1328 ---------------------------- | |
1329 revision 1.432 (applied) | |
1330 date: 2007-02-24 17:12:34 +0000; author: jpw; state: Exp; lines: +1 -1; | |
1331 (rmail-message-filter): Fix custom type. | |
1332 ---------------------------- | |
1333 revision 1.431 (irrelevant) | |
1334 date: 2007-01-21 02:59:07 +0000; author: gm; state: Exp; lines: +1 -1; | |
1335 Add 2007 to copyright years. | |
1336 ---------------------------- | |
1337 revision 1.430 (defer) | |
1338 date: 2006-11-04 15:38:39 +0000; author: eliz; state: Exp; lines: +29 -3; | |
1339 (rmail-redecode-body): New optional argument RAW. | |
1340 Don't encode body if RAW is non-nil, or if the old encoding is identical to the | |
1341 new encoding, or if the body contains only eight-bit-* characters. | |
1342 ---------------------------- | |
1343 revision 1.429 (applied) | |
1344 date: 2006-10-07 13:29:51 +0000; author: eliz; state: Exp; lines: +1 -1; | |
1345 (rmail-mime-charset-pattern): Allow a TAB between "Content-Type" and | |
1346 "text/plain". | |
1347 ---------------------------- | |
1348 revision 1.428 (defer) | |
1349 date: 2006-10-07 13:12:42 +0000; author: eliz; state: Exp; lines: +6 -0; | |
1350 (rmail-redecode-body): If the old encoding is `undecided', call | |
1351 find-coding-systems-region to find a proper non-trivial encoding. | |
1352 ---------------------------- | |
1353 revision 1.427 (defer) | |
1354 date: 2006-09-08 12:02:13 +0000; author: rms; state: Exp; lines: +11 -6; | |
1355 (rmail-get-new-mail): Say whether all msgs are spam. | |
1356 (rmail-convert-to-babyl-format): Don't record undo, leave list empty. | |
1357 ---------------------------- | |
1358 revision 1.426 (defer) | |
1359 date: 2006-05-20 17:36:07 +0000; author: eliz; state: Exp; lines: +3 -3; | |
1360 (rmail-mime-charset-pattern): Add "?:" before "format". | |
1361 (rmail-convert-to-babyl-format): Undo the change from 2006-04-19. | |
1362 ---------------------------- | |
1363 revision 1.425 (defer) | |
1364 date: 2006-04-19 09:55:40 +0000; author: rfrancoise; state: Exp; lines: +2 -2; | |
1365 (rmail-convert-to-babyl-format): Use second group from | |
1366 `rmail-mime-charset-pattern'. | |
1367 ---------------------------- | |
1368 revision 1.424 (applied) | |
1369 date: 2006-04-10 03:19:03 +0000; author: rms; state: Exp; lines: +3 -1; | |
1370 (rmail-mime-charset-pattern): Ignore format and delsp specs | |
1371 while looking for charset. | |
1372 ---------------------------- | |
1373 revision 1.423 (patched) | |
1374 date: 2006-03-25 11:33:48 +0000; author: eliz; state: Exp; lines: +34 -0; | |
1375 (tool-bar-map): Defvar it. | |
1376 (rmail-tool-bar-map): Tool-bar buttons for Rmail. | |
1377 (rmail-perm-variables): Make rmail-tool-bar-map a local variable. | |
1378 ---------------------------- | |
1379 revision 1.422 (patched) | |
1380 date: 2006-03-18 18:28:36 +0000; author: rms; state: Exp; lines: +4 -4; | |
1381 (rmail-reply-regexp): Undo previous change. | |
1382 ---------------------------- | |
1383 revision 1.421 (applied) | |
1384 date: 2006-03-11 15:13:47 +0000; author: rms; state: Exp; lines: +8 -2; | |
1385 (rmail-ignored-headers): Discard DomainKey-Signature. | |
1386 ---------------------------- | |
1387 revision 1.420 (irrelevant) | |
1388 date: 2006-02-06 12:31:40 +0000; author: ttn; state: Exp; lines: +1 -1; | |
1389 Update years in copyright notice; nfc. | |
1390 ---------------------------- | |
1391 revision 1.419 (patched) | |
1392 date: 2006-01-19 11:59:15 +0000; author: handa; state: Exp; lines: +17 -4; | |
1393 (rmail-enable-mime): Docstring fixed. | |
1394 (rmail-mime-feature): Likewise. | |
1395 (rmail-require-mime-maybe): Use display-warning to show a warning | |
1396 message. | |
1397 ---------------------------- | |
1398 revision 1.418 (irrelevant) | |
1399 date: 2006-01-08 23:47:07 +0000; author: as; state: Exp; lines: +4 -2; | |
1400 (rmail-reply-regexp): Also ignore mailing list | |
1401 identifiers sometimes added in square brackets at the beginning of | |
1402 subject lines. | |
1403 ---------------------------- | |
1404 revision 1.417 (applied) | |
1405 date: 2006-01-08 15:18:55 +0000; author: as; state: Exp; lines: +35 -13; | |
1406 (rmail-current-subject): New function. | |
1407 (rmail-current-subject-regexp): New function. | |
1408 (rmail-next-same-subject): Use it. | |
1409 ---------------------------- | |
1410 revision 1.416 (applied) | |
1411 date: 2005-12-10 11:29:53 +0000; author: eliz; state: Exp; lines: +9 -4; | |
1412 (rmail-next-same-subject): Handle multiple "Re: " strings and long subject | |
1413 lines that were broken into multiple lines at arbitrary places. | |
1414 ---------------------------- | |
1415 revision 1.415 (applied) | |
1416 date: 2005-09-24 13:43:59 +0000; author: rfrancoise; state: Exp; lines: +14 -12; | |
1417 2005-09-24 Emilio C. Lopes <eclig@gmx.net> | |
1418 | |
1419 * woman.el (woman-file-name): | |
1420 * wid-edit.el (widget-file-prompt-value) | |
1421 (widget-coding-system-prompt-value): | |
1422 * w32-fns.el (set-w32-system-coding-system): | |
1423 * vc.el (vc-version-diff, vc-annotate): | |
1424 * textmodes/reftex-auc.el (reftex-arg-cite) | |
1425 (reftex-arg-index-tag): | |
1426 * textmodes/refer.el (refer-get-bib-files): | |
1427 * textmodes/artist.el (artist-figlet-choose-font): | |
1428 * terminal.el (terminal-emulator): | |
1429 * replace.el (occur-read-primary-args): | |
1430 * rect.el (string-rectangle, string-insert-rectangle): | |
1431 * ps-print.el (ps-print-preprint): | |
1432 * progmodes/pascal.el (pascal-goto-defun): | |
1433 * progmodes/etags.el (visit-tags-table, visit-tags-table-buffer): | |
1434 * progmodes/compile.el (compilation-find-file): | |
1435 * printing.el (pr-interactive-n-up): | |
1436 * play/animate.el (animate-birthday-present): | |
1437 * net/rcompile.el (remote-compile): | |
1438 * man.el (man, Man-goto-section, Man-follow-manual-reference): | |
1439 * mail/rmailsum.el (rmail-summary-search-backward) | |
1440 (rmail-summary-search): | |
1441 * mail/rmailout.el (rmail-output-read-rmail-file-name) | |
1442 (rmail-output-read-file-name): | |
1443 * mail/rmail.el (rmail-search, rmail-search-backwards): | |
1444 * mail/mailabbrev.el (merge-mail-abbrevs, rebuild-mail-abbrevs): | |
1445 * locate.el (locate): | |
1446 * international/quail.el (quail-show-keyboard-layout): | |
1447 * international/mule.el (set-buffer-file-coding-system) | |
1448 (revert-buffer-with-coding-system, set-file-name-coding-system) | |
1449 (set-terminal-coding-system, set-keyboard-coding-system) | |
1450 (set-next-selection-coding-system): | |
1451 * international/mule-diag.el (describe-coding-system) | |
1452 (describe-font, describe-fontset): | |
1453 * international/mule-cmds.el (universal-coding-system-argument) | |
1454 (search-unencodable-char, describe-input-method) | |
1455 (set-language-environment, describe-language-environment): | |
1456 * international/codepage.el (codepage-setup): | |
1457 * international/code-pages.el (codepage-setup): | |
1458 * info.el (Info-search, Info-follow-reference) | |
1459 (Info-search-backward): | |
1460 * emacs-lisp/advice.el (ad-read-advised-function) | |
1461 (ad-read-advice-class, ad-clear-cache, ad-activate) | |
1462 (ad-deactivate, ad-update, ad-unadvise, ad-read-advice-name) | |
1463 (ad-enable-advice, ad-disable-advice, ad-remove-advice) | |
1464 (ad-read-regexp): | |
1465 * ediff-util.el (ediff-toggle-regexp-match): | |
1466 * ediff-ptch.el (ediff-prompt-for-patch-file): | |
1467 * dired-aux.el (dired-diff): | |
1468 * diff.el (diff): | |
1469 * cus-edit.el (custom-variable-prompt): | |
1470 * calendar/timeclock.el (timeclock-ask-for-project): | |
1471 * calc/calcalg3.el (calc-get-fit-variables): | |
1472 * calc/calc-store.el (calc-edit-variable) | |
1473 (calc-permanent-variable): | |
1474 * vc-mcvs.el (vc-mcvs-register): | |
1475 * shadowfile.el (shadow-define-literal-group): | |
1476 * woman.el (woman-file-name): | |
1477 * vc.el (vc-version-diff, vc-merge): | |
1478 * textmodes/reftex-index.el (reftex-index-complete-tag): | |
1479 * format.el (format-decode-buffer, format-decode-region): | |
1480 * emulation/viper-cmd.el (viper-read-string-with-history): | |
1481 * emacs-lisp/debug.el (cancel-debug-on-entry): | |
1482 * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): | |
1483 * ediff.el (ediff-merge-revisions) | |
1484 (ediff-merge-revisions-with-ancestor, ediff-revision): | |
1485 * completion.el (interactive-completion-string-reader): | |
1486 * calc/calc-prog.el (calc-user-define-formula): | |
1487 Follow convention for reading with the minibuffer. | |
1488 ---------------------------- | |
1489 revision 1.414 (applied) | |
1490 date: 2005-08-29 14:38:57 +0000; author: lektu; state: Exp; lines: +10 -0; | |
1491 (deleted-head, font-lock-fontified, mail-abbrev-syntax-table, mail-abbrevs, | |
1492 messages-head, rmail-use-spam-filter, rsf-beep, rsf-sleep-after-message, | |
1493 total-messages): Add defvars. | |
1494 ---------------------------- | |
1495 revision 1.413 (defer 'rmail-reply) | |
1496 date: 2005-08-15 02:04:29 +0000; author: rms; state: Exp; lines: +43 -26; | |
1497 (rmail-nonignored-headers): New variable. | |
1498 (rmail-clear-headers): Use it. | |
1499 (rmail-reply): Better handling of mail-followup-to header. | |
1500 ---------------------------- | |
1501 revision 1.412 (applied) | |
1502 date: 2005-08-14 23:44:12 +0000; author: schwab; state: Exp; lines: +2 -3; | |
1503 Revert last change. | |
1504 ---------------------------- | |
1505 revision 1.411 (irrelevant) | |
1506 date: 2005-08-14 22:50:04 +0000; author: ttn; state: Exp; lines: +3 -2; | |
1507 Fix dependency bug: Wrap `desktop-buffer-mode-handlers' | |
1508 modification in `eval-after-load' form. | |
1509 ---------------------------- | |
1510 revision 1.410 (applied) | |
1511 date: 2005-08-12 10:26:59 +0000; author: eliz; state: Exp; lines: +16 -2; | |
1512 (rmail-end-of-message): New command to go to the | |
1513 end of the current message. Added to `rmail-mode-map' with key "/". | |
1514 (rmail-beginning-of-message): Fixed to work as documented. | |
1515 (rmail-mode): Change documentation. | |
1516 ---------------------------- | |
1517 revision 1.409 (applied) | |
1518 date: 2005-08-10 19:40:05 +0000; author: lh; state: Exp; lines: +3 -1; | |
1519 Add handler to desktop-buffer-mode-handlers. | |
1520 (rmail-restore-desktop-buffer): Remove autoload cookie. | |
1521 ---------------------------- | |
1522 revision 1.408 (patched) | |
1523 date: 2005-08-09 11:38:10 +0000; author: rms; state: Exp; lines: +2 -2; | |
1524 (rmail-ignored-headers): Don't hide mime-version: and content-type: headers. | |
1525 ---------------------------- | |
1526 revision 1.407 (applied) | |
1527 date: 2005-08-06 18:54:05 +0000; author: ttn; state: Exp; lines: +8 -8; | |
1528 Update years in copyright notice; nfc. | |
1529 ---------------------------- | |
1530 revision 1.406 (applied) | |
1531 date: 2005-07-08 22:31:32 +0000; author: rms; state: Exp; lines: +4 -4; | |
1532 (rmail-only-expunge): Fix paren error. | |
1533 Unconditionally try to leave point at the same old place. | |
1534 ---------------------------- | |
1535 revision 1.405 (irrelevant) | |
1536 date: 2005-07-04 17:46:22 +0000; author: lute; state: Exp; lines: +2 -2; | |
1537 Update FSF's address. | |
1538 ---------------------------- | |
1539 revision 1.404 (applied) | |
1540 date: 2005-05-26 15:16:48 +0000; author: lute; state: Exp; lines: +1 -1; | |
1541 (rmail-mode): Use run-mode-hooks. | |
1542 ---------------------------- | |
1543 revision 1.403 (patched) | |
1544 date: 2005-05-21 14:13:00 +0000; author: eliz; state: Exp; lines: +5 -1; | |
1545 (rmail-reply): Filter the list in reply-to through rmail-dont-reply-to. | |
1546 ---------------------------- | |
1547 revision 1.402 (irrelevant) | |
1548 date: 2005-05-16 11:16:34 +0000; author: lektu; state: Exp; lines: +1 -1; | |
1549 Replace `string-to-int' by `string-to-number'. | |
1550 ---------------------------- | |
1551 revision 1.401 (applied) | |
1552 date: 2005-04-24 21:32:28 +0000; author: rms; state: Exp; lines: +4 -5; | |
1553 (rmail-font-lock-keywords): Match any number of | |
1554 citation markers at start of each line. | |
1555 ---------------------------- | |
1556 revision 1.400 (irrelevant) | |
1557 date: 2005-04-23 16:36:53 +0000; author: rms; state: Exp; lines: +3 -1; | |
1558 (rmail-font-lock-keywords): Use font-lock-comment-delimiter-face. | |
1559 ---------------------------- | |
1560 revision 1.399 (applied) | |
1561 date: 2005-04-17 15:55:50 +0000; author: rms; state: Exp; lines: +8 -5; | |
1562 (rmail-ignored-headers): Ignore more headers | |
1563 (rmail-font-lock-keywords): Don't fontify the text of a citation. | |
1564 ---------------------------- | |
1565 revision 1.398 (applied) | |
1566 date: 2005-04-02 11:31:06 +0000; author: eliz; state: Exp; lines: +20 -29; | |
1567 (rmail-parse-url): Bugfix. Parse traditional mailbox specifications | |
1568 as well as URLs. | |
1569 (rmail-insert-inbox-text): Remove unused conditional branches. | |
1570 ---------------------------- | |
1571 revision 1.397 (applied) | |
1572 date: 2005-03-18 00:12:08 +0000; author: rms; state: Exp; lines: +56 -15; | |
1573 branches: 1.397.2; | |
1574 (rmail-movemail-program, rmail-pop-password) | |
1575 (rmail-pop-password-required, rmail-remote-password): Doc fixes. | |
1576 (rmail-preserve-inbox, rmail-probe, rmail-autodetect): Doc fix. | |
1577 | |
1578 (rmail-unknown-mail-followup-to): New function. | |
1579 (rmail-show-message): Use rmail-unknown-mail-followup-to. | |
1580 (rmail-reply): Recognize Mail-Followup-To and Mail-Reply-To headers. | |
1581 ---------------------------- | |
1582 revision 1.396 (applied) | |
1583 date: 2005-02-09 15:50:37 +0000; author: kfstorm; state: Exp; lines: +10 -10; | |
1584 Change release version from 21.4 to 22.1 throughout. | |
1585 Change development version from 21.3.50 to 22.0.50. | |
1586 ---------------------------- | |
1587 revision 1.395 (applied) | |
1588 date: 2005-01-15 14:27:41 +0000; author: eliz; state: Exp; lines: +223 -82; | |
1589 Updated to work with movemail from GNU Mailutils | |
1590 (rmail-pop-password, rmail-pop-password-required): Moved to | |
1591 rmail-obsolete group. | |
1592 (rmail-set-pop-password): Renamed to rmail-set-remote-password. | |
1593 All callers updated. | |
1594 (rmail-get-pop-password): Renamed to rmail-get-remote-password. | |
1595 Take an argument specifying whether it is POP or IMAP mailbox we | |
1596 are using. All callers updated. | |
1597 (rmail-pop-password-error): Renamed to rmail-remote-password-error. | |
1598 Added mailutils-specific error message. | |
1599 (rmail-movemail-search-path) | |
1600 (rmail-movemail-variant-in-use): New variables. | |
1601 (rmail-remote-password, rmail-remote-password-required): New | |
1602 customization variables. | |
1603 (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New functions | |
1604 (rmail-parse-url): New function. | |
1605 (rmail-get-new-mail, rmail-insert-inbox-text): Updated for use | |
1606 with GNU mailutils movemail. | |
1607 ---------------------------- | |
1608 revision 1.394 (applied) | |
1609 date: 2004-12-27 16:11:33 +0000; author: rms; state: Exp; lines: +2 -0; | |
1610 (rmail-resend): Let MAIL-ALIAS-FILE arg override mail-personal-alias-file. | |
1611 ---------------------------- | |
1612 revision 1.393 (defer, part of spam filter) | |
1613 date: 2004-11-12 17:08:57 +0000; author: eliz; state: Exp; lines: +2 -2; | |
1614 (rmail-get-new-mail): Use the renamed variables `rsf-beep' and | |
1615 `rsf-sleep-after-message'. | |
1616 ---------------------------- | |
1617 revision 1.392 (irrelevant) | |
1618 date: 2004-07-24 21:35:32 +0000; author: rms; state: Exp; lines: +1 -1; | |
1619 (rmail-mime-charset-pattern): Don't include semicolon in the charset value. | |
1620 ---------------------------- | |
1621 revision 1.391 (applied) | |
1622 date: 2004-04-26 18:54:23 +0000; author: lh; state: Exp; lines: +3 -1; | |
1623 branches: 1.391.2; | |
1624 (rmail-variables): Bind desktop-save-buffer to t. | |
1625 ---------------------------- | |
1626 revision 1.390 (defer) | |
1627 date: 2004-04-24 08:57:31 +0000; author: eliz; state: Exp; lines: +13 -9; | |
1628 (rmail-mail-new-frame): Doc fix. | |
1629 (rmail-start-mail): Support rmail-mail-new-frame even on | |
1630 terminals that can display only one frame at a time. | |
1631 ---------------------------- | |
1632 revision 1.389 (applied) | |
1633 date: 2004-04-21 20:49:37 +0000; author: lh; state: Exp; lines: +24 -9; | |
1634 (rmail-restore-desktop-buffer): Move from desktop.el. Add Parameters. | |
1635 ---------------------------- | |
1636 revision 1.388 (irrelevant) | |
1637 date: 2004-04-19 18:04:46 +0000; author: eliz; state: Exp; lines: +9 -7; | |
1638 (rmail-convert-to-babyl-format): Don't remove ^M | |
1639 characters left after base64 decoding. | |
1640 (rmail-decode-region): Use -dos variety of `coding', to remove any | |
1641 ^M characters left after qp or base64 decoding. | |
1642 ---------------------------- | |
1643 revision 1.387 (irrelevant) | |
1644 date: 2004-03-07 20:04:51 +0000; author: eliz; state: Exp; lines: +0 -1; | |
1645 Remove redundant whitespace. | |
1646 ---------------------------- | |
1647 revision 1.386 (defer) | |
1648 date: 2004-03-04 17:03:51 +0000; author: rms; state: Exp; lines: +6 -3; | |
1649 (rmail-convert-to-babyl-format): | |
1650 Specify t for UNIBYTE when calling mail-unquote-printable-region. | |
1651 ---------------------------- | |
1652 revision 1.385 (defer) | |
1653 date: 2004-02-17 19:54:49 +0000; author: uid65627; state: Exp; lines: +8 -3; | |
1654 (rmail-get-new-mail): Don't reference | |
1655 rmail-use-spam-filter if rmail-spam-filter is not loaded. | |
1656 ---------------------------- | |
1657 revision 1.384 (applied) | |
1658 date: 2004-02-16 11:35:50 +0000; author: uid65627; state: Exp; lines: +3 -3; | |
1659 (rmail-default-dont-reply-to-names): Make "info-" | |
1660 anchored at the beginning of the email address. | |
1661 ---------------------------- | |
1662 revision 1.383 (irrelevant) | |
1663 date: 2004-02-08 22:36:05 +0000; author: uid65629; state: Exp; lines: +2 -2; | |
1664 (rmail-get-new-mail): Remove useless use of | |
1665 format. | |
1666 ---------------------------- | |
1667 revision 1.382 (irrelevant) | |
1668 date: 2004-02-08 22:33:42 +0000; author: uid65629; state: Exp; lines: +3 -5; | |
1669 (rmail-get-new-mail): Remove extra format string | |
1670 arguments. | |
1671 ---------------------------- | |
1672 revision 1.381 (defer) | |
1673 date: 2004-01-21 12:35:55 +0000; author: uid66361; state: Exp; lines: +8 -1; | |
1674 (rmail-convert-to-babyl-format): Avoid deleting trailing white space | |
1675 and ensure a final newline. | |
1676 ---------------------------- | |
1677 revision 1.380 (partial, along with 1.406) | |
1678 date: 2004-01-16 18:23:37 +0000; author: uid65566; state: Exp; lines: +59 -9; | |
1679 (rmail-get-new-mail): New local rsf-number-of-spam. | |
1680 Call rmail-spam-filter. Delete and expunge spam. | |
1681 Print number of spam messages deleted. | |
1682 Save and restore the deletion status of old messages when reading | |
1683 new mail with spam filter, so that expunging spam does not expunge | |
1684 msgs deleted by the user. | |
1685 | |
1686 (rmail-only-expunge): added an optional argument dont-show to | |
1687 prevent showing message after expunge. | |
1688 ---------------------------- | |
1689 revision 1.379 (defer) | |
1690 date: 2004-01-12 21:56:50 +0000; author: uid65566; state: Exp; lines: +7 -41; | |
1691 (rmail-convert-to-babyl-format): Use mail-unquote-printable-region. | |
1692 (rmail-hex-string-to-integer, rmail-decode-quoted-printable): | |
1693 (rmail-hex-char-to-integer): Functions deleted. | |
1694 ---------------------------- | |
1695 revision 1.378 (defer) | |
1696 date: 2003-12-30 11:42:37 +0000; author: uid65627; state: Exp; lines: +4 -1; | |
1697 (rmail-convert-to-babyl-format): Fix off-by-one | |
1698 error in arguments to base64-decode-region. Remove ^M characters | |
1699 after decoding base64. | |
1700 ---------------------------- | |
1701 revision 1.377 (defer) | |
1702 date: 2003-12-30 10:45:41 +0000; author: uid65627; state: Exp; lines: +28 -22; | |
1703 (rmail-convert-to-babyl-format): Make the code | |
1704 cleaner (suggested by Richard Stallman). | |
1705 ---------------------------- | |
1706 revision 1.376 (irrelevant) | |
1707 date: 2003-11-03 19:20:23 +0000; author: eliz; state: Exp; lines: +22 -18; | |
1708 (rmail-convert-to-babyl-format): If | |
1709 base64-decode-region signals an error, catch it and silently | |
1710 ignore it. | |
1711 ---------------------------- | |
1712 revision 1.375 (defer) | |
1713 date: 2003-10-16 16:54:48 +0000; author: eliz; state: Exp; lines: +3 -3; | |
1714 (rmail-convert-to-babyl-format): Fix the last change. | |
1715 ---------------------------- | |
1716 revision 1.374 (defer) | |
1717 date: 2003-10-16 16:49:27 +0000; author: eliz; state: Exp; lines: +9 -3; | |
1718 (rmail-convert-to-babyl-format): Display a message while converting to Babyl. | |
1719 ---------------------------- | |
1720 revision 1.373 (applied) | |
1721 date: 2003-09-01 15:45:30 +0000; author: miles; state: Exp; lines: +1 -0; | |
1722 Add arch taglines | |
1723 ---------------------------- | |
1724 revision 1.372 (defer) | |
1725 date: 2003-08-28 15:11:15 +0000; author: eliz; state: Exp; lines: +73 -6; | |
1726 (rmail-convert-to-babyl-format): Detect | |
1727 quoted-printable- and base64-encoded messages and decode them | |
1728 automatically. Set the message's encoding from the charset= | |
1729 header, if any. Decode base64-encoded messages in Mail format as | |
1730 well. | |
1731 ---------------------------- | |
1732 revision 1.371 (merged) | |
1733 date: 2003-05-15 00:01:00 +0000; author: jpw; state: Exp; lines: +1 -1; | |
1734 branches: 1.371.4; | |
1735 (rmail-ignored-headers): Ignore Face: header. | |
1736 ---------------------------- | |
1737 revision 1.370 (applied) | |
1738 date: 2003-05-06 17:47:18 +0000; author: lektu; state: Exp; lines: +1 -1; | |
1739 (rmail-primary-inbox-list): Don't quote nil and t in docstrings. | |
1740 ---------------------------- | |
1741 revision 1.369 (irrelevant) | |
1742 date: 2003-02-20 21:07:29 +0000; author: lektu; state: Exp; lines: +1 -1; | |
1743 (rmail-insert-inbox-text): Make the pop3 mechanism work on cygwin systems too. | |
1744 ---------------------------- | |
1745 revision 1.368 (base) | |
1746 date: 2003-01-06 16:02:29 +0000; author: jpw; state: Exp; lines: +3 -3; | |
1747 branches: 1.368.2; | |
1748 (rmail-mmdf-delim1, rmail-mmdf-delim2): Doc fixes. | |
1749 | |
1750 Keys: | |
1751 applied: The patch has already been applied. | |
1752 irrelevant: The change is no longer relevant. | |
1753 defer: think about this change immediately after mbox/trunk is basically running. | |
1754 merged: The change has been applied now. | |
1755 partial: Some of the patch is now applied but some is deferred. | |
1756 | |
1757 Todo: | |
1758 determine if any changes to (rmail-convert-to-babyl) need to be applied in some new fashion. | |
1759 revisit spam handling additions. |