Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Neomutt with home-manager: No mailing lists found #6185

Open
2 tasks done
Vasissualiyp opened this issue Dec 9, 2024 · 0 comments
Open
2 tasks done

bug: Neomutt with home-manager: No mailing lists found #6185

Vasissualiyp opened this issue Dec 9, 2024 · 0 comments
Assignees

Comments

@Vasissualiyp
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I was trying to setup neomutt declaratively with nix home-manager to manage my gmail. I tried a bunch of guides online, a bunch of dotfiles, but all seems to be fruitless.

What works:

  1. I can send emails and receive email headers from neomutt.
  2. I can go through all Inbox email headers.

Issues:

  1. The email headers seem to load just fine, however I cannot get the body -
    when I press on the email header, it says 'No mailing lists found'.
  2. Only Inbox is there - the sidebar doesn't show Sent/Trash/Drafts/etc.
  3. Have been trying to also set up my University mailbox
    (they have Thunderbird instructions). It's not gmail-based.
    When I try syncing it with mbsync, I get:
Socket error: secure connect to <mail_server> (<mail_ip>:993): error:0A00018A:SSL routines::dh key too small

Here is my neomutt.nix:

{ pkgs, config, ... }:
let
# Variables here
in
{
  # Partially based on https://github.com/Baitinq/nixos-config/blob/c9851e910f6e0dc574527e2da4be29d704eda27d/modules/email/default.nix
  accounts.email= {
	maildirBasePath = "Maildir";
    accounts.gmail = {

	  address = gmailname;
	  userName = gmailname;

	  msmtp.enable = true;
	  mbsync = { 
	    enable = true;
	    create = "maildir";
	  };

	  folders = {
	    inbox = "Inbox";
	    sent = "\[Gmail\]/Sent\\ Mail";
	    trash = "\[Gmail\]/Trash";
	    drafts = "\[Gmail\]/Drafts";
	    #spam = "[Gmail]/Spam";
	  };

	  #notmuch = {
	  #  enable = true;
	  #  neomutt.enable = true;
	  #};
	  neomutt = {
	    enable = true;
	    mailboxName = "Inbox";
        #extraMailboxes = [
        #  "\[Gmail\]/Sent\ Mail"
        #  "\[Gmail\]/Bin"
        #  "\[Gmail\]/Starred"
        #  "\[Gmail\]/Drafts"
        #];
        extraConfig = ''
          set edit_headers = yes  # See the headers when editing
          set charset = UTF-8     # value of $LANG; also fallback for send_charset
          unset use_domain        # because joe@localhost is just embarrassing
          set use_from = yes
          set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> %-15.15L (%?l?%4l&%4c?) %s'
        '';
      };
	  primary = true;
	  realName = realname;

	  #imap = {
      #  host = "imap.gmail.com";
      #  port = 993;
      #};

      #smtp = {
      #  host = "smtp.gmail.com";
      #  port = 587;
      #};

	  imapnotify = {
        enable = true;
        boxes = [ "Inbox" ];
        onNotifyPost = ''
          ${pkgs.libnotify}/bin/notify-send "New mail arrived."
        '';
      };

	  signature.text = signature;
	  signature.showSignature = "append";
	  passwordCommand = pass_cmd;
	  flavor = "gmail.com"; # flavor sorta works, while individual imap/smtp setup doesn't
	  #maildir.path = "gmail";
	};
  };

  services = {
    mbsync.enable = true;
    imapnotify.enable = true;
  };
  programs = {
    neomutt = {
      enable = true;
      vimKeys = true;
      sidebar.enable = true;
      sort = "reverse-date";
    };
    mbsync.enable = true;
    msmtp.enable = true;
  };
  home.packages = with pkgs; [ openssl ];
  #programs.notmuch = {
  #  enable = true;
  #};
}

Just a few things I have tried (some commented out):

  • imap/smtp setup manually instead of using flavor option
    (refused to even load the email headers. Flavor at least loads the headers)
  • Setting gmail directories in folders option or neomutt.extraMailboxes
  • Changing directory that stores emails on disk
  • Tryin combinations of "imap"/"maildir"/"both" in mbsync.create
    and/or neomutt.mailboxType
  • Using/not using mbsync and/or notmuch
  • Not using imapnotify (wasn't in my original configuration,
    before I found cited github config)
  • Hard-coding things into extraConfig, going without it, etc.

The way I call variables like 'pass_cmd' might be wrong,
but that's not actually what I'm doing in the actual file,
just replaced them for privacy reasons here.
Variables are definitely not the issue.

Please help, I tried fixing this error for a few days,
and cannot find anything even remotely useful online that improves my situation.
Even if you can give me a direction where I can go to, that would be amazing.
Thank you!

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.63, NixOS, 25.05 (Warbler), 25.05.20241128.970e93b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - nixpkgs: `/nix/store/h5v6brw3yj14b52a58imzjm3mid6scsz-source`
@Vasissualiyp Vasissualiyp added bug triage Issues or feature request that have not been triaged yet labels Dec 9, 2024
@teto teto added mail and removed triage Issues or feature request that have not been triaged yet labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants