1

I use the office365 mutt config connect my Microsoft Office 365 email account, and that works fine.

One issue I am having is that I want to reverse the email view so that I see the most recent ones on top and not the oldest ones.

I tried adding a ~/.muttrc file containing:

set sort_aux=last-date-received       
set sort=threads
set sort_re

Yet when opening mutt then, I get the error:

---Mutt: (no mailbox) [Msgs:0]---(threads/last-date-received)--------------------------------------------------------------------------------------------------------------------------------------------------------------------------(all)---
/var/mail/philipp: No such file or directory (errno = 2)

I also tried adding the config in the

.mutt/user

config as used by the config repository, yet it seems to be ignored.

I have to manually revert the view using O inside of mutt.

How can I always revert mutt's view so that I see the most current emails on top? Where am I supposed to setup the muttrc?

1

I think the relevant sentence in your question is

I tried adding a ~/.muttrc file ...

Your office365 mutt config is placed in ~/.mutt/muttrc?

The error (/var/mail/philipp: No such file or directory) shows that the spoolfile option is for some reason reset to its default value - the config file where it was changed isn't read anymore.

I guess mutt searches its config file either in ~/.muttrc or ~/.mutt/muttrc and when it finds the first file, it wont evaluate the second one.

Solution 1

Put those commands also in ~/.mutt/muttrc.

Drawback: if you update the office365 mutt config your options could get overwritten.

Solution 2

Tell ~/.muttrc to also use the other config file.

Just insert

source ~/.mutt/muttrc

in your ~/.muttrc, so mutt will evaluate that file to.
Insert it before your own options, so if there are any options defined in both config files, yours will be the last ones read by mutt.

| improve this answer | |
  • I have created the ~/.muttrc to contain source ~/.mutt/muttrc set sort_aux=last-date-received set sort=threads set sort_re yet still has no effect. Maybe IMAP issue? – k0pernikus Oct 23 '15 at 12:01
  • Have you still the /var/mail/philipp: No such file or directory (errno = 2) error? – Thomas Weinbrenner Oct 23 '15 at 12:02
  • Nope. It opens up fine with all the mail, yet still without any ordering. Just the oldest mail is on top and I have to scroll all the way down. – k0pernikus Oct 23 '15 at 12:03
  • Weird. Perhaps you should look if there are any -hooks in ~/.mutt/muttrc which change sort – Thomas Weinbrenner Oct 23 '15 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.