0

Since I changed from mbox to Maildir format, mutt/neomutt does not save sent email

in ~/.muttrc I have

et mbox_type=Maildir
set folder="~/Maildir"    
set mask="!^\\.[^.]"
set mbox="~/Maildir"      
set spoolfile="~/Maildir"     
set postponed="+.Drafts"  # this I added after but nothing changed
set record="+.Sent"       # this I added after but nothing changed

the ~/Maildir tree

$ ls -R Maildir/
Maildir/:
cur  Draft  draftbox  new  outbox  Sent  sentbox  tmp  trash

Maildir/cur:
1737497891.V10307I5fbe8M146242.myhostname      1738400102.V10306Ic54e2M329900.myhostname:2,S
1737572852.V10307I5fbcaM212202.myhostname:2,S  1738779407.V10306Ic0d38M429367.myhostname:2,S
1737654476.V10307I5fb93M26824.myhostname       1739001859.V10306Ic55a1M270393.myhostname:2,S
1737718132.V10307I5fa87M173575.myhostname:2,S  1739210926.V10306Ic580cM502391.myhostname:2,S

Maildir/Draft:

Maildir/new:
1738155609.V10307Ic36a2M239995.myhostname  1738915125.V10306Ic2a87M548369.myhostname
1738264124.V10306Ic6fd5M305286.myhostname  1739089986.V10306Ic14bbM498891.myhostname
1738278926.V10306Ic0ccdM774234.myhostname  1739296548.V10306Ice92dM403450.myhostname
1738475978.V10306Ic1cefM416932.myhostname  1739360330.V10306Ic0e16M153268.myhostname
1738610292.V10306Ic1d23M237920.myhostname  1739465208.V10306Ic1905M306194.myhostname
1738697646.V10306Ic56abM101647.myhostname  1739466647.V10306Ica30cM369123.myhostname
1738864130.V10306Ic557eM199187.myhostname

Maildir/Sent:

Maildir/tmp:

If inside mutt/neomutt I try to open one of that *.myhostname file, mutt/neomutt says "~/Maildir/new/1739466647.V10306Ica30cM369123.myhostname is not a mailbox"

Anyone has some advice ?

0

2 Answers 2

0

Solved, I moved ~/Maildir to ~/old_Maildir reinstalled neomutt and changed "sent" and "drafts" line in ~/.neomuttrc with:

set record="~/Maildir/sent"
set postponed="~/Maildir/drafts"
0

The + or = at the start of folder names will be replaced by the directory pathname that you have assigned to folder.

Since you set folder to ~/Maildir and later set record and postponed to +.Sent and +.Drafts, respectively, the sent mail will be stored in the Maildir folder .Sent under ~/Maildir, and any postponed messages will be saved to .Drafts in the same directory.

Note that .Sent and .Drafts are hidden names and won't appear in the default listing of ls unless you use ls -a or ls -A.

Example: Start mutt and configure it to store sent mail in .Sent under the main folder ~/test:

mutt -e 'set folder=~/test; set record=+.Sent'

I then send an email, and see what happens:

$ tree -a ~/test
/home/myself/test
└── .Sent
    ├── cur
    │   └── 1739548720.32991_1.myplace:2,S
    ├── new
    └── tmp

5 directories, 1 file

Conclusion: If you look for the two directories ~/Maildir/.Sent and ~/Maildir/.Drafts (in your original setup), you will notice that they exist (assuming Mutt had a reason to save anything to them).

As for your other issue, opening a message file from a Maildir folder is not something you should expect to do in Mutt. If you use the c command in Mutt to change folders, it expects you to pick a Maildir folder, not an individual message file from within such a folder. Changing to the folder ~/Maildir (or to just + or =, since this is the value of folder) with c would have shown you the new message in the index view.

Note, too, that the value you set for mask appears to be the same as the default value for that variable, and it makes Mutt avoid showing hidden names like .Sent and .Drafts whenever browsing the directory structure.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.