Subject: Automatic from: fields

From: "Allan Crooks" <[email-masked]>
Date: Mon, 22 Oct 2001 20:49:47 +0100

Hi,

Just a quick question.

Does Pine have a facility where it recognises what e-mail address 
the message was sent to, and automatically sets the From: field to 
the address it was sent to?

Thanks,
Allan.
-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: "Allan Crooks" <[email-masked]>
Date: Mon, 22 Oct 2001 23:26:01 +0100

Thanks for the response, however, my understanding is that a role 
needs to be setup for each e-mail address...

I own a single domain, and all e-mail sent to it gets routed to my 
account. I was just wondering if Pine could automatically detect 
what address it was sent to, and then rewrite the From: field, rather 
than having to setup Roles for every possible combination....

Or maybe I should stop being so greedy and just do it manually... 
:))

Allan.

On 22 Oct 2001, at 16:11, Gopi Sundaram wrote:

> On Mon, 22 Oct 2001, Allan Crooks wrote:
> 
> FAQ.
> (M)ain (S)etup (R)ules (R)oles and read the help.
> 
> http://www.cse.sc.edu/~gopalan/Pine/roles.html
> 
> -- 
> Gopi Sundaram
> [email-masked]
> http://www.cse.sc.edu/~gopalan/Pine/
>

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 22 Oct 2001 19:50:26 -0700 (PDT)

*** Allan Crooks ([email-masked]) wrote in the pine-info list...:

:) Thanks for the response, however, my understanding is that a role
:) needs to be setup for each e-mail address...
:)
:) I was just wondering if Pine could automatically detect what address it
:) was sent to, and then rewrite the From: field, rather than having to
:) setup Roles for every possible combination....

The problem is that the To: field may contain more than one address, so
you can never really set the From: field to be the To: field of the
original message. In another words, you need a rule that says "if the To:
field contains this address, then use the same address in the From:
field", and that is one of the things that Roles does for you. Regardless
of the mehanism that you use for doing this, it will always be equivalent
to using Roles, so you better use Roles.

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Jacob Morzinski <[email-masked]>
Date: Tue, 23 Oct 2001 01:11:26 -0400

Eduardo Chappa wrote:

> original message.

I caution you that you may need to re-check your assumptions, or may
need to pick a different rationale for your answer.  The From: and
Reply-To: fields have always been allowed to contain more than one
address -- this is quite explicitly stated in both RFC 822 and 2822.
(I'll copy the relevant excerpt of RFC 2822 at the end of this message.)

It is true that some mail clients have problems when they encounter
multi-address originator fields, because they assumed that those fields
could only contain a single address, but I had thought that Pine would
have dealt with the situation acceptably.

Regards,
 Jacob Morzinski                                [email-masked]

====================== RFC 2822, Section 3.6.2: ======================

3.6.2. Originator fields

   The originator fields of a message consist of the from field, the
   sender field (when applicable), and optionally the reply-to field.
   The from field consists of the field name "From" and a
   comma-separated list of one or more mailbox specifications.  If the
   from field contains more than one mailbox specification in the
   mailbox-list, then the sender field, containing the field name
   "Sender" and a single mailbox specification, MUST appear in the
   message.  In either case, an optional reply-to field MAY also be
   included, which contains the field name "Reply-To" and a
   comma-separated list of one or more addresses.

from            =       "From:" mailbox-list CRLF

sender          =       "Sender:" mailbox CRLF

reply-to        =       "Reply-To:" address-list CRLF

   The originator fields indicate the mailbox(es) of the source of the
   message.  The "From:" field specifies the author(s) of the message,
   that is, the mailbox(es) of the person(s) or system(s) responsible
   for the writing of the message.  The "Sender:" field specifies the
   mailbox of the agent responsible for the actual transmission of the
   message.  For example, if a secretary were to send a message for
   another person, the mailbox of the secretary would appear in the
   "Sender:" field and the mailbox of the actual author would appear in
   the "From:" field.  If the originator of the message can be indicated
   by a single mailbox and the author and transmitter are identical, the
   "Sender:" field SHOULD NOT be used.  Otherwise, both fields SHOULD
   appear.

---

From: "Allan Crooks" <[email-masked]>
Date: Wed, 24 Oct 2001 14:44:49 +0100

On 22 Oct 2001, at 19:50, Eduardo Chappa wrote:

> The problem is that the To: field may contain more than one address,
> so you can never really set the From: field to be the To: field of the
> original message. In another words, you need a rule that says "if the
> To: field contains this address, then use the same address in the
> From: field", and that is one of the things that Roles does for you.
> Regardless of the mehanism that you use for doing this, it will always
> be equivalent to using Roles, so you better use Roles.

If I were able to rewrite messages so that the time it reached Pine, 
there was some header ("X-Addressed-To" or something similar) in 
the message that should be used as the From: field in a reply 
message, it might be easier. But can Pine do this (not the 
rewriting, but extracting the contents of the header and placing it in 
the from field.

Another idea I've had is to rewrite the message headers, but have 
Pine send replies with one of the headers intact from the initial 
message (so it would have "X-Addressed-To:[email-masked]" on 
the incoming message and the outgoing message), and get the 
message to be rewritten on the way out.

Are either of these two options possible?
Allan.

---

From: Mats Dufberg <[email-masked]>
Date: Thu, 25 Oct 2001 22:31:52 +0200 (CEST)

> address -- this is quite explicitly stated in both RFC 822 and 2822.

That is correct. Given that, pine should accept multiple addresses in
reply-to. It does when you add it by hand, but it doesn't when you set up
a role for some reason...

Mats

-----------------------------------------------------------------
Mats Dufberg                                 [email-masked]
Blåarvsgränd 42                                    +46-8-38 48 59
SE-162 45 Vällingby, Sweden                       +46-70-258 2588