GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mail   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index

3.5.3 Saving and Recording

Several commands discussed in the previous section save messages in a disk file. The name of that file is either obtained from the record variable (recording mail) or is derived from the first recipient of the message (saving by name).

The following commands record mails:

The following commands save mail by name:

Saving mail by name is controlled by three mail variables: outfolder, folder, and outfilename. The first, outfolder, is a boolean variable which, when set, enables saving mail by name. The folder variable defines a directory where mail files are stored. Name of file in that directory where the message will be saved is derived from the message recipient2. This process is controlled by the outfilename variable: if its value is ‘local’, the file is named by the local part of the email (this is the default). If it is ‘domain’, the domain part is used instead. Finally, if it’s value is ‘email’, the entire email is used.

As a GNU extension, outfolder can be a string variable. In that case its value names the directory to use instead of folder.

The mailx variable, if set, disables GNU extensions. In this case, outfolder is used as a boolean value, and file names are derived from the local part of the email, ignoring the outfilename value.

Footnotes

(2)

In case of Copy and Save, message sender is used instead

GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mail   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index