Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
375
views
Cannot open an .mbox file with neomutt (although it works with mutt)
Cannot open an .mbox file with mutt I want to open a 10GB `.mbox` file that I downloaded from my gmail account. When I use the command ``` neomutt -f 10GB_mboxfile.mbox ``` neomutt takes 10-20 seconds to open and when finally opened, there is no file listed in the the application. I have the followi...
Cannot open an .mbox file with mutt
I want to open a 10GB
.mbox
file that I downloaded from my gmail account. When I use the command
neomutt -f 10GB_mboxfile.mbox
neomutt takes 10-20 seconds to open and when finally opened, there is no file listed in the the application. I have the following dummy .mbox
(which I modified from a gmail mbox file):
From 9999999999999999@xxx Tue Mar 09 17:00:00 +0500 2019
X-GM-THRID: 99999999999999999
X-mail-Labels: Archived,Sent,Opened
MIME-Version: 1.0
Date: Tue, 09 Mar 2019 17:00:00 +0500
Message-ID:
Subject: THETITLE
From: My Name
To: destination@mail.com
Content-Type: multipart/alternative; boundary="0000000000009999999999999"
--0000000000009999999999999
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ da=
s ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
--0000000000009999999999999
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ=
ZZ das ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ=
>
--0000000000009999999999999--
I am trying to open it with neomutt as follows:
neomutt -f themboxfile.mbox
neomutt opens but then no message is listed in the app. How is it possible to open this file with neomutt? (Although opening the same file works with mutt...)
**EDIT**
Beside the answer below I had a too old version: the apt get install neomutt
on Ubuntu LTS 22.04 installed the version 20211029
. I uninstalled neomutt and re-installed it with nix package manager. it installed NeoMutt 20231221
which worked without problem.
ecjb
(475 rep)
Jun 8, 2024, 12:57 PM
• Last activity: Mar 2, 2025, 09:35 AM
0
votes
2
answers
128
views
Mutt/Neomutt with Maildir do not save sent email
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="+.S...
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 ?
klatls
(33 rep)
Feb 13, 2025, 06:12 PM
• Last activity: Feb 17, 2025, 05:10 AM
0
votes
0
answers
73
views
Issues with Neomutt SMTP configuration
I have the following things not working in my neomutt application: 1. Email is displayed instead of Username. For example : `johndoe@example.com ` is displayed instead of `John Doe `. 2. How to ensure that Neomutt applies the `Standard TLS encryption for security` similar to Gmail, which encrypts em...
I have the following things not working in my neomutt application:
1. Email is displayed instead of Username. For example :
johndoe@example.com
is displayed instead of John Doe
.
2. How to ensure that Neomutt applies the Standard TLS encryption for security
similar to Gmail, which encrypts emails on transit?
Neomutt MSMTP config
account johndoe@example.com
host smtp.gmail.com
port 587
from johndoe@example.com
user "John Doe"
auth xoauth2
passwordeval ""
tls_starttls
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /home/greninja/.config/msmtp/msmtp.log
GreninjaShuriken4
(1 rep)
Feb 6, 2025, 06:42 AM
0
votes
0
answers
65
views
Different format in .mbox and email saved locally with mutt: convert split .mbox file into the same format as mutt?
I am trying to move to mutt for mail client and am trying to have email localy. I have 2 sources of saved email: - the first one was obtained from the .mbox file form google: I wrote a script which extacted each email in a separated `.txt` file (to be able to 1. search with grep content of file 2. o...
I am trying to move to mutt for mail client and am trying to have email localy. I have 2 sources of saved email:
- the first one was obtained from the .mbox file form google: I wrote a script which extacted each email in a separated
.txt
file (to be able to 1. search with grep content of file 2. organize them according to years and 3. not having to parse a single 10GB+ file each time I want to access the emails).
- the second one was obtained by saving locally the email from with neomutt
application.
There are many fields which seem to be coded differently in a significant way. For example:
In the .mbox split saved file as txt, the fist line is (I think because there are several similar looking field):
From user@mail.com Tue Jul 21 07:48:31 2022
Whereas in the file saved locally by mutt, the first line is as follows
From 1370888888881122222@xxx Tue Jul 21 07:48:31 +0000 2022
The email adress is actually only displayed in other fields below:
...
X-Sender: user@mail.com
...
Return-path:
...
Moreover the file saved by mutt appears in color in vim (as if it detects the file structure and not for for the split .txt file of the .mbox)
Here are my questions:
1. Why those differences
2. How do vim detects the structure difference
3. (most importantly!:) is it possible to convert the split .txt file from the mbox in the same format as the one saved in mutt?
ecjb
(475 rep)
Jun 8, 2024, 11:27 AM
• Last activity: Jun 8, 2024, 12:23 PM
0
votes
1
answers
525
views
How to view sent messages in Mutt using the default mbox format?
How do I view the record of sent messages in NeoMutt? How do I do so using the default values of the following variables: ``` record=~/sent mbox_type=mbox ```
How do I view the record of sent messages in NeoMutt?
How do I do so using the default values of the following variables:
record=~/sent
mbox_type=mbox
Rafael X Villalobos
(1 rep)
Nov 30, 2023, 07:11 PM
• Last activity: Jan 1, 2024, 11:45 PM
1
votes
2
answers
712
views
neomutt oauth stopped working
Since last week oauth2 just stopped working. It did a while before and healed itself mysteriously and I am eager to find out what is happening here. I installed thunderbird for reference and it is working — receiving and sending emails is possible with oauth2. I have an MS Office account and configu...
Since last week oauth2 just stopped working. It did a while before and healed itself mysteriously and I am eager to find out what is happening here. I installed thunderbird for reference and it is working — receiving and sending emails is possible with oauth2.
I have an MS Office account and configured the authentication making use of mutt_oauth2.py script linked in the docs following the steps outlined in the README .
Running the script manually yields a token. Testing suggests, imap and smtp communication is basically working (the script seems to log in successfully if I am correct).
/home/me/bin/mutt_oauth2.py /home/me/.neomutt/token --provider microsoft --verbose --test
[…]
IMAP authentication succeeded
POP authentication succeeded
SMTP authentication succeeded
And neomutt was working as well – however stopped to do so a few days ago. Logs tell
[2023-06-18 10:35:17] mutt_socket_write_d() 4> c0000 CAPABILITY
[2023-06-18 10:35:17] mutt_socket_readln_d() 4 cmd_parse_capability() Handling CAPABILITY
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "IMAP4": 0
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "IMAP4rev1": 1
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "AUTH=XOAUTH2": 9
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "SASL-IR": 13
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "IDLE": 12
[2023-06-18 10:35:17] cmd_parse_capability() Found capability "NAMESPACE": 4
[2023-06-18 10:35:17] mutt_socket_readln_d() 4 imap_cmd_step() IMAP queue drained
[2023-06-18 10:35:17] imap_authenticate() Trying user-defined imap_authenticators
[2023-06-18 10:35:17] imap_authenticate() Trying method oauthbearer
[2023-06-18 10:35:17] mutt_sasl_client_new() SASL local ip: 2001:db8::1;38986, remote ip:2001:db8::2;993
[2023-06-18 10:35:17] mutt_sasl_client_new() External SSF: 256
[2023-06-18 10:35:17] mutt_sasl_cb_log() SASL: No worthy mechs found
[2023-06-18 10:35:17] imap_auth_sasl() oauthbearer unavailable
[2023-06-18 10:35:17] imap_authenticate() Trying method xoauth2
[2023-06-18 10:35:17] imap_auth_oauth_xoauth2() Authenticating (XOAUTH2)...
[2023-06-18 10:35:17] msgwin_recalc() recalc done, request WA_REPAINT
[2023-06-18 10:35:17] msgwin_repaint() repaint done
[2023-06-18 10:35:17] ibar_recalc() recalc done, request WA_REPAINT
[2023-06-18 10:35:17] helpbar_repaint() repaint done
[2023-06-18 10:35:17] menu_repaint() repaint done
[2023-06-18 10:35:17] ibar_repaint() repaint done
[2023-06-18 10:35:17] mutt_account_getoauthbearer() OAUTH token is too big: 2304
[2023-06-18 10:35:17] msgwin_recalc() recalc done, request WA_REPAINT
[2023-06-18 10:35:17] msgwin_repaint() repaint done
[2023-06-18 10:35:17] mutt_sasl_client_new() SASL local ip: 2001:db8::1;38986, remote ip:2001:db8::2;993
[2023-06-18 10:35:17] mutt_sasl_client_new() External SSF: 256
[2023-06-18 10:35:17] mutt_sasl_client_new() External authentication name: karl.liebich@ida.me
[2023-06-18 10:35:17] mutt_sasl_cb_authname() getting authname for outlook.office365.com:993
[2023-06-18 10:35:17] imap_auth_sasl() xoauth2 unavailable
[2023-06-18 10:35:17] imap_authenticate() No authenticators available or wrong credentials
- libsasl2
related packages have last been updated in March so there was no change.
- Neither was in my neomutt configuration or password.
- The OAUTH token is too big: 2304
message is known and did not have any impact in the past.
---
Any hints on how to debug this any further and what to do about it?
karlsebal
(835 rep)
Jun 18, 2023, 09:23 AM
• Last activity: Jun 28, 2023, 08:54 AM
2
votes
0
answers
726
views
neomutt+lieer: how to make deletion in neomutt sync properly to GMail?
I've recently migrated from mutt to neomutt, and have at the same time been moving from accessing my mailboxes live through IMAP to working with local frequently-synced copies, with a notmuch database. I have both an Outlook (work) address and a Gmail (personal) address. The outlook mail I'm syncing...
I've recently migrated from mutt to neomutt, and have at the same time been moving from accessing my mailboxes live through IMAP to working with local frequently-synced copies, with a notmuch database. I have both an Outlook (work) address and a Gmail (personal) address. The outlook mail I'm syncing with davmail and OfflineIMAP, and AFAICT it's working well. It's the GMail that's giving me grief; I'm syncing it with lieer which seems to for the most part do a good job, but I'm having a really difficult time with handling the process for message deletion. I can't find anyone else with this specific problem, so I'm guessing the answer is something stupidly simple I'm doing wrong.
I'm basically trying to follow more-or-less the workflow described here , although I'm not even trying to use lieer to send mail. The issue AFACT is that neomutt seems to follow one of a few behaviors with regard to what "deleting" a message means, and none of them seem to play quite right with the kind of thing lieeer wants to see to ensure a message is trashed cloudside. Here are the prospects I've looked at:
*
maildir_trash
set to "no", trash
unset. AFAICT, this setting makes neomutt unlink (as in, remove the associated file in the appropriate Maildirs) the message. Since lieer won't/can't push deletions (which is probably a good thing), that doesn't remove the messages cloudside on sync.
* maildir_trash
set to "no", trash
set. This is what I used to do, because IMAP connection to GMail provided a [Trash] folder. lieer seems to bring everything in with one monolithic maildir folder (called "mail", and within the lieer working directory), so unless there's a clever way to do this so that trash is a tag rather than a directory, it still doesn't seem to do what I want; changing the path to a message file seems like it would resemble a deletion to lieer, since it would take it out of the lieer sync path.
* maildir_trash
set to "yes". This seemed really pretty promising, because it seemed like it would set a flag rather than relocate the file, leaving it in the right directory but flagged as trash. Unfortunately, that flag never seems to make it to notmuch (this is apparently by design ) and thus never makes it to lieer. I could add another layer of byzantine automation to translate the flag myself, but I assume if that were necessary someone else would have talked about it.
A nonzero number of other people use lieer, notmuch, and neomutt, and nothing I've searched on suggests others have this problem, which suggests I've somehow broken something configured correctly by default? I include below an anonymized version of my .notmuch-config
and most of my .neomuttrc
(there's a lot of code to color various specific message patterns which I've elided, as it's probably not relevant):
[database]
path=/home/username/Private/.mail
[user]
primary_email=username@gmail.com
other_email=username@work.edu
[new]
tags=new
ignore=/.*[.](json|lock|bak)$/
[search]
[maildir]
synchronize_flags=true
[query]
workmail=folder:account.work/INBOX
gmail=folder:/account.gmail/ AND tag:inbox AND NOT tag:trash
virtual-mailboxes work "notmuch://?query=query:workmail"
virtual-mailboxes gmail "notmuch://?query=query:gmail"
virtual-mailboxes allmail "notmuch://?query=query:workmail OR query:gmail"
send2-hook '~f gmail.com' "source ~/.mutt/accounts/muttrc.gmail"
send2-hook '~f work.edu' "source ~/.mutt/accounts/muttrc.work"
reply-hook '~C work.edu' "source ~/.mutt/accounts/muttrc.work"
reply-hook '~C username.*@gmail.com' "source ~/.mutt/accounts/muttrc.gmail"
message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"
unignore date
alternates '^username'
source "~/.mutt_aliases"
set abort_noattach=ask-no
set abort_noattach_regex = "\\"
set abort_unmodified=ask-yes
set alias_file="~/.mutt_aliases"
set allow_ansi=yes
set arrow_cursor=yes
set askbcc=yes
set askcc=yes
set beep=no
set beep_new=yes
set certificate_file="~/.mutt_certs"
set confirm_append=no
set copy=yes
set crypt_auto_sign=yes
set edit_headers=yes
set editor="emacs -nw"
set folder="~/.mail"
set header_cache=~/.mutt/cache/headers
set history=20
set implicit_autoview=yes
set keep_flagged=yes
set mailcap_path="~/.mailcap"
set maildir_trash=yes
set mbox_type="Maildir"
set message_cachedir=~/.mutt/cache/bodies
set mime_forward=ask-no
set move=no
set nm_default_uri = "notmuch:///home/username/.mail"
set pager_stop=yes
set pgp_clear_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
set pgp_import_command="gpg --no-verbose --import %f"
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_sign_as="0xXXXXXXXX"
set pgp_timeout=1800
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
set print_command="enscript -Pkether/2 --margins=:::72 --header='Page $% of $='
set realname = "My Real Name"
set record="+sent-mail"
set signature="$HOME/.signatures/sign|"
set sort = threads
set sort_aux = last-date-received
set spool_file = allmail
set text_flowed=yes
Many thanks to anyone who can help!
Jake Wildstrom
(61 rep)
May 15, 2023, 04:47 PM
3
votes
0
answers
177
views
automatically change the “fcc:” field with the sender when composing mails in neomutt
when i compose a message in neomutt, the “fcc:” field is set by, i presume, the `record` variable in my configuration; now i can - manually change this field when composing the message using `edit-fcc` (which bound to `f` by default), and - have it be changed automatically depending on the *recipien...
when i compose a message in neomutt, the “fcc:” field is set by, i presume, the
record
variable in my configuration; now i can
- manually change this field when composing the message using edit-fcc
(which bound to f
by default), and
- have it be changed automatically depending on the *recipient* of the message i’m composing (using an fcc-hook
).
however i have found no way to have this field changed automatically depending on the *sender* of the message i’m composing, that is when changing the “from:” field.
is there a way to do so?
it seems like a very basic function. the typical use case is for people with multiple accounts who sort their outgoing messages by account. one starts composing a message and later on decides from which account to send the message using the edit-from
command. clearly, one now wants the “fcc:” field to be updated automatically instead of invoking edit-fcc
manually as well.
i know there is a hook, the send2-hook
, for having neomutt execute any command i wish whenever i change the message - but i see no command to change the “fcc:” field of the message i’m currently composing. setting the record
variable anew using send2-hook
works, but unfortunately its value *does not* override the already-set “fcc:” field and it’s the latter that has precedence for neomutt when saving outgoing mails.
user567130
(31 rep)
Mar 29, 2023, 12:14 PM
• Last activity: Mar 29, 2023, 12:19 PM
1
votes
0
answers
477
views
How to enable gpg password prompt for OAuth2 token in mutt
I am using mutt with outlook365 which has OAuth2 support. I generated an access token which is checked by the following lines in my muttrc: ``` set imap_authenticators = "xoauth2" set imap_oauth_refresh_command = "~/.config/neomutt/mutt_oauth2.py ~/.config/neomutt/mytoken.token" set smtp_authenticat...
I am using mutt with outlook365 which has OAuth2 support.
I generated an access token which is checked by the following lines in my muttrc:
set imap_authenticators = "xoauth2"
set imap_oauth_refresh_command = "~/.config/neomutt/mutt_oauth2.py ~/.config/neomutt/mytoken.token"
set smtp_authenticators = ${imap_authenticators}
set smtp_oauth_refresh_command = ${imap_oauth_refresh_command}
Where mutt_oauth2.py
is the script provided by mutt , and mytoken.token
is a GPG encrypted token generated accordingly.
My issue is that I have settings in my gpg-agent.conf
for limited time caching of my gpg password for security reasons. If this times out and I try to send an email I am confronted with Authenticating (XOAUTH2)...
followed by No authenticators available
, and the email will not send.
If I input my gpg password elsewhere on the system for other purposes (via pinentry-curses
) and then try to send again the authentication works fine as the password is now (temporarily) in the cache.
So my question is why does mutt not prompt me for my gpg password when trying to send, and how can I make it so that it does?
Thanks in advance.
FluidFox
(11 rep)
Dec 20, 2022, 09:26 AM
0
votes
1
answers
221
views
Neomutt goes to next message on page down, but not previous on page up
Neomutt seems to have a strange feature: When I open a message with space, I can press `PageDown` to scroll down by a page. However, when this gets to the end of the message, it doesn't stop - it skips to the next message. But `PageUp` never goes to the previous message, and instead stops at the top...
Neomutt seems to have a strange feature: When I open a message with space, I can press
PageDown
to scroll down by a page. However, when this gets to the end of the message, it doesn't stop - it skips to the next message. But PageUp
never goes to the previous message, and instead stops at the top.
Is there a way to make PageDown
**not** go to the next message?
Jessica
(399 rep)
Apr 3, 2022, 11:21 PM
• Last activity: Apr 5, 2022, 10:30 PM
3
votes
1
answers
168
views
How can I get mutt/neomutt to not close an empty edit field when backspace is pressed?
I used [mutt-wizard](https://github.com/LukeSmithxyz/mutt-wizard) to configure neomutt. When I edit e.g. the from-address by pressing ` f` in the `Compose` view (just before sending my mail) it let's me edit the field. The command line becomes an edit line, this is below the status line. If I delete...
I used [mutt-wizard](https://github.com/LukeSmithxyz/mutt-wizard) to configure neomutt. When I edit e.g. the from-address by pressing
I would like to enter a new address after I deleted the old one and pressed backspace more than once.
f
in the Compose
view (just before sending my mail) it let's me edit the field. The command line becomes an edit line, this is below the status line.
If I delete the address completely by pressing backspace, it closes the edit line and leaves the address unchanged, if I want to delete more characters than there are. This happens easily and is mildly annoying.
I guess backspace is bount to close the edit operation/leave/unselect the field?

inktrap
(133 rep)
May 20, 2020, 05:06 PM
• Last activity: Feb 11, 2022, 11:59 AM
Showing page 1 of 11 total questions