Page 1 of 2

nmail - console-based email client for Linux and macOS

Posted: Fri Nov 20, 2020 6:39 pm
by sc0ttman

nmail - ncurses mail

Homepage: https://github.com/d99kris/nmail

nmail is a console-based email client for Linux and macOS with a user interface
similar to alpine / pine.

Image

Features

  • Support for IMAP and SMTP protocols
  • Local cache using AES256-encrypted custom Maildir format
  • Multi-threaded (email fetch and send done in background)
  • Address book auto-generated based on email messages
  • Viewing HTML emails (converted to text in terminal, or in external web browser)
  • Opening/viewing attachments in external program
  • Simple setup wizard for Gmail and Outlook/Hotmail
  • Familiar UI for alpine / pine users
  • Compose message using external editor ($EDITOR)
  • View message using external viewer ($PAGER)
  • Saving and continuing draft messages
  • Compose HTML emails using Markdown (see markdown_html_compose option)
  • Email search

Not Supported / Out of Scope

  • Local mailbox downloaded by third-party application (OfflineIMAP, fdm, etc)
  • Multiple email accounts in a single session
  • Special handling for Gmail labels
  • Threaded view

Usage

Usage:

Code: Select all

nmail [OPTION]

Command-line Options:

Code: Select all

-d, --confdir <DIR>
    use a different directory than ~/.nmail

-e, --verbose
    enable verbose logging

-ee, --extraverbose
    enable extra verbose logging

-h, --help
    display this help and exit

-o, --offline
    run in offline mode

-s, --setup <SERV>
    setup wizard for specified service, supported services: gmail, outlook

-v, --version
    output version information and exit

Configuration files:

Code: Select all

~/.nmail/main.conf
    configures mail account and general setings.

~/.nmail/ui.conf
    customizes UI settings.

Examples:

Code: Select all

nmail -s gmail
    setup nmail for a gmail account

Re: nmail

Posted: Fri Nov 20, 2020 6:41 pm
by sc0ttman

I've been using this one for a week or so...

- It is very fast, 1.2mb binary,
- smaller binary and fewer deps than alpine, mutt, neomutt, aerc
- works with Gmail (even with 2FA enabled), respects the mail filters and custom dirs
- super easy to setup
- developer is very helpful and responsive (he downloaded fossapup to help fix something :thumbup:)
- actively developed, improving all the time

Check it out!


Re: nmail - console-based email client for Linux and macOS

Posted: Mon Jun 27, 2022 1:18 am
by geo_c

I think I'm going to give this a try. I took a look at mutt, and it just seemed like a rough setup, with dependencies to configure, etc.

This github page has great documentation. But I'm never sure how to get the 'package' to compile from github. I've only compiled a couple of things in the past, but I think have the needed utilities, like cmake, etc.

So do I basically just download the 'src' folder to get started?


Re: nmail - console-based email client for Linux and macOS

Posted: Mon Jun 27, 2022 3:32 am
by puddlemoon
geo_c wrote: Mon Jun 27, 2022 1:18 am

So do I basically just download the 'src' folder to get started?

Yes, the easiest is to get the .tar or.zip (either)
I was curious and built it. It does use cmake. I had to add one build dependency, libxapian-dev, you may need more. Make sure to tick the "dev" box in ppm (bottom left) when you are searching build deps to see the -dev packages.
The readme gives most of the build command.. mkdir -p build && cd build && cmake .. && make -s
Just need to add the source to the cmake command e.g. mkdir -p build && cd build && cmake -S/mnt/home/nmail-master && make -s then the old make install
I didn't add the optional dep (pandoc) or even configure it as yet. Just curious


Re: nmail - console-based email client for Linux and macOS

Posted: Mon Jun 27, 2022 2:28 pm
by geo_c
puddlemoon wrote: Mon Jun 27, 2022 3:32 am

Yes, the easiest is to get the .tar or.zip (either)
I was curious and built it. It does use cmake. I had to add one build dependency, libxapian-dev, you may need more. Make sure to tick the "dev" box in ppm (bottom left) when you are searching build deps to see the -dev packages.
The readme gives most of the build command.. mkdir -p build && cd build && cmake .. && make -s
Just need to add the source to the cmake command e.g. mkdir -p build && cd build && cmake -S/mnt/home/nmail-master && make -s then the old make install
I didn't add the optional dep (pandoc) or even configure it as yet. Just curious

Great, I downloaded the .tar, once I figured out where it was located on the 'CODE' button, and I'll give this a shot at some point. Email is the final piece to my ability to run daily life from a terminal (which is not a necessity, but more of a hobby!) Currently I'm using:

calcurse
midnight commander
elinks
lynx
nano
wordgrinder
newsboat
lilypond


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jun 30, 2022 5:04 pm
by geo_c
puddlemoon wrote: Mon Jun 27, 2022 3:32 am

