Gnus development mailing list
 help / color / mirror / Atom feed
* New feature request: "faked" identity, and supercede
@ 1996-10-29 17:45 Steinar Bang
  1996-10-29 22:30 ` Edward J. Sabol
  1996-11-05 21:16 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 19+ messages in thread
From: Steinar Bang @ 1996-10-29 17:45 UTC (permalink / 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")
	   ))
	))


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~1996-11-10  6:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-29 17:45 New feature request: "faked" identity, and supercede Steinar Bang
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

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