From f389afa3edf5783995df2d72dcce96ea3eaffd0c Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 25 Feb 2003 22:58:11 +0000 Subject: [PATCH] Synch to Oort Gnus. --- lisp/ChangeLog | 11 +++++++++++ lisp/gnus-art.el | 2 ++ lisp/message.el | 21 ++++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01fb590..c79eec8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-02-25 Jesper Harder + + * message.el (message-sendmail-envelope-from): New option. + (message-sendmail-envelope-from): New function. + (message-send-mail-with-sendmail): Use it. + +2003-02-25 Reiner Steib + + * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): Added + compensation for TDMA addresses. + 2003-02-24 Reiner Steib * gnus-msg.el (gnus-user-agent): New variable. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index ec2b44a..b2210af 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -6002,6 +6002,8 @@ must return `mid', `mail', `invalid' or `ask'." (-3.0 . "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*@") ;; "[0-9]{12,}.*\@" + ;; compensation for TDMA dated mail addresses: + (25.0 . "-dated-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]+.*@") ;; (-20.0 . "\\.fsf@") ;; Gnus (-20.0 . "^slrn") diff --git a/lisp/message.el b/lisp/message.el index 5f6eec5..d5f9a62 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -792,6 +792,15 @@ Doing so would be even more evil than leaving it out." :group 'message-sending :type 'boolean) +(defcustom message-sendmail-envelope-from nil + "*Envelope-from when sending mail with sendmail. +If this is nil, use `user-mail-address'. If it is the symbol +`header', use the From: header of the message." + :type '(choice (string :tag "From name") + (const :tag "Use From: header from message" header) + (const :tag "Use `user-mail-address'" nil)) + :group 'message-sending) + ;; qmail-related stuff (defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject" "Location of the qmail-inject program." @@ -4041,7 +4050,7 @@ This sub function is for exclusive use of `message-send-mail'." ;; But some systems are more broken with -f, so ;; we'll let users override this. (if (null message-sendmail-f-is-evil) - (list "-f" (message-make-address))) + (list "-f" (message-sendmail-envelope-from))) ;; These mean "report errors by mail" ;; and "deliver in background". (if (null message-interactive) '("-oem" "-odb")) @@ -5108,6 +5117,16 @@ give as trustworthy answer as possible." (nth 1 (std11-extract-address-components user-mail-address)) user-mail-address))) +(defun message-sendmail-envelope-from () + "Return the envelope from." + (cond ((eq message-sendmail-envelope-from 'header) + (nth 1 (mail-extract-address-components + (message-fetch-field "from")))) + ((stringp message-sendmail-envelope-from) + message-sendmail-envelope-from) + (t + (message-make-address)))) + (defun message-make-fqdn () "Return user's fully qualified domain name." (let* ((system-name (system-name)) -- 1.7.10.4