Yes, the easiest is to get the .tar or.zip (either)
I was curious and built it. It does use cmake. I had to add one build dependency, libxapian-dev, you may need more.

Thanks for the dependency tip, I installed it ahead of time, and the build went 100% smooth and now I've picked up my email in the terminal.


Re: nmail

Posted: Thu Jun 30, 2022 8:36 pm
by geo_c
sc0ttman wrote: Fri Nov 20, 2020 6:41 pm

I've been using this one for a week or so...

- It is very fast, 1.2mb binary,
- smaller binary and fewer deps than alpine, mutt, neomutt, aerc
- works with Gmail (even with 2FA enabled), respects the mail filters and custom dirs
- super easy to setup
- developer is very helpful and responsive (he downloaded fossapup to help fix something :thumbup:)
- actively developed, improving all the time

Check it out!

This is great to use, fast and efficient. I like the display also. I'm getting it to pick up imap mail from a yahoo imap server perfectly, but I can't get it to send SMTP with SSL authorization on the SMTP server. I've set the config every which way, but I'm not sure it's capable at this point.

I do have an outlook account I'm going to setup, so I'll look at how to configure 'dual instances' as the documentation describes, it's not multi-account capable.


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 01, 2022 1:28 am
by geo_c

I love this program, even though I have yet to be able to send outgoing mail from it. So far it's the best email experience I think I've ever had. It's just so fast and easy to view, delete, etc, and all with keystrokes.

I've set up two config directories so I can access two separate accounts from the command line using either:

Code: Select all

nmail -d .nmailf

or

Code: Select all

nmail -d .nmailo

Downloading messages, reading, and organizing is all smooth as silk. But sending is a different story. I keep getting this error recorded in the log:

Code: Select all

2022-06-30 21:20:12.340 | ERROR | mailsmtp_auth(smtp, m_User.c_str(), m_Pass.c_str()) = MAILSMTP_ERROR_AUTH_LOGIN  (smtp.cpp:168)

I thought it might have something to do with send_hostname= line in the config, but that didn't change anything when I used the hostname returned by the hostname command in the terminal.

I'm at a loss at this point. If I could send mail from this terminal application I might never go back to a gtk gui.


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 01, 2022 3:06 am
by williwaw

I thought it might have something to do with send_hostname= line in the config, but that didn't change anything when I used the hostname returned by the hostname command in the terminal.

if your email provider is not on your own network, then you might try to set send_hostname to your email account name


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 01, 2022 12:35 pm
by geo_c
williwaw wrote: Fri Jul 01, 2022 3:06 am

if your email provider is not on your own network, then you might try to set send_hostname to your email account name

Blast, that did not do the trick either. I'd say it's probably a matter of one of the accounts being outlook.office365, which according to one microsoft help page has issues with multiple email clients accessing a given account. They suggest logging into the microsoft account with the email address and going to account activity and finding the device/instance and flagging it as "this is me," a kind of two-factor authentication I suppose. But this being a work account, when I try to log in using my address, I'm told the "account doesn't exist."

So I can't even test that theory. I hate Microsoft.

The other account is Frontier/Yahoo, and usually sets up pretty easily, so because they both return basically the same error I'm inclined to say I've got some other issue at play.

I can live with Claws-mail, but after using nmail for one day, I'm already spoiled. I might just use nmail as a reader to check mail and delete junk, and then fire up Claws if I actually need to reply to something.


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 01, 2022 5:41 pm
by williwaw
sc0ttman wrote: Fri Nov 20, 2020 6:41 pm

- works with Gmail (even with 2FA enabled), respects the mail filters and custom dirs
- super easy to setup
- developer is very helpful and responsive (he downloaded fossapup to help fix something :thumbup:)
- actively developed, improving all the time

If you are enjoying retro tech then you might want to check out the devs mailist and ask there? otherwise mutt seems to be well used and supported. It can do most everything claws can do and more if you are wanting to work exclusively with terminal apps


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 02, 2022 1:34 pm
by geo_c
williwaw wrote: Fri Jul 01, 2022 5:41 pm

If you are enjoying retro tech then you might want to check out the devs mailist and ask there? otherwise mutt seems to be well used and supported. It can do most everything claws can do and more if you are wanting to work exclusively with terminal apps

Yes, I've looked into mutt, and it's a little murky because to my understanding active development appears to be in neomutt. The neomutt in the fossapup repo is a complete version behind, so I downloaded the latest neomutt tarball from here: https://github.com/neomutt/neomutt/rele ... g/20220429 and I'm looking at compiling it.

It could be an easy compile, or not. I'll report back.


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 02, 2022 6:41 pm
by geo_c

