summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/feedmail.el10
-rw-r--r--lisp/mail/rmail-spam-filter.el19
-rw-r--r--lisp/mail/rmail.el25
-rw-r--r--lisp/mail/sendmail.el10
-rw-r--r--lisp/mail/smtpmail.el15
5 files changed, 56 insertions, 23 deletions
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 3bd287541cf..04928fb537b 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1340,7 +1340,15 @@ complicated cases."
(set-buffer prepped)
(apply 'call-process-region
(append (list (point-min) (point-max)
- (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail")
+ (cond ((boundp 'sendmail-program)
+ sendmail-program)
+ ((file-exists-p "/usr/sbin/sendmail")
+ "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail")
+ "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail")
+ "/usr/ucblib/sendmail")
+ (t "fakemail"))
nil errors-to nil "-oi" "-t")
;; provide envelope "from" to sendmail; results will vary
(list "-f" user-mail-address)
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index 933e1f6c8a2..bba23111612 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -134,12 +134,11 @@ spam, as one of the fields of `rsf-definitions-alist'"
:group 'rmail-spam-filter )
(defcustom rsf-min-region-to-spam-list 7
- "*User may highlight a region in an incomming message and use
- the menubar to add this region to the spam definitions. This
- variable specifies the minimum size of region that may be added
- to spam list, to avoid accidentally adding a too short region
- which would result in false positive identification of spam
- messages."
+ "*Minimum size of region that you can add to the spam list.
+This is a size limit on text that you can specify as
+indicating a message is spam. The aim is to avoid
+accidentally adding a too short region, which would result
+in false positive identification of spam."
:type 'integer
:group 'rmail-spam-filter )
@@ -212,8 +211,8 @@ specify 'this\\&that' in the appropriate spam definition field."
:group 'rmail-spam-filter)
(defvar rsf-scanning-messages-now nil
- "Non nil when rmail-spam-filter scans messages,
-for interaction with `rsf-bbdb-auto-delete-spam-entries'")
+ "Non nil when `rmail-spam-filter' scans messages.
+This is for interaction with `rsf-bbdb-auto-delete-spam-entries'.")
;; the advantage over the automatic filter definitions is the AND conjunction
;; of in-one-definition-elements
@@ -596,8 +595,8 @@ Added to spam definitions as a contents field."
(define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list)
(defun rsf-add-content-type-field ()
- "Maintain backward compatibility with previous versions of rmail-spam-filter.
-The most recent version of rmai-spam-filter checks the contents
+ "Maintain backward compatibility for `rmail-spam-filter'.
+The most recent version of `rmail-spam-filter' checks the contents
field of the incoming mail to see if it spam. The format of
`rsf-definitions-alist' has therefore changed. This function
checks to see if old format is used, and if it is, it converts
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 195eb60830c..68dfd9f7ca4 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -623,7 +623,7 @@ the variable `rmail-mime-feature'.")
;;;###autoload
(defvar rmail-mime-charset-pattern
- (concat "^content-type:[ ]*text/plain;"
+ (concat "^content-type:[ \t]*text/plain;"
"\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*"
"[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?")
"Regexp to match MIME-charset specification in a header of message.
@@ -1677,12 +1677,15 @@ It returns t if it got any new messages."
(if (and (featurep 'rmail-spam-filter)
rmail-use-spam-filter
(> rsf-number-of-spam 0))
- (if (= 1 new-messages)
- ", and found to be a spam message"
- (if (> rsf-number-of-spam 1)
- (format ", %d of which found to be spam messages"
- rsf-number-of-spam)
- ", one of which found to be a spam message"))
+ (cond ((= 1 new-messages)
+ ", and appears to be spam")
+ ((= rsf-number-of-spam new-messages)
+ ", and all appear to be spam")
+ ((> rsf-number-of-spam 1)
+ (format ", and %d appear to be spam"
+ rsf-number-of-spam))
+ (t
+ ", and 1 appears to be spam"))
""))
(if (and (featurep 'rmail-spam-filter)
rmail-use-spam-filter
@@ -1900,6 +1903,7 @@ is non-nil if the user has supplied the password interactively.
(defun rmail-convert-to-babyl-format ()
(let ((count 0) start
(case-fold-search nil)
+ (buffer-undo-list t)
(invalid-input-resync
(function (lambda ()
(message "Invalid Babyl format in inbox!")
@@ -2173,6 +2177,7 @@ is non-nil if the user has supplied the password interactively.
;; may still be in use. -- rms, 7 May 1993.
((eolp) (delete-char 1))
(t (error "Cannot convert to babyl format")))))
+ (setq buffer-undo-list nil)
count))
;; Delete the "From ..." line, creating various other headers with
@@ -2870,6 +2875,12 @@ iso-8859, koi8-r, etc."
(coding-system-change-eol-conversion
coding
(coding-system-eol-type old-coding)))
+ ;; If old-coding is `undecided', encode-coding-region
+ ;; will not encode the text at all. Find a proper
+ ;; non-trivial encoding to use.
+ (if (memq (coding-system-base old-coding) '(nil undecided))
+ (setq old-coding
+ (car (find-coding-systems-region msgbeg msgend))))
(setq x-coding-header (point-marker))
(narrow-to-region msgbeg msgend)
(encode-coding-region (point) msgend old-coding)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 28463208c45..288e5bd0df3 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -48,6 +48,16 @@
:group 'sendmail
:version "22.1")
+(defcustom sendmail-program
+ (cond
+ ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
+ (t "fakemail")) ;In ../etc, to interface to /bin/mail.
+ "Program used to send messages."
+ :group 'mail
+ :type 'file)
+
;;;###autoload
(defcustom mail-from-style 'angles
"Specifies how \"From:\" fields look.
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index ff38cd25ff8..9557844a32a 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -176,7 +176,12 @@ looks like `user@realm'."
(defcustom smtpmail-starttls-credentials '(("" 25 "" ""))
"Specify STARTTLS keys and certificates for servers.
This is a list of four-element list with `servername' (a string),
-`port' (an integer), `key' (a filename) and `certificate' (a filename)."
+`port' (an integer), `key' (a filename) and `certificate' (a
+filename).
+If you do not have a certificate/key pair, leave the `key' and
+`certificate' fields as `nil'. A key/certificate pair is only
+needed if you want to use X.509 client authenticated
+connections."
:type '(repeat (list (string :tag "Server")
(integer :tag "Port")
(file :tag "Key")
@@ -536,7 +541,7 @@ This is relative to `smtpmail-queue-dir'.")
(decoded (base64-decode-string challenge))
(hash (rfc2104-hash 'md5 64 16 passwd decoded))
(response (concat (smtpmail-cred-user cred) " " hash))
- (encoded (base64-encode-string response)))
+ (encoded (base64-encode-string response t)))
(smtpmail-send-command process (format "%s" encoded))
(if (or (null (car (setq ret (smtpmail-read-response process))))
(not (integerp (car ret)))
@@ -549,12 +554,12 @@ This is relative to `smtpmail-queue-dir'.")
(>= (car ret) 400))
(throw 'done nil))
(smtpmail-send-command
- process (base64-encode-string (smtpmail-cred-user cred)))
+ process (base64-encode-string (smtpmail-cred-user cred) t))
(if (or (null (car (setq ret (smtpmail-read-response process))))
(not (integerp (car ret)))
(>= (car ret) 400))
(throw 'done nil))
- (smtpmail-send-command process (base64-encode-string passwd))
+ (smtpmail-send-command process (base64-encode-string passwd t))
(if (or (null (car (setq ret (smtpmail-read-response process))))
(not (integerp (car ret)))
(>= (car ret) 400))
@@ -571,7 +576,7 @@ This is relative to `smtpmail-queue-dir'.")
(concat "\0"
(smtpmail-cred-user cred)
"\0"
- passwd))))
+ passwd) t)))
(if (or (null (car (setq ret (smtpmail-read-response process))))
(not (integerp (car ret)))
(not (equal (car ret) 235)))