#### 3.5.2.6 Controlling Header Display ¶

To control which headers in the message should be displayed, `mail` keeps two lists: a retained header list and an ignored header list. If retained header list is not empty, only the header fields listed in it are displayed when printing the message. Otherwise, if ignored header list is not empty, only the headers not listed in this list are displayed. The uppercase variants of message-displaying commands can be used to print all the headers.

The following commands modify and display the contents of both lists.

Mail command: discard [header-field-list] ¶
Mail command: di [header-field-list] ¶
Mail command: ignore [header-field-list] ¶
Mail command: ig [header-field-list] ¶

  Add header-field-list to the ignored list. When used without arguments, this command prints the contents of ignored list.

Mail command: retain [header-field-list] ¶
Mail command: ret [header-field-list] ¶

  Add header-field-list to the retained list. When used without arguments, this command prints the contents of retained list.