Deflexion.com blog >> 

[Infinite Ink logo]
pine

CHANGING YOUR FROM
HEADER IN PINE

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright © Nancy McGough & Infinite Ink
Last modified 02-May-2005

MetaNote   I created this page a long time ago -- before Pine 4 -- when it was very painful to change your From header in Pine. Nowadays it is not as painful but it is still not obvious how to do it. Rather than rewrite this entire page, which I would do if I had infinite time, I have split it into two sections called Quick Start and Gory Details. The Quick Start describes how to change your From header in recent versions of Pine. The Gory Details describes what a From header is, when you should and shouldn't change it, how to get a free or reasonably-priced alternate From address, and how to change your From address in older versions of Pine.

 

“How do I change my From header?” is the most frequently asked question in Pine discussion groups. This page covers . . .

 

 On This Page 

 

 

Quick Start

Note     Some service providers, for example Grex, have set up their installation of Pine so that users cannot change their From header.

 SUPPORT INFINITE INK! 

The Solution for PC-Pine

If you are using any version of PC-Pine, specifying your From header is easy. Simply start PC-Pine, go to Main > Setup > Config and set your personal-name, user-id, and user-domain variables. Your default From header will then be

From: personal-name <user-id@user-domain>

   

The Best Solution for Unix Pine: Use a Role

 

Why the PC-Pine Solution Doesn't Work for Unix Pine: The Missing user-id Variable

In Unix Pine, your Pine user-id variable defaults to be your Unix login name and it is not possible to change it on Pine's Main > Setup > Config screen. It is because of this missing user-id variable that the question “How do I change my From header” is so frequently asked and I, and many others, have created web pages answering this question.

 

Why Using a Role is the Best Solution for Unix Pine

Using a role is the best solution for two reasons.

  1. It is easier than messing around with expose-hidden-config, allow-changing-from, default-composer-hdrs, and customized-hdrs.

  2. If you ever want to use multiple roles, you will already have one of your roles set up.

 

Roles

Roles were introduced in Pine 4.10, which was released on 4 February 1999. If your system is using Pine 4.05 or earlier, please ask your system administrator to upgrade to the current Pine (4.63) so you can 1] use roles, 2] take advantage of all the other features that have been added since then, and 3] avoid the vulnerabilities that are in earlier versions of Pine and Pico. If you can't convince your system administrator to upgrade and you are using Unix Pine 3.96 or earlier, you need to follow the instructions in the penultimate section of this page. If you are using Unix Pine 4.0 through 4.05, you need to use the customized-hdrs variable and the allow-changing-from hidden feature to change your From header.  

 

Creating an “Always Use!” Role

To set up a role, go to Main > Setup > Rules > Roles > Add by typing:

   M S R R A
You will see a screen that looks like this:
  PINE 4.63   ADD A ROLE RULE
Nickname        = <NO Value Set: using "Alternate Role">
To pattern      = <NO Value Set>
From pattern    = <NO Value Set>
Sender pattern  = <NO Value Set>
Cc pattern      = <NO Value Set>
News pattern    = <NO Value Set>
Subject pattern = <NO Value Set>
Recip pattern   = <NO Value Set>
Partic pattern  = <NO Value Set>
AllText pattern = <NO Value Set>
Score interval  = <NO Value Set>

Current Folder Type =
            Set    Choose One
            ---  --------------------
            ( )  Any
            ( )  News
            (*)  Email
            ( )  Specific
                 Folder List = <NO Value Set>

Message is Important? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is New? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is Deleted? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is Answered? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Initialize settings using role : <NO Value Set>
Set From        = <NO Value Set: using "default (Nancy McGough <wrong@incorrect.com>)">
Set Reply-To    = <NO Value Set>
Set Fcc         = <NO Value Set: using "value from fcc-name-rule">
Set LiteralSig  = <NO Value Set>
Set Signature   = <NO Value Set: using "default (.signature)">   
Set Template    = <NO Value Set>
Set Other Hdrs  = <NO Value Set>

Reply Use       =
            Set    Choose One
            ---  --------------------
            ( )  Never
            (*)  With confirmation
            ( )  Without confirmation

Forward Use     =
            Set    Choose One
            ---  --------------------
            ( )  Never
            (*)  With confirmation
            ( )  Without confirmation

Compose Use     =
            Set    Choose One
            ---  --------------------
            (*)  Never
            ( )  With confirmation
            ( )  Without confirmation

? Help       E Exit Setup   P Prev   - PrevPage A Add Value  % Print
O OTHER CMDS C [Change Val] N Next Spc NextPage D Delete Val W WhereIs

 

To set up a role that Pine will (almost) always use for both mail and news messages, including when you compose a new message, reply to a message, or forward a message, you need to edit the six lines that are displayed in bold red text below.

 

  PINE 4.63   ADD A ROLE RULE
