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

3.5.2.14 Replying

Mail command: mail [address...]
Mail command: m [address...]

Switches to compose mode. After composing the message, sends it to the specified addresses.

If the record variable is set, the composed message will be saved in the folder named by it.

Mail command: Mail [address...]
Mail command: M [address...]

Same as mail, but the name of the file to save the composed message is derived from its first recipient as outlined below.

If the outfolder variable is set, and has a string value s, the filename is s/recipient. If it is a boolean, then the folder variable is consulted. If it is set, then the filename is folder/recipient. Otherwise, the message will not be saved.

The value recipient is derived from the email of the first recipient of the message. By default it is a local part of that email. If the outfilename variable has the value ‘domain’, the domain part of the email is used. If this variable is set to ‘email’, then entire email address is used.

See saving mail by name, for a detailed discussion.

Mail command: reply [message]
Mail command: respond [message]
Mail command: r [message]

Mail a reply message to all recipients included in the header of the message. The subject header is formed by concatenating the value of the replyprefix variable and the subject from the message. If record is set to a filename, the response is saved at the end of that file.

Mail command: Reply [msglist]
Mail command: Respond [msglist]
Mail command: R [msglist]

Mail a reply message to the sender of each message in the msglist. The subject header is formed by concatenating the value of the replyprefix variable and the subject header of from the first message in msglist. If record is set to a filename, the response is saved at the end of that file.

Notice, that setting mail variable flipr (see Mail Variables) swaps the meanings of the two above commands

Mail command: followup [message]
Mail command: fo [message]

Respond to message, recording the response in a file whose name is derived from the author of the message. See saving mail by name, for a discussion of how the file name is selected.

Mail command: Followup [msglist]
Mail command: F [msglist]

Same as Reply, but the response is saved in a file whose name is derived from the author of the first message. See saving mail by name, for a detailed discussion of how the file name is selected.

By default, mail will preserve personal email parts when forming lists of recipient addresses. If this is not desired, unset the fullnames variable (see fullnames).

To determine the sender of the message mail uses the list of sender fields (see Controlling Sender Fields). The first field from this list is looked up in message headers. If it is found and contains a valid email address, this address is used as the sender address. If not, the second field is searched and so on. This process continues until a field is found in the headers, or the sender field list is exhausted, whichever happens first.

If the previous step did not determine the sender address, the address from SMTP envelope is used.

Let’s illustrate this. Suppose your mailbox contains the following:

 U  1 block@helsingor.org  Fri Jun 30 18:30  8/245    Re: The Sa
? Print 1
From: Antonius Block <block@helsingor.org>
To: Smeden Plog <plog@helsingor.org>
Date: Tue, 27 Apr 2004 13:23:41 +0300
Reply-To: <root@helsingor.org>
Subject: News

Hi

Now, you issue the following commands:

? sender mail-followup-to reply-to from
? reply
To: <root@helsingor.org>
Subject: Re: News

As you see, the value of Reply-To field was taken as the sender address.

Now, let’s try the following command sequence:

# Clear the sender list
? nosender
# Set new sender list
? sender From

Now, the From address will be taken:

? reply
To: Antonius Block <block@helsingor.org>
Subject: Re: News

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