I compiled neomutt for Fossapup64.9.5 and it was pretty straightforward. Now I just have to figure out how to use it and setup an account. Perhaps I should start a new thread instead of hi-jacking this one.

Image


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 02, 2022 8:14 pm
by williwaw
geo_c wrote: Sat Jul 02, 2022 6:41 pm

Perhaps I should start a new thread instead of hi-jacking this one.

yes, as you will also need a way to fetch your mail from the server

https://neomutt.org/contrib/useful-programs


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 02, 2022 9:29 pm
by geo_c

As I have widened the topic to neomutt, I'm continuing the thread here:
https://forum.puppylinux.com/viewtopic.php?t=6260


Re: nmail - console-based email client for Linux and macOS

Posted: Wed Jul 20, 2022 2:41 pm
by d99kris

Hey @geo_c - I stumbled across this forum thread and just wanted to mention that the smtp/send issue sounds similar to https://github.com/d99kris/nmail/issues/57

Possibly installing libsasl2-modules can solve the issue:

Code: Select all

pkg add libsasl2-modules

I'm looking into adding some logging in nmail to detect when libsasl2-modules is missing.

PS. I'm not a regular at this forum - feel free to reach out at https://github.com/d99kris/nmail/issues for follow-up questions.


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 1:53 am
by geo_c
d99kris wrote: Wed Jul 20, 2022 2:41 pm

Hey @geo_c - I stumbled across this forum thread and just wanted to mention that the smtp/send issue sounds similar to https://github.com/d99kris/nmail/issues/57

Possibly installing libsasl2-modules can solve the issue:

Code: Select all

pkg add libsasl2-modules

Hey @d99kris that worked like a charm!

And I can't believe how much faster nmail is than mutt. I thought it was the email servers causing the slowness, because Claws mail is slow at picking up and sending also. This seems to be almost instantaneous.

I will be using this and let you know if it keeps running so speedy.

EDIT: Yes it is faster than mutt. Now there is one reason I will still need to use mutt in conjunction with nmail, and that's the fact that I have an extensive MH local mailbox archive, which I understand is outside the scope of nmail. So it looks like what I'm doing already is using nmail for daily and fast communication, and keeping mutt on hand for archiving or accessing and sending from the MH archive.


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 12:35 pm
by wiak
geo_c wrote: Mon Jun 27, 2022 2:28 pm

Email is the final piece to my ability to run daily life from a terminal (which is not a necessity, but more of a hobby!).

