PCSC
Boston University
 

Working with attachments in pine

Pine is a popular text-based e-mail program available on the ACS cluster which supports the viewing and saving of text and graphical attachments.

You generally must be connected to ACS with an X-Windows connection to view graphical attachments through Pine. The attachment must also be in a format supported by the ACS UNIX system. Files which are in an unsupported format may need to be saved to your account and then transferred to a personal computer before you can view them. For example, while you will be able to view most picture files directly through Pine on ACS, attachments created in Microsoft Office will need to be saved to your ACS home directory and transferred to a PC on which Microsoft Office is installed before you can view them.

When you receive an attachment in Pine, at the end of the corresponding e-mail you will see a message that looks similar to the following text:

[ Part 2, Image/JPEG  47KB. ]
[ Not Shown. Use the "V" command to view or save this part. ]

This text explains what type of file and how large the attachment is. In this example, the attachment (labeled Part 2) is a JPEG or picture file and its size is 47KB. [Note: Part 1 is the text of the e-mail itself, not an attachment.]

If you are on an X-Windows connection you can view this attachment simply by pressing "v" twice.

X-Win32 is an X Windows emulator licensed by BU. If you have a PC running Microsoft Windows, then X-Win32 allows you to run X-based applications on a remote UNIX system. If you are using a Mac with OS X, you would use X Windows for OS X.

If you are not running X Windows, then you can save the attachment on your ACS account and download it to your PC or Mac using an FTP program. You may then access it from a PC or Mac. The remainder of this page describes the process for saving an attachment so you can transfer it to your PC or Mac.

Step 1: Saving from the Attachment Index

Some messages have more than one attachment and the index allows you to select the one(s) you want to save. To view the attachment index you can press “V” or ‘>’ (this ViewAttach option is shown on the command list at the bottom of the Pine window, as seen below.)

? Help       < MsgIndex   P PrevMsg       - PrevPage D Delete     R Reply

O OTHER CMDS > ViewAttch  N NextMsg     Spc NextPage U Undelete   F Forward

 The following text is a sample attachment index with the JPEG attachment file selected:

1    13 lines   Text/PLAIN (charset: ISO-8859-1 "Latin 1 (Western Europe)")

2    35 KB      Image/JPEG

Use the arrow keys on your keyboard to select the attachment you want to save. Again, the text of the e-mail that accompanied the attachment is listed as attachment #1. Be sure that you scroll down to the appropriate attachment before proceeding.

When you have selected the attachment you want, press “S” to save it (this Save option is shown on the command list at the bottom of the Pine window, as seen below.)

? Help       < Msg #1007  P PrevAttch     - PrevPage D Delete     S Save

O OTHER CMDS > [View]     N NextAtch    Spc NextPage U Undelete   E Export


You then press the Return key (‘Ret’ in command list) to ‘Accept’ the file name. You can change the file name before you press the Return key if you’d like. You may need to edit the file name if it contains any characters such as ‘/’ or ‘,’ that are not recommended.

SAVE: Copy attachment to file in home directory: SampleJPEGattachment.jpg

^G Help      ^T To Files  TAB Complete

^C Cancel    Ret Accept

After you press the Return key (Ret), you will see a message similar to the one that appears below. Some of the information will be different, for example your BU login name will appear where the message below shows “yourloginname”. This message confirms that the attachment has been save to your home directory.

[Part 2, 47KB written to "/home/server/yourloginname/SampleJPEG.jpg"]

Step 2: Exiting the Attachment Index

 To exit the attachment index and return to the e-mail message, press the < key (‘Msg #’ in command list) on your keyboard. 

? Help       < Msg #1007  P PrevAttch     - PrevPage D Delete     S Save

O OTHER CMDS > [View]     N NextAtch    Spc NextPage U Undelete   E Export

Step 3: Using FTP

The attachment file has been saved to your home directory and you can now use an FTP program to retrieve and view it on a PC or Mac.

For more information on obtaining and using FTP programs, please visit www.bu.edu/pcsc/ftp.