0

I'm trying to set up NeoMutt declaratively with Nix Home Manager to manage my Gmail account and encountered some challenges. Here’s a summary:

What Works:

  • Sending emails and retrieving email headers from NeoMutt.
  • Browsing through all Inbox email headers.

Issues:

  • Email headers load fine, but I can't view the body. Pressing on a header shows "No mailing lists found."
  • Only the Inbox appears in the sidebar; folders like Sent, Trash, and Drafts are missing.
  • Trouble configuring my University email (non-Gmail-based). Syncing with mbsync produces the error:
Socket error: secure connect to <mail_server> (<mail_ip>:993): error:0A00018A:SSL routines::dh key too small

Configuration Details: Below is a snippet of my neomutt.nix:

# neomutt.nix (simplified)
accounts.email = {
  maildirBasePath = "Maildir";
  accounts.gmail = {
    userName = gmailname;
    mbsync = { enable = true; create = "maildir"; };
    folders = { inbox = "Inbox"; sent = "\[Gmail\]/Sent\ Mail"; trash = "\[Gmail\]/Trash"; };
    neomutt = { enable = true; mailboxName = "Inbox"; };
    passwordCommand = pass_cmd;
    flavor = "gmail.com";
  };
};
programs = {
  neomutt = { enable = true; vimKeys = true; sidebar.enable = true; };
  mbsync.enable = true;
  msmtp.enable = true;
};
home.packages = with pkgs; [ openssl ];

Generated ~/.config/neomutt/gmail:

set ssl_force_tls = yes
set folder='/home/user/Maildir/gmail'
set spoolfile='+Inbox'
set sidebar_visible = yes
set record='+[Gmail]/Sent\ Mail'
set trash='+[Gmail]/Trash'

Troubleshooting Attempts:

  • Manual IMAP/SMTP setup instead of flavor. (Failed to load headers.)
  • Adjusting folders and extraMailboxes options.
  • Testing different configurations for mbsync.create.
  • Toggling imapnotify and notmuch.

Any pointers or suggestions are appreciated! Especially if anyone has experience integrating Gmail or non-Gmail accounts with NeoMutt and Home Manager.

0 Answers0