A simple commandline spreadsheet program is nice (even just for quick calculations in addition to simple commandline calculator). sc, for example (and scim an upgrade apparently, and Oleo:
https://unix.stackexchange.com/question ... dprocessor
Oops, a bit off-topic (almost), sorry.


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 1:38 pm
by geo_c
wiak wrote: Thu Jul 21, 2022 12:35 pm
geo_c wrote: Mon Jun 27, 2022 2:28 pm

Email is the final piece to my ability to run daily life from a terminal (which is not a necessity, but more of a hobby!).

A simple commandline spreadsheet program is nice (even just for quick calculations in addition to simple commandline calculator). sc, for example (and scim an upgrade apparently):
https://unix.stackexchange.com/question ... dprocessor
Oops, a bit off-topic (almost), sorry.

Yes, and to update that post of mine. Now these terminal applications are completely integrated into my daily driver life. So they are a necessity. They are just so fast and useful. I like the organization style much better. I have a laptop with pretty high resolution (the nicest laptop color display I've ever owned, 1920 x 1080) so I can open my terminal apps as below (although the bottom right is a ROX window) and keep my gui apps and browsers on a vga external monitor. Very effective.

Image


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 6:36 pm
by williwaw
geo_c wrote: Thu Jul 21, 2022 1:53 am
d99kris wrote: Wed Jul 20, 2022 2:41 pm

Hey @geo_c - I stumbled across this forum thread and just wanted to mention that the smtp/send issue sounds similar to https://github.com/d99kris/nmail/issues/57

Possibly installing libsasl2-modules can solve the issue:

Code: Select all

pkg add libsasl2-modules

Hey @d99kris that worked like a charm!

And I can't believe how much faster nmail is than mutt. I thought it was the email servers causing the slowness, because Claws mail is slow at picking up and sending also. This seems to be almost instantaneous.

I will be using this and let you know if it keeps running so speedy.

EDIT: Yes it is faster than mutt. Now there is one reason I will still need to use mutt in conjunction with nmail, and that's the fact that I have an extensive MH local mailbox archive, which I understand is outside the scope of nmail. So it looks like what I'm doing already is using nmail for daily and fast communication, and keeping mutt on hand for archiving or accessing and sending from the MH archive.

what mail format does nmail support best when it comes to downloading to a local archive?
or perhaps nmail works better as an imap reader?

I also have an extensive local archive, but in mbox format. I see conversion tools around should one wish to mess with conversion.
As it stands now, I find myself maintaining a seamonkey app primarily to access my local mbox archive, but I am guessing it might go the way of the dinosaurs soon


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 6:57 pm
by geo_c
williwaw wrote: Thu Jul 21, 2022 6:36 pm

what mail format does nmail support best when it comes to downloading to a local archive?
or perhaps nmail works better as an imap reader?

I also have an extensive local archive, but in mbox format. I see conversion tools around should one wish to mess with conversion.
As it stands now, I find myself maintaining a seamonkey app primarily to access my local mbox archive, but I am guessing it might go the way of the dinosaurs soon

nmail's github page says that mail formats exported from other clients is outside the scope of the project. Certainly nmail is handling my two imap accounts very smoothly once the missing library was added.

mutt is really good for reading mh format. I think it might do mbox also, but not sure. nmail looks like it should be fine with pop3.


Re: nmail - console-based email client for Linux and macOS

Posted: Thu Jul 21, 2022 9:25 pm
by williwaw
geo_c wrote: Thu Jul 21, 2022 6:57 pm

nmail's github page says that mail formats exported from other clients is outside the scope of the project. Certainly nmail is handling my two imap accounts very smoothly once the missing library was added.

but not sure. nmail looks like it should be fine with pop3.

mutt is really good for reading mh format. I think it might do mbox also,

for those interested, mutt handles mbox well also.
from the bottom of nmails documentation on the git hub page......

Accessing Email Cache using Other Email Clients

The nmail message cache may be exported to the Maildir format using the following command:

nmail --export ~/Maildir

Note: nmail is not designed for working with other email clients, this export option is mainly available as a data recovery option in case access to an email account is lost, and one needs a local Maildir archive to import into a new email account. Such import is not supported by nmail, but is supported by some other email clients, like Thunderbird.

guess this means nmail can use pop3 to download an archive, but not necessarily designed to use as a client for use with Maildir folders .


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 22, 2022 12:42 pm
by stemsee

I was not able to compile this on fatdog. Could someone please share a 64 bit binary or sfs.

cheers
stemsee


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 22, 2022 1:50 pm
by geo_c
stemsee wrote: Fri Jul 22, 2022 12:42 pm

I was not able to compile this on fatdog. Could someone please share a 64 bit binary or sfs.

cheers
stemsee

Where did the compile fail? I think this may be one of the compiles where all the docs couldn't be created, so I disabled that compile option, then it worked fine.


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 22, 2022 8:46 pm
by williwaw

@stemsee
I have not yet found a binary online. How does one share something the size of an sfs? maybe too big to attach here?

@geo_c

could you possibly share your build recipe here?


Re: nmail - console-based email client for Linux and macOS

Posted: Fri Jul 22, 2022 9:57 pm
by geo_c
williwaw wrote: Fri Jul 22, 2022 8:46 pm

@stemsee
I have not yet found a binary online. How does one share something the size of an sfs? maybe too big to attach here?

@geo_c

could you possibly share your build recipe here?

Well, since I seem to have deleted all my build info, I'm kind of at a loss, as nmail -v doesn't give build options like neomutt -v does. But I think that I just followed the build instructions from nmail github, and it was very straight forward, the only kink being the smtp issue solved by getting the package referenced a few posts up. I grabbed that after the fact and smtp worked instantly.


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 23, 2022 12:39 pm
by stemsee
williwaw wrote: Fri Jul 22, 2022 8:46 pm

@stemsee
I have not yet found a binary online. How does one share something the size of an sfs? maybe too big to attach here?

usually you would upload to online storage, gdrive, megadrive, onedrop etc then share from the drive and post the link here!

nmail.png
nmail.png (53.18 KiB) Viewed 1848 times

i got fed up messing around with libxapian .... I guess it tries to build libxapian.so, as libxapian-dev does not have the .so file and I can't find it online.


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 23, 2022 2:20 pm
by stemsee

I have compiled libxapian-shlibs from source but still no joy! I was, however, able to compile mutt


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 23, 2022 3:01 pm
by geo_c
stemsee wrote: Sat Jul 23, 2022 2:20 pm

I have compiled libxapian-shlibs from source but still no joy! I was, however, able to compile mutt

I have both installed and I'm basically using nmail because it's a lot quicker to navigate, but I also need mutt because of it's mh mailbox compatibility. Mutt has a lot more capabilities, so I'm glad to have both.

What pup are you on? I was able to install libxapian30_1.4.14.-2 and libxapian-dev_1.4.14-2 from the fossapup ppm.


Re: nmail - console-based email client for Linux and macOS

Posted: Sat Jul 23, 2022 3:29 pm
by stemsee

I am using fatdog. I want to add email capability to an app I have been working on.