Nickname       = Always Use!
To pattern      = <NO Value Set>
From pattern    = <NO Value Set>
Sender pattern  = <NO Value Set>
Cc pattern      = <NO Value Set>
News pattern    = <NO Value Set>
Subject pattern = <NO Value Set>
Recip pattern   = <NO Value Set>
Partic pattern  = <NO Value Set>
AllText pattern = <NO Value Set>
Score interval  = <NO Value Set>

Current Folder Type =
            Set    Choose One
            ---  --------------------
            (*)  Any
            ( )  News
            ( )  Email
            ( )  Specific
                 Folder List = <NO Value Set>

Message is Important? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is New? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is Deleted? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is Answered? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Initialize settings using role : <NO Value Set>
Set From       = Nancy McGough <nm-reverse-spam-filter@ii.deflexion.com>
Set Reply-To    = <NO Value Set>
Set Fcc         = <NO Value Set: using "value from fcc-name-rule">
Set LiteralSig  = <NO Value Set>
Set Signature   = <NO Value Set: using "default (.signature)">   
Set Template    = <NO Value Set>
Set Other Hdrs  = <NO Value Set>

Reply Use       =
            Set    Choose One
            ---  --------------------
            ( )  Never
            ( )  With confirmation
            (*)  Without confirmation

Forward Use     =
            Set    Choose One
            ---  --------------------
            ( )  Never
            ( )  With confirmation
            (*)  Without confirmation

Compose Use     =
            Set    Choose One
            ---  --------------------
            ( )  Never
            ( )  With confirmation
            (*)  Without confirmation

? Help       E Exit Setup   P Prev   - PrevPage A Add Value  % Print
O OTHER CMDS C [Change Val] N Next Spc NextPage D Delete Val W WhereIs

 

You can set Nickname to be anything you like and of course you should Set From to be your From header not mine!

To exit the roles configuration screens and save your changes, type

   E Y E Y

which means Exit this role (E), commit the changes (Y), Exit the roles configuration screen (E), and commit all your role changes (Y). Now, assuming this is your only role, (almost) every message you send will have the From header that you specified in your "Always Use!" role. Before you put this into production, test it by replying to, forwarding, and composing a new message and make sure that you are in fact using this From header.

 

Tips for Role Playing

To learn how to set up multiple roles and how to have Pine automatically determine which role to use depending on the context, read Pine's built-in Help files and see

