[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
adding sender
From: |
Frederik Fouvry |
Subject: |
adding sender |
Date: |
Thu, 4 Aug 2005 15:12:35 +0200 (CEST) |
Symptoms:
Included is a patch for adding in Sender headers if necessary.
The comment in the file (explaining why the code was commented
out) mentions a report of duplicate Sender headers. Perhaps
checking for the presence of a Sender header is sufficient to
avoid this? This patch (a) comments in the existing code and (b)
adds a test for the presence of a Sender header. According to
the relevant RFCs (822 and 2822), the Sender header should not be
added by MTA or MDA, therefore it seems this patch should be OK.
Index: sendmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/sendmail.el,v
retrieving revision 1.286
diff -c -r1.286 sendmail.el
*** sendmail.el 4 Jul 2005 17:46:22 -0000 1.286
--- sendmail.el 4 Aug 2005 13:03:16 -0000
***************
*** 1017,1037 ****
(looking-at "resent-bcc"))
(delete-region (save-excursion (beginning-of-line) (point))
(save-excursion (end-of-line) (1+ (point))))))
! ;;; Apparently this causes a duplicate Sender.
! ;;; ;; If the From is different than current user, insert Sender.
! ;;; (goto-char (point-min))
! ;;; (and (re-search-forward "^From:" delimline t)
! ;;; (progn
! ;;; (require 'mail-utils)
! ;;; (not (string-equal
! ;;; (mail-strip-quoted-names
! ;;; (save-restriction
! ;;; (narrow-to-region (point-min) delimline)
! ;;; (mail-fetch-field "From")))
! ;;; (user-login-name))))
! ;;; (progn
! ;;; (forward-line 1)
! ;;; (insert "Sender: " (user-login-name) "\n")))
;; Don't send out a blank subject line
(goto-char (point-min))
(if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t)
--- 1017,1037 ----
(looking-at "resent-bcc"))
(delete-region (save-excursion (beginning-of-line) (point))
(save-excursion (end-of-line) (1+ (point))))))
! ;; If the From is different than current user, insert Sender.
! (goto-char (point-min))
! (and (not (re-search-forward "^Sender:" delimline t))
! (re-search-forward "^From:" delimline t)
! (progn
! (require 'mail-utils)
! (not (string-equal
! (mail-strip-quoted-names
! (save-restriction
! (narrow-to-region (point-min) delimline)
! (mail-fetch-field "From")))
! user-mail-address)))
! (progn
! (forward-line 1)
! (insert "Sender: " user-mail-address "\n")))
;; Don't send out a blank subject line
(goto-char (point-min))
(if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t)
If emacs crashed, and you have the emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/export/black/fouvry/emacs/etc/DEBUG for instructions.
In GNU Emacs 22.0.50.13 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-08-03 on cc.at.coli.uni-sb.de
X server distributor `The XFree86 Project, Inc', version 11.0.40201000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: POSIX
value of $LC_CTYPE: en_GB.ISO8859-15
value of $LC_MESSAGES: en_GB.ISO8859-15
value of $LC_MONETARY: address@hidden
value of $LC_NUMERIC: en_GB.ISO8859-15
value of $LC_TIME: en_GB.ISO8859-15
value of $LANG: en_GB.ISO8859-15
locale-coding-system: iso-8859-15
default-enable-multibyte-characters: t
- adding sender,
Frederik Fouvry <=