From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46629 Path: main.gmane.org!not-for-mail From: Micha Wiedenmann Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail: MAIL FROM and `gnus-posting-styles' Date: 21 Sep 2002 02:42:08 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: <87ofasb5mg.fsf@ID-56226.news.dfncis.de> References: <874rcprohi.fsf@ID-56226.news.dfncis.de> <87r8fq18bs.fsf@ID-56226.news.dfncis.de> Reply-To: Micha Wiedenmann NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1032568879 16941 127.0.0.1 (21 Sep 2002 00:41:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2002 00:41:19 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17sYKk-0004Oz-00 for ; Sat, 21 Sep 2002 02:41:18 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17sYHZ-0006qP-00; Fri, 20 Sep 2002 19:38:01 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 20 Sep 2002 19:38:39 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id TAA03582 for ; Fri, 20 Sep 2002 19:38:27 -0500 (CDT) Original-Received: (qmail 9233 invoked by alias); 21 Sep 2002 00:37:43 -0000 Original-Received: (qmail 9228 invoked from network); 21 Sep 2002 00:37:43 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 21 Sep 2002 00:37:43 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17sYwK-0004O2-00 for ; Sat, 21 Sep 2002 03:20:08 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 61 Original-NNTP-Posting-Host: dialin-145-254-179-033.arcor-ip.net Original-X-Trace: quimby.gnus.org 1032571208 16760 145.254.179.33 (21 Sep 2002 01:20:08 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 21 Sep 2002 01:20:08 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46629 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46629 Kai Großjohann schrieb am 19.09.2002: >Micha Wiedenmann writes: > >> Even if this would be possible I don't think this would help since I use >> `message-send-mail-function' value: `gnus-agent-send-mail'. If I am >> unplugged mail is stored in nndraft:queue and buffer-local settings >> would also lost, wouldn't they? > >I think the X-Draft-From header is supposed to allow Gnus to recover >the right posting style. X-Draft-From is used (set) in `gnus-draft-setup' I don't understand it all but I trust you! :-) (used for posting styles). I don't see, where it is used in `gnus-agent-send-mail' and I don't see how the posting-styles set user-mail-address which is send by `smtpmail-via-smtp'. X-Draft-From is not in Gnus 5.8.8 (but the statements above are about recent CVS Oort.) I have fixed my problem with I consider as a bug by fixing `gnus-agent-send-mail' this function has not changed (v5.8.8 -> Oort) yet. ,----[ gnus-agent.el ] | (defun gnus-agent-send-mail () | (if gnus-plugged | (progn | ;; restore user-mail-address from FROM header | (let ((mail-envelope-from | (nth 1 (mail-extract-address-components | (message-fetch-field "From"))))) | (funcall gnus-agent-send-mail-function))) | (goto-char (point-min)) | (re-search-forward | (concat "^" (regexp-quote mail-header-separator) "\n")) | (replace-match "\n") | (gnus-agent-insert-meta-information 'mail) | (gnus-request-accept-article "nndraft:queue" nil t t))) `---- This code makes sure that a message send via smtp uses the same mail-address for SMTP:MAIL FROM %s as in the message From-header. I had really strange problems with edebug and user-mail-address instead of mail-envelope-from. While tracing through the let expression edebug evaluated user-mail-address to "foo" bug `C-h v user-mail-address' evalueted to bar. I thought I am silly. I didn't get a working version with user-mail-address (I would not belive if I didn't tried!) Maybe this was a side effekt from edebug and `q' (`q' runs `top-level', exit debugging. If you have some time you could test it yourselve but I thing mail-envelope-from is even better than user-mail-address. HTH, Micha -- "They were just sucked into space" -- Riker "Blown, sir" -- Data "Sorry, Data" -- Riker "Common mistake, sir" -- Data (Star Trek TNG: The Naked Now)