Here are some tips for using roles:

  1. IMPORTANT:  Pine will not use one of your roles, but instead will use your default From header if you send a message using any of the following:
    • a mailto URL
    • a command-line command such as this:  pine someone@example.com
    • No, use default settings” (before Pine 4.55, this was called “No Role”)
    • Pine's Bounce Forward command (for details, see Tip 6 below)

    To change your default From header, see Specifying Your Default From Header below.

  2. Add all your email addresses to the Pine alt-addresses variable so that reply-to-all won't prompt you to reply to yourself; so that a message that is either To or Cc any of your addresses is flagged with a + or -; and so that the Index-to-me Symbol Color, which is set using Main > Setup > Kolor, and the Pine FROMORTO and FROMORTONOTNEWS tokens, which are used to construct the index-format on the Message Index screen, work correctly.

  3. If you are using Pine 4.30 or later, put an  X  next to alternate-compose-menu in your Pine feature-list. Then, when you use the  C  (Compose) command to initiate the composition of a new message, Pine will present a menu asking if you want to compose an interrupted message, a postponed message, a form letter, a new message using your default role, or a new message using a non-default role.

  4. To be able to easily confirm or change your role when you initiate the composition of a message:
    1. set confirm-role-even-for-default

    2. set up your roles so that Reply Use, Forward Use, and Compose Use all use this option:
      (*)  With confirmation

  5. If you want to quickly choose a role and avoid the prompts that Tip 3 and 4 produce, use the  #  (Role) command instead of the  C  (Compose) command to initiate the composition of a message.

  6. To be able to use the Role (#) command and be prompted about whether to compose a new message, reply to the current message, forward the current message, or bounce forward a message, set alternate-role-menu. For details, especially about how roles works when bouncing, see the Pine Help about the alternate-role-menu. Note: You need to be using Pine 4.61 or later to be able to use a role when bouncing a message.

  7. Follow the instructions below to add From to your default-composer-hdrs Variable so that you can easily see if you are using the From header you want to be using while you are in the midst of composing a message.

  8. Read the message RE: 'sender'-checks by mailservers that I posted to the pine-info mailing list to find out about the Sender, X-Sender, and X-X-Sender headers that Pine inserts in messages that you send. These headers make it hard to hide your personal private email address in messages that you send.

News:  In Pine 4.51 and later, you can set the features disable-sender and scramble-message-id to help hide your personal private email address. In Pine 4.60 and later, you can set hide-nntp-path to help hide the hostname of your machine.


Gory Details

 

What is a From Header and Where Do Replies Go

Terminology
Note
   

An email message has two From addresses:

  • the From address in the envelope
  • the From address in the header

The From address in the header is in a line that begins with  From:. When a message is delivered to a mailbox, the envelope information is often — but not always — discarded. Depending on the message transfer agent (MTA), the message delivery agent (MDA), and the mailbox format, the From address in the envelope may be injected into the header of the message in a line that begins with From  (note the lack of a colon). This line is referred to as the  “mbox-format 'From ' line”  or the  “From_ line.”

In this article, whenever I use the phrase “From header,” I mean the header that begins with  From:  (with the colon).


Your From header tells the recipient of your message who the message is from, or who you are pretending it is from. It is a required header and it should look like one of the following.

From Header Format   Comment
From: personal-name <user-id@user-domain>   preferred
From: user-id@user-domain (personal-name)   deprecated for over 25 years
From: user-id@user-domain   if there's no personal-name, spam-detection tools often increase the spam probability or spam score

 

The first format is preferred and is the format that Pine uses when constructing a message. The email address in the From header is not necessarily where a reply to a message goes. This depends on what other headers are in the message, what messaging client the replier is using, and whether the replier chooses to reply to the author, reply to all, or reply to a subset of all. Here are the headers that are used — in some clients — to determine where a reply goes.

Reply to...   Headers Used to Determine Where Reply Goes
reply to author   Reply-To  or  From
reply to all (email discussion group)   Mail-Followup-To  or  [To, Cc, & author (see previous)]
reply to all (news discussion group)   Followup-To  or  Newsgroups

 

When you use Pine to reply to a message, you can tell Pine to notify you about the existence of a Reply-To header and let you choose whether to use the Reply-To or the  From address by unsetting the feature reply-always-uses-reply-to. This is especially useful when the Reply-To address is set to a mailing list and you want to send a personal (private) reply to the author. Unsetting this feature is one of my 26 favorite Pine feature settings.

There is a raging debate about the proper use of the Reply-To header, especially its use/misuse in mailing-list messages. To find out about the debate, and join in if you like, see

Mail-Followup-To (AKA MFT) is a proposed header that is not an Internet standard and is not supported by most messaging clients, including the militantly standards-compliant Pine. Its purpose is to help to make email discussion groups more like news groups and encourage people to reply to the group, while still giving the option of replying to the author's personal Reply-To address. You can set the Mail-Followup-To header in outgoing Pine messages by adding it to your customized-hdrs and, optionally, your default-composer-hdrs variables (instructions for both of these headers are below). Then, when you compose a message, fill in this header by hand.

Another option is to create a role (see above) for each mailing list that you subscribe to and set the From, To, and Mail-Followup-To headers in the role. Here's what I use in my pine-info mailing-list role:

Set From        = Nancy McGough <nm-this-address-is-valid@no.sp.am>
Set Other Hdrs  = To: Pine Technical Discussion Forum <pine-info@u.washington.edu>
                  Mail-Followup-To: Pine Technical Discussion Forum <pine-info@u.washington.edu>

Whenever I reply to or compose a new message to the pine-info mailing list, I use the this role. This way people who are using a client that supports the Mail-Followup-To header, such as mutt, nmh, or gnus, will know that I would like a reply-to-all message to be sent to the list address.

The Mail-Followup-To header is quite controversial and is discussed in

 

Do Not Use a Forged or Bogus From Header

These days many people use a bogus From header when posting to a public forum. The intended goal is to prevent harvesters of email addresses from getting valid email addresses to add to junk mailing lists. But doing this infuriates people -- for example, me -- who try to send a legitimate response to your post. My advice is to never send a message that has a bogus From header. Instead, I recommend that you get an alternate email address (discussed below) that you use for public postings and then use this address, along with filters, to help you separate spam from non-spam.

Another way to make people mad at you is to use someone else's email address in your From header. If you do this (forgery), even as a joke, the fury of the Net may be unleashed on you. You could be mail bombed, subscribed to lots of mailing lists you don't want to be on, lose your account, and other unpleasant things.

Do not underestimate the power of the people who are trying to maintain email address integrity on the Net!

 

If You Insist on Using a Bogus From Header

If you insist on using a bogus From header, use an address that does not now exist and will never exist in the future. For example, you could use...

Another option is to use a me@privacy.net stealth address, which auto-replies to any email sent to it with a message that says: “The user who provided this address did not want you to have his/her e-mail address in an effort to try to prevent receiving unwanted e-mail and/or keep their identity private.”

For more about this, see these comp.mail.pine threads:


 

Good Reasons for Changing Your From Header

Good reasons for changing your From header include

 

Getting Alternate Email Addresses & IMAP-Accessible Mailboxes

As I discuss above in Do Not Use a Forged or Bogus From Header, I recommend that you use alternate email addresses in public places, such as on your web site and when you post to a public discussion group. And then use filters, along with these addresses, to help you separate spam from non-spam. There are many reasonably-priced and free email accounts that you can use for this purpose. If you use a service that supports IMAP, you can use Pine to read and process messages sent to that account.

 

IMAP service providers
are now listed on a separate page

 

 

Specifying Your Default From Header

As I discuss above, Pine constructs a From header that looks like this:

From: personal-name <user-id@user-domain>

Depending on your needs, you may be able to specify your default From header using the personal-name and the user-domain (and in PC-Pine, the user-id) variables or you might need to use the allow-changing-from feature and the customized-hdrs variable. These are described below.

 

Using the personal-name and user-domain Variables

In Unix Pine, your personal-name defaults to the full name that is specified in your /etc/passwd entry. On many Unix systems you can change your full name by using the chfn (change finger) command.

Your user-id defaults to your login name and your user-domain defaults to either the name of the machine that you are logged on to or to the default user-domain that your system administer specified.

In Unix Pine, you can change your personal-name or user-domain by setting these variables in the Pine Setup Configuration screen. You can not set the user-id variable in Unix Pine.

In PC-Pine, you set all three of these variables — personal-name, user-id, and user-domain — in the Pine configuration screen.

 

Using the customized-hdrs Variable and the allow-changing-from Hidden Feature

If you are using Unix Pine version 4.0 to version 4.21 and you need to change your default user-id, you need to add allow-changing-from to your feature-list. This is a hidden feature and does not show up in the Pine configuration screen. To set it, you need to directly edit your pinerc file (which defaults to .pinerc in Unix pine and pinerc in PC-Pine). There must be a comma between features in your feature-list and there cannot be any blank lines. For example, here's the top and bottom of my feature-list:

 feature-list=expose-hidden-config,
         enable-aggregate-command-set,
         enable-flag-cmd,
         :
         :
         enable-msg-view-urls,
         enable-msg-view-web-hostnames,
         allow-changing-from

Important    

In addition to adding allow-changing-from to your feature-list, you need to specify your default From address in the customized-hdrs variable. Edit this variable by using either Pine's Setup Configuration screen or by directly editing your pinerc. Here's an example of what this variable will look like in your pinerc:

customized-hdrs=From: AnyPersonalName <AnyUserID@AnyDomain>,
 Organization: Your Company Name and URL
					

Only non-blank headers that are in your customized-hdrs list will be included in your outgoing messages. If you want to view, and possibly edit, these headers when you are composing a message, you need to either type ^R (view rich headers) or include these headers in your default-composer-hdrs. The default-composer-hdrs variable is discussed in the next section.

 

Changing Your From Header On the Fly

If you use more than one From header, you will probably want to make the one you use the most frequently your default and then specify your alternate From header on the fly. The two ways to do this are 1) to directly edit your From header when you are composing a message or 2) to set up the alternate From header as part of one of your alternate roles. These are discussed below.

 

