From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8514 Path: main.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: New feature request: "faked" identity, and supercede Date: 29 Oct 1996 18:45:04 +0100 Sender: sb@metis.no Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.84) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035148662 12544 80.91.224.250 (20 Oct 2002 21:17:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:17:42 +0000 (UTC) Return-Path: Original-Received: (qmail 18892 invoked from smtpd); 29 Oct 1996 18:14:06 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 29 Oct 1996 18:14:05 -0000 Original-Received: from gw.metis.no (abel.metis.no [193.90.64.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 29 Oct 1996 18:45:37 +0100 Original-Received: by gw.metis.no (8.6.12/8.6.12) with ESMTP id SAA26404; Tue, 29 Oct 1996 18:45:06 +0100 Original-Received: by hub.metis.no (8.6.12/8.6.12) with ESMTP id SAA05345; Tue, 29 Oct 1996 18:45:05 +0100 Original-Received: by client.metis.no (8.6.11/8.6.12) id SAA02944; Tue, 29 Oct 1996 18:45:05 +0100 Original-To: ding@ifi.uio.no Original-Lines: 78 X-Mailer: Red Gnus v0.52/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:8514 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8514 Platform: Emacs 19.34, RGnus-0.52, SPARC Solaris 2.4, One thing I've done, is to change my identity (my address and organization) for some mail and newsgroups. I do it, by putting the following into my ~/.emacs: (add-hook 'message-header-setup-hook 'custom-organization-and-sender) The custom-organization-and-sender function can be found at the end of this message. In short, what I do is set the variables user-email-addres, and message-user-organization, when I enter message-mode from certain news, and mail groups. This works fine for posting news and sending mail. The place where it doesn't work, is when it comes to Supercede and Cancel. Then I get the "This article is not yours", caused by this bit of message-cancel-news in message.el: ... ;; Make sure that this article was written by the user. (unless (string-equal (downcase (cadr (mail-extract-address-components from))) (downcase (message-make-address))) (error "This article is not yours")) ... The culprit here, is message-make-address, which returns sb@metis.no, and I guess there is no hacking around this, short of overriding this function in Gnus (which I don't much like doing). So... I would like to see a built-in customization mechanism for the sender address, and organization. I might even squeeze in the time to implement it (no promises, but the motorcycle season is over). However, I'm unsure about where the proper way to implement it. The cleanest place would seem to be to have it in the Group parameters. But I don't know if this would allow me to set the address for whole ranges of mail and news groups (like the example below). So, I dunno... - Steinar -----------Custom address code------------------------ (defun custom-organization-and-sender () "Set custom organization, and sender on some news groups" (cond ((or (string-match "nnml:mail.private" gnus-newsgroup-name) (string-match "nnml:folk/.*" gnus-newsgroup-name) (string-match "nnml:hobby/.*" gnus-newsgroup-name) (string-match "nnmh:folk/.*" gnus-newsgroup-name) (string-match "nnmh:hobby/.*" gnus-newsgroup-name) (string-match "no.alt.motorsykler" gnus-newsgroup-name) (string-match "nordunet.rec.motorcycles" gnus-newsgroup-name) (string-match "rec.motorcycles" gnus-newsgroup-name) (string-match "rec.aviation.military" gnus-newsgroup-name) ) (progn (make-variable-buffer-local 'message-user-organization) (make-variable-buffer-local 'user-mail-address) (make-variable-buffer-local 'message-syntax-checks) (setq message-user-organization "DoD, Norway Chapter") (setq user-mail-address "steinar@bang.priv.no") (setq message-syntax-checks (list '(sender . disabled))) )) ((string-match "no.test" gnus-newsgroup-name) (progn (make-variable-buffer-local 'message-user-organization) (make-variable-buffer-local 'user-mail-address) (setq message-user-organization "Testers Inc.") (setq user-mail-address "steinar@bang.priv.no") )) ))