Gnus development mailing list
 help / color / mirror / Atom feed
* Followup to names with commas
@ 1999-01-08 23:02 Anders Melchiorsen
  1999-01-09 15:38 ` Kai.Grossjohann
  1999-01-09 15:47 ` Alan Shutko
  0 siblings, 2 replies; 5+ messages in thread
From: Anders Melchiorsen @ 1999-01-08 23:02 UTC (permalink / raw)


I just received a mail with approximately the following To: header...

 To: "Melchiorsen, Anders" <and@campsax.dtu.dk>


The problem is that when I did a followup to the message (in Gnus
5.6.45), it included `"Melchiorsen' as a CC: recipient.

I can see that Gnus probably figures that "melchiorsen is a local
account and therefore adds it to the recipient list (due to me doing a 
followup instead of the reply I actually wanted to).

Is it illegal to include a comma in a To: field this way? (The quotes
are meant to escape it, I guess). It would not surprise me if it
indeed is illegal (it was sent from a MS product :-). However, if it
is legal, I think this is a bug in Gnus instead - and therefore I
wanted to report it.
-- 
Regards, Anders
(address is valid)


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

* Re: Followup to names with commas
  1999-01-08 23:02 Followup to names with commas Anders Melchiorsen
@ 1999-01-09 15:38 ` Kai.Grossjohann
  1999-01-09 15:51   ` Anders Melchiorsen
  1999-01-09 15:47 ` Alan Shutko
  1 sibling, 1 reply; 5+ messages in thread
From: Kai.Grossjohann @ 1999-01-09 15:38 UTC (permalink / raw)


Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:

  > I just received a mail with approximately the following To: header...
  > 
  >  To: "Melchiorsen, Anders" <and@campsax.dtu.dk>
  > 
  > The problem is that when I did a followup to the message (in Gnus
  > 5.6.45), it included `"Melchiorsen' as a CC: recipient.

See the variable mail-use-rfc822.

kai
-- 
Just because I'm paranoid doesn't mean they're not out there to get me!


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

* Re: Followup to names with commas
  1999-01-08 23:02 Followup to names with commas Anders Melchiorsen
  1999-01-09 15:38 ` Kai.Grossjohann
@ 1999-01-09 15:47 ` Alan Shutko
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Shutko @ 1999-01-09 15:47 UTC (permalink / raw)
  Cc: ding

>>>>> "A" == Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:

A> I just received a mail with approximately the following To:
A> header...  To: "Melchiorsen, Anders" <and@campsax.dtu.dk>

Iirc, that was a bug in rmail-dont-reply-to, and should be fixed in
recent Emacsen.  The patch probably didn't filter back to XEmacs.  Try
putting this somewhere and using it (current one from Emacs).  Someone
should probably mention this to the XEmacs people.

(defun rmail-dont-reply-to (userids)
  "Returns string of mail addresses USERIDS sans any recipients
that start with matches for `rmail-dont-reply-to-names'.
Usenet paths ending in an element that matches are removed also."
  (if (null rmail-dont-reply-to-names)
      (setq rmail-dont-reply-to-names
	    (concat (if rmail-default-dont-reply-to-names
			(concat rmail-default-dont-reply-to-names "\\|")
		        "")
		    (concat (regexp-quote (user-login-name))
			    "\\>"))))
  (let ((match (concat "\\(^\\|,\\)[ \t\n]*"
		       ;; Can anyone figure out what this is for?
		       ;; Is it an obsolete remnant of another way of
		       ;; handling Foo Bar <foo@machine>?
		       "\\([^,\n]*[!<]\\|\\)"
		       "\\("
			     rmail-dont-reply-to-names
		       "\\|"
		             ;; Include the human name that precedes <foo@bar>.
			     "\\([^\,.<\"]\\|\"[^\"]*\"\\)*"
			     "<\\(" rmail-dont-reply-to-names "\\)"
		       "\\)"))
	(case-fold-search t)
	pos epos)
    (while (setq pos (string-match match userids pos))
      (if (> pos 0) (setq pos (match-beginning 2)))
      (setq epos
	    ;; Delete thru the next comma, plus whitespace after.
	    (if (string-match ",[ \t\n]*" userids (match-end 0))
		(match-end 0)
	      (length userids)))
      ;; Count the double-quotes since the beginning of the list.
      ;; Reject this match if it is inside a pair of doublequotes.
      (let (quote-pos inside-quotes)
	(while (and (setq quote-pos (string-match "\"" userids quote-pos))
		    (< quote-pos pos))
	  (setq quote-pos (1+ quote-pos))
	  (setq inside-quotes (not inside-quotes)))
	(if inside-quotes
	    ;; Advance to next even-parity quote, and scan from there.
	    (setq pos (string-match "\"" userids pos))
	  (setq userids
		(mail-string-delete
		 userids pos epos)))))
    ;; get rid of any trailing commas
    (if (setq pos (string-match "[ ,\t\n]*\\'" userids))
	(setq userids (substring userids 0 pos)))
    ;; remove leading spaces. they bother me.
    (if (string-match "\\s *" userids)
	(substring userids (match-end 0))
      userids)))

-- 
Alan Shutko <ats@acm.org> - By consent of the corrupted
Love means nothing to a tennis player.


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

* Re: Followup to names with commas
  1999-01-09 15:38 ` Kai.Grossjohann
@ 1999-01-09 15:51   ` Anders Melchiorsen
  1999-01-10 16:34     ` Kai.Grossjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Anders Melchiorsen @ 1999-01-09 15:51 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:

> Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:
> 
>   > I just received a mail with approximately the following To: header...
>   > 
>   >  To: "Melchiorsen, Anders" <and@campsax.dtu.dk>
>   > 
>   > The problem is that when I did a followup to the message (in Gnus
>   > 5.6.45), it included `"Melchiorsen' as a CC: recipient.
> 
> See the variable mail-use-rfc822.

Thanks.

Kai, how do you remember all those variables and function names? :-).

-- 
Regards, Anders
(address is valid)


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

* Re: Followup to names with commas
  1999-01-09 15:51   ` Anders Melchiorsen
@ 1999-01-10 16:34     ` Kai.Grossjohann
  0 siblings, 0 replies; 5+ messages in thread
From: Kai.Grossjohann @ 1999-01-10 16:34 UTC (permalink / raw)


Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> writes:

  > Kai, how do you remember all those variables and function names? :-).

I was cheating.  I typed M-x apropos RET 822 RET because I remembered
part of the name.

Also see M-x apropos-documentation RET...

kai
-- 
Just because I'm paranoid doesn't mean they're not out there to get me!


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

end of thread, other threads:[~1999-01-10 16:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-08 23:02 Followup to names with commas Anders Melchiorsen
1999-01-09 15:38 ` Kai.Grossjohann
1999-01-09 15:51   ` Anders Melchiorsen
1999-01-10 16:34     ` Kai.Grossjohann
1999-01-09 15:47 ` Alan Shutko

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