Using the default-composer-hdrs Variable

To view your From header -- and possibly edit it -- while you are composing a message, add the hidden feature allow-changing-from to your feature list and add From to your default-composer-hdrs variable. For example, here's what I use for my default-composer-hdrs:

default-composer-hdrs=From,
 Lcc,
 Attchmnt,
 Organization,
 Fcc,
 Newsgroups,
 To,
 Cc,
 Bcc,
 Subject

These are the headers that will be displayed when you are composing a message. You can view these, along with other headers, by by typing ^R to view rich headers. You can edit any of these headers while you are composing a message.

Tip    

Add each of your alternate From addresses to your address book and then type the address-book nickname for the alternate address that you want to use in your From header. When you press RETURN, TAB, or an arrow key the nickname will be expanded to the full address.

 

Using Roles

Starting with Pine 4.10, you can use a role to compose a message that uses an alternate Fcc, Signature, Template, From, Reply-To, and other headers. To change your From header using a role, you do not need to set the allow-changing-from hidden feature. I describe how to set up a role at the top of this page.

 

Changing Your From Header in Pine 3.96 and Earlier Versions

Before Pine 4.0 it was much harder to change your From header. Details are below.

 

Unix Pine 3.96 and Earlier

There are many ways to change your From header in Unix Pine 3.96 (and earlier). Below are four possibilities.

  

PC-Pine 3.96 and Earlier

Below are two possibilities for how to change your From header in PC-Pine (Pine for DOS, Windows and NT).

 


See Also

 


Changing Your From Header in Pine
<http://www.ii.com/internet/messaging/pine/changing_from/>
Copyright © Infinite Ink & Nancy McGough

 
updated 29-Mar-2004
tweaked 02-May-2005