[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving sent mail

From: Sergey Poznyakoff
Subject: Re: Saving sent mail
Date: Mon, 08 Nov 2021 08:10:33 +0100
User-agent: MH (GNU Mailutils 3.13.90)

Hi Simon,

> echo "hello" | mail -s 'hello' someone@somewhere
> How can I save the mail in a "sent" folder or mbox? 

Set the "record" variable [1] to the name of the file to save the mail to.
The best place to do so is in your .mailrc file [2], e.g.:

  set record=saved-mail

If the need be, you can also do so from the command line, like that:  

  echo "hello" | mail -E 'set record=saved-mail' -s 'hello' someone@somewhere

By default, the mail is saved in a UNIX mbox format.  If you prefer
other format, use the full URL, e.g.

  set record=maildir:~/saved-mail

[1] https://mailutils.org/manual/html_node/Mail-Variables.html#record   
[2] https://mailutils.org/manual/html_node/Mail-Configuration-Files.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]