6

I can manage to send email and save a copy using Mutt with its own ui.

mutt -s topic receiver

This will bring up mutt's interface to edit and send mail. It will first upload to imap server, and send the email through smtp server. There is a Fcc field in the header.

But When I use pure command line to send mail, say:

mutt -s topic receiver < foo

The mail is successfully sent, but no copy in my server's sent folder. I check the debug log, the mail is not uploaded to imap server at all, just sent through smtp server.

I have tried to use my_hdr, but Fcc is not supported to be set.

fcc-hook is also tried, not use

nils
  • 97
  • 1
  • 8

2 Answers2

3

Have you tried putting the line

set record=+accountname/sent

into your .muttrc? i.e. where accountname is whatever you're calling your account and sent is the name of the sent emails mailbox, e.g. what I have in my .muttrc is

set record = +mec07/"Sent Items"

This command saves all the emails that I send into my "Sent Items" mailbox. Then my imap program saves it to the server.

gloriphobia
  • 1,423
  • 13
  • 21
3

I've had the same issue as well.

But after checking the docs I was too blind to see that I had set copy = no set, therefore it wasn't saving any copies of sent emails. Commented that line, fired a message and it was successfully stored in the Sent folder.

In my ~/.muttrc I have the following config so the delivered emails are successfully stored (I'm communicating with a Dovecot email server):

#set copy = no           
set postponed = "=Drafts"
set record = "=Sent"     
Daniel Andrei Mincă
  • 4,446
  • 2
  • 19
  • 30
  • Checking docs, but is there a way to `set copy = no` from the command-line? While the default to save to `sent` remains yes, when I run the interactive UI. – Marcos May 24 '19 at 16:31