Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* When replying, set From: to use the address where I received the email
@ 2015-08-27 17:03 Bastien
  2015-08-27 17:26 ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2015-08-27 17:03 UTC (permalink / raw)
  To: info-gnus-english

Hi Gnus,

when I receive an email to an address, I would like to use this
address as the From: header for the reply I send -- pretty much
the heuristic that notumch is using, provided that you tell it
what emails are yours.

Is it possible to do this with gnus ?

I don't want to use posting styles, because I use different email
addresses within the same group.

Thanks in advance for any hint!

-- 
 Bastien



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

* Re: When replying, set From: to use the address where I received the email
  2015-08-27 17:03 When replying, set From: to use the address where I received the email Bastien
@ 2015-08-27 17:26 ` Rasmus
  2015-08-27 18:16   ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-08-27 17:26 UTC (permalink / raw)
  To: info-gnus-english

Hi,

Bastien <bzg@gnu.org> writes:

> when I receive an email to an address, I would like to use this
> address as the From: header for the reply I send -- pretty much
> the heuristic that notumch is using, provided that you tell it
> what emails are yours.
>
> Is it possible to do this with gnus ?

Check: message-alternative-emails, message-dont-reply-to-names
gnus-ignored-from-addresses.

> I don't want to use posting styles, because I use different email
> addresses within the same group.

There is no such limitation with posting style.  It can take a function
that looks at whatever you want.

Rasmus

-- 
When the facts change, I change my mind. What do you do, sir?



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

* Re: When replying, set From: to use the address where I received the email
  2015-08-27 17:26 ` Rasmus
@ 2015-08-27 18:16   ` Bastien
  2015-08-28  6:22     ` Peter Münster
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2015-08-27 18:16 UTC (permalink / raw)
  To: Rasmus; +Cc: info-gnus-english

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

Hi Rasmus,

Rasmus <rasmus@gmx.us> writes:

> Check: message-alternative-emails, message-dont-reply-to-names
> gnus-ignored-from-addresses.

Thanks -- I was already using this, but it does not work when replying
to mailing lists since ‘message-use-alternative-email-as-from’ is only
using the "To" "Cc" "From" headers (this is hardcoded).

With the attached patch, things seem fine now.  But maybe there are
other headers to consider, or maybe using an option here would do?

Let me know,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: message.el.patch --]
[-- Type: text/x-diff, Size: 476 bytes --]

diff --git a/lisp/message.el b/lisp/message.el
index d780e86..ac43d04 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -8319,7 +8319,8 @@ regexp VARSTR."
 address in `message-alternative-emails', looking at To, Cc and
 From headers in the original article."
   (require 'mail-utils)
-  (let* ((fields '("To" "Cc" "From"))
+  (let* ((fields '("To" "Cc" "From"
+		   "X-Original-To" "Envelope-To" "Delivered-To"))
 	 (emails
 	  (split-string
 	   (mail-strip-quoted-names

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien



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

* Re: When replying, set From: to use the address where I received the email
  2015-08-27 18:16   ` Bastien
@ 2015-08-28  6:22     ` Peter Münster
  2015-08-28  9:06       ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2015-08-28  6:22 UTC (permalink / raw)
  To: info-gnus-english

On Thu, Aug 27 2015, Bastien wrote:

> Thanks -- I was already using this, but it does not work when replying
> to mailing lists since ‘message-use-alternative-email-as-from’ is only
> using the "To" "Cc" "From" headers (this is hardcoded).

You can use gnus-parameters for lists. Here some lines of my setup,
perhaps it can help:

--8<---------------cut here---------------start------------->8---
(setq
 pm/lists '((:name            "context.list"
             :list-identifier "\\[NTG-context\\]"
             :address         "ntg-context@ntg.nl")
             ....)
 pm/list-address     "pmlists@free.fr"
 gnus-parameters
 `(("^[^.]*$" (gcc-self . t) (display . [not expire]))
   ,@(cl-loop for item in pm/lists collect
           `(,(pm/str->regexp (plist-get item :name))
             (subscribed . t) (gcc-self . none) (display . default)
             (to-list . ,(plist-get item :address))
             (pm/role "list") (pm/language "en")
             (posting-style (address ,pm/list-address)
                            (eval (setq pm/role "list"
                                        pm/language "en"))
                            (To ,(plist-get item :address)))
             (gnus-list-identifiers ,(plist-get item :list-identifier))))
   ("nntp+.*" (pm/role "list") (pm/language "en")
    (posting-style (address ,pm/list-address)
                   (eval (setq pm/role "list" pm/language "en"))))))
--8<---------------cut here---------------end--------------->8---

-- 
           Peter


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: When replying, set From: to use the address where I received the email
  2015-08-28  6:22     ` Peter Münster
@ 2015-08-28  9:06       ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2015-08-28  9:06 UTC (permalink / raw)
  To: Peter Münster; +Cc: info-gnus-english

Peter Münster <pmlists@free.fr> writes:

> On Thu, Aug 27 2015, Bastien wrote:
>
>> Thanks -- I was already using this, but it does not work when replying
>> to mailing lists since ‘message-use-alternative-email-as-from’ is only
>> using the "To" "Cc" "From" headers (this is hardcoded).
>
> You can use gnus-parameters for lists. Here some lines of my setup,
> perhaps it can help:

Thanks, but I think setting `message-alternative-emails' should be
enough, with no complex setting.  I'll test my patch and formally
submit it in a month or so.

-- 
 Bastien

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, other threads:[~2015-08-28  9:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27 17:03 When replying, set From: to use the address where I received the email Bastien
2015-08-27 17:26 ` Rasmus
2015-08-27 18:16   ` Bastien
2015-08-28  6:22     ` Peter Münster
2015-08-28  9:06       ` Bastien

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