Gnus development mailing list
 help / color / mirror / Atom feed
From: Steinar Bang <sb@metis.no>
Subject: New feature request: "faked" identity, and supercede
Date: 29 Oct 1996 18:45:04 +0100	[thread overview]
Message-ID: <whvibt3brz.fsf@norne.metis.no> (raw)

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")
	   ))
	))


             reply	other threads:[~1996-10-29 17:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-29 17:45 Steinar Bang [this message]
1996-10-29 22:30 ` Edward J. Sabol
1996-10-29 22:47   ` Lars Magne Ingebrigtsen
1996-11-05 21:16 ` Lars Magne Ingebrigtsen
1996-11-06  7:30   ` Steinar Bang
1996-11-06  8:58     ` Lars Magne Ingebrigtsen
1996-11-06 11:37       ` Steinar Bang
1996-11-06 22:00         ` Lars Magne Ingebrigtsen
1996-11-07  8:01           ` Steinar Bang
1996-11-09  4:51             ` Lars Magne Ingebrigtsen
1996-11-09 15:13               ` Steinar Bang
1996-11-09 17:33                 ` David Moore
1996-11-09 18:35                   ` Steinar Bang
1996-11-09 20:24                     ` Hrvoje Niksic
1996-11-10  6:45                       ` Steven L Baur
1996-11-06 19:04     ` Sten Drescher
1996-11-08 19:05       ` Steinar Bang
1996-11-08 20:50         ` Steven L Baur
1996-11-09 21:36           ` Mark Eichin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=whvibt3brz.fsf@norne.metis.no \
    --to=sb@metis.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).