nmail to neomutt - setting up the accounts.

Moderator: Forum moderators

Post Reply
geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

nmail to neomutt - setting up the accounts.

Post by geo_c »

I'm continuing this discussion from @sc0ttman's nmail topic:

https://forum.puppylinux.com/viewtopic. ... 127#p61127

As I thoroughly enjoyed nmail's easy inbox setup, I was not able to get smtp SSL outgoing mail to work. The interface is a great example of elegant design in my opinion. So I really want to get it working. It's configuration is very basic compared to the endless possibilities of a terminal based mail client like neomutt, which I have avoided for it's not-so-easy setup.

But...

At the suggestion of @williwaw I compiled the latest version of neomutt on Fossapup64. Now I'm trying to set up accounts through neomutt, which as I feared, is not that user friendly.

@williwaw was kind enough to tip me off to the fact that neomutt doesn't retrieve mail without an added application. So I installed getmail-5.1 from the Fossapup repo. And I must say, as much as I'm looking forward to using neomutt, that seems to be a few hours of configuration away. Nmail was really cool in that after compiling and installing, there were only a few entries from the command line to pick up my imap mail from both outlook.office365.com and frontiernet. All of the mail fetch/read functions worked OOTB. But like I said sending SMTP is a different story, and I may contact the developer to see if he has any advice.

Ultimately, I think this is a plot to get me to figure out how mail servers actually work. Maybe if I spend around a hundred hours or so reading and configuring, I'll be able to set up my own server someday. :mrgreen:

I will post my progress on neomutt as it happens.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

After quite a few hours tinkering with a custom neomuttrc file, I was finally able to pick up mail on imap accounts. I configured the side bar which displays folders, and a few other tweaks, but alas, when trying to send SMTP outgoing mail, I get the message: No authenticators found. Yet that doesn't exactly make sense to me, because I compiled neomutt with SSL and the documentation states that neomutt will attempt to use all authentication methods.

So it's an uphill schlog.

nmail seems to have a couple of advantages OOTB over neomutt, the primary one so far is nmail's ability to display html as text. Quite a few of my html messages that display as text on nmail, do not display in neomutt and require the external html viewer, MIME type, which by reading the neomutt documentation and editing the mailcap file, I was able to configure as another browser other than default.

So some success in neomutt, but still a lot of headache.

As stated in the previous post, @williwaw mentioned that I would need an additional mail send application, which I looked into, but ran into snags, however, in the process it became apparent that my system already has sendmail installed. And besides that, neomutt appears to be able to send mail SMTP SSL natively, if I'm reading the documentation correctly.

I'm fairly certain that both of these clients, nmail and neomutt, should be able to send mail from my system. But I'm missing something important somewhere.

I'll keep cracking, and hope that someone bails me out with a well informed hint!

geo_c
Old School Hipster, and Such

williwaw
Posts: 1595
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: nmail to neomutt - setting up the accounts.

Post by williwaw »

it's been a while since I used mutt, actually before neomutt became active, but if I understand correctly, neomutt development is a continuation of mutt and not a fork.

And besides that, neomutt appears to be able to send mail SMTP SSL natively, if I'm reading the documentation correctly.

mutt at least, has been able to send with out too much configuration. my guess about your difficulties with smpt, with both readers/clients, may be related to extraordinary configs demanded by google or microsoft if you are trying to send thu them.

making you purposely have to configure html is considered a feature rather than a bug, as there are liabilities with html. guess old school comes with the old unix concept of each program is expected to what "it" does best, and you are free to choose otherwise about the best way to send, retrieve, view, etc.

mutt was originally just a MUA, and only later incorporated a some features of a MTA for sending I think because sendmail was overly complex to config for a single user application.

That said, mutt is highly configurable as a MUA.

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

I finally was able to both read and send mail from my accounts using Neomutt. The config for neomutt can be quite confusing at times, but the real issue came down to the fact that I did not compile correctly from source with the necessary options installed.

Once I recompiled it worked like a charm.

My compile looks like this:

System: Linux 5.4.53 (x86_64)
ncurses: ncurses 6.2.20200212 (compiled with 6.2.20200212)
libidn: 1.33 (compiled with 1.33)
GnuTLS: 3.6.13

Configure options: --gnutls --gss --sasl --ssl --disable-doc

Compilation CFLAGS: -g -O2 -std=c99 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include -DNCURSES_WIDECHAR -I/usr/include/heimdal

Default options:
+attach_headers_color +compose_to_sender +compress +cond_date +debug
+encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color
+initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop
+progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar
+skip_quoted +smtp +status_color +timeout +tls_sni +trash

Compile options:
-autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo +gnutls -gpgme +gss
-hcache -homespool +idn +inotify -locales_hack -lua -mixmaster +nls -notmuch
-openssl +pgp +regex +sasl +smime -sqlite +sun_attachment

MAILPATH="/var/mail"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc"

@williwaw was an enormous help with troubleshooting.

geo_c
Old School Hipster, and Such

williwaw
Posts: 1595
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: nmail to neomutt - setting up the accounts.

Post by williwaw »

geo_

did you get getmail-5 to work? I think you need to create a local spoolfile and set up some local storage folders
there is a config to leave mail on server (in addition to downloading a copy)

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

williwaw wrote: Wed Jul 06, 2022 6:02 pm

geo_

did you get getmail-5 to work? I think you need to create a local spoolfile and set up some local storage folders
there is a config to leave mail on server (in addition to downloading a copy)

Well the way I've been doing it today is to use neomutt's cache function. Adding the line:

set message_cachedir="/mnt/home/dbox.sync.mir/doc.geocachef"

Which deletes files in sync as I delete them from the server using neomutt, but may not stay in sync with the server if they are deleted from some other OS. There are several cache applications in the compile options, but I didn't want to complicate it.

I do use lots of computers and my phone, and keep one of my accounts in sync. I have a local mh mail box that I access with Claws (and formerly Sylpheed) That I use as an archive, that way keeping the imap servers containing only the relevant data.

I'm tempted to go back to pop3. But if I can access the mh box with mutt, and keep the imap accounts, that would work similar to what I'm doing in Claws.

I need to do a lot of playing around to learn mutt enough to make some of those decisions.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

williwaw wrote: Wed Jul 06, 2022 6:02 pm

did you get getmail-5 to work?

And actually, I'm having a more annoying problem, which is not isolated to mutt, but to terminal applications in general, elinks for instance.

When I try to open some mime filetypes in certain terminal apps, like a jpg in elinks, I get one of two things. Opening an html/txt in mutt will try and load the file from /tmp/[file] but the associated application, either elinks, or lynx, or palemoon, or librewolf etc (I tried them all by editing the mailcap file entry) will say it can't find the temp file (which shows the correct address, and the file is there because I check) or as in the case of opening a jpg from elinks, an added file///:root/ gets placed in front of the temp file directory and name. If I manually delete that in palemoon for instance, it still can't find the temp file. So I haven't figured out where these configurations are stored. And I think it may have something to do with the way the tmp directory is linked in fossapup.

I remember mentioning this in another thread awhile back, maybe in one of @rufwoof's threads.

I sort of have a clumsy work around. I save the file to /root/now.html,jpg,txt and open that file with the appropriate application or from midnight commander, which doesn't have this problem.

So my 'now' file is my personal temp file to grab with whatever application. Not quite as cool as just opening it from mutt, or elinks, or lynx.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

Well I seemed to have found the answer to viewing MIME message parts in neomutt.

The answer is so interesting, I thought it was worthy of starting a new topic:

https://forum.puppylinux.com/viewtopic.php?t=6290

geo_c
Old School Hipster, and Such

sonshitsu
Posts: 1
Joined: Wed Oct 19, 2022 8:38 pm

Re: nmail to neomutt - setting up the accounts.

Post by sonshitsu »

geo_c wrote: Sat Jul 02, 2022 9:28 pm

I'm continuing this discussion from @sc0ttman's nmail topic:

viewtopic.php?p=61127#p61127

As I thoroughly enjoyed nmail's easy inbox setup, I was not able to get smtp SSL outgoing mail to work. The interface is a great example of elegant design in my opinion. So I really want to get it working. It's configuration is very basic compared to the endless possibilities of a terminal based mail client like neomutt, which I have avoided for it's not-so-easy setup.

But...

At the suggestion of @williwaw I compiled the latest version of neomutt on Fossapup64. Now I'm trying to set up accounts through neomutt, which as I feared, is not that user friendly.

@williwaw was kind enough to tip me off to the fact that neomutt doesn't retrieve mail without an added application. So I installed getmail-5.1 from the Fossapup repo. And I must say, as much as I'm looking forward to using neomutt, that seems to be a few hours of configuration away. Nmail was really cool in that after compiling and installing, there were only a few entries from the command line to pick up my imap mail from both outlook.office365.com and frontiernet. All of the mail fetch/read functions worked OOTB. But like I said sending SMTP is a different story, and I may contact the developer to see if he has any advice.

Ultimately, I think this is a plot to get me to figure out how mail servers actually work. Maybe if I spend around a hundred hours or so reading and configuring, I'll be able to set up my own server someday. :mrgreen:

I will post my progress on neomutt as it happens.

Thank you.

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

I probably followed up on my success with both of these clients in Scottman's original nmail post, but if not I should state now that I did eventually get nmail and neomutt 100% funtional and these are the only email clients I currently use. Nmail in Fossapup required installing a library as suggested by nmail's creator in this topic: viewtopic.php?p=62281#p62281

Around the time I was firing these CLI mail clients up, msoutlook decided to upgrade their certificate protocol, which caused me a lot of frustration. If I remember correctly, a few days after microsoft cut over to the new certificate requirements I figured out that I should delete my current certificates and then access the account with nmail and neomutt to obtain new ones. That worked. I've been using them ever since, but recently I ran in to the same problem, out of nowhere, my outlook account suddenly stopped working in nmail, neomutt, and claws. This has been an ongoing issue for years, even when I used sylpheed and claws.

So I am again looking to delete my currently stored certificates and try that approach again, but I can't for the life of me figure out where that directory is located, and if I can just delete ALL the certificates and start over, or if doing so might cause some other headache with another application, though I don't use many web-based apps.

@williwaw, do you know where that directory of certificates can be found in fossapup?

geo_c
Old School Hipster, and Such

williwaw
Posts: 1595
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: nmail to neomutt - setting up the accounts.

Post by williwaw »

not specifically about fossapup
have you accessed ms email thru outlook or your browser with the webmail client recently? although seems to me each client should have their own cert file

Dont use ms and feel your pain, There are black friday discounts on other providers running now, I thought I sent a PM a while back but maybe I did not (I cant tell because I recently emptied my PM sent box)

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: nmail to neomutt - setting up the accounts.

Post by geo_c »

williwaw wrote: Fri Nov 18, 2022 1:45 am

not specifically about fossapup
have you accessed ms email thru outlook or your browser with the webmail client recently? although seems to me each client should have their own cert file

Dont use ms and feel your pain, There are black friday discounts on other providers running now, I thought I sent a PM a while back but maybe I did not (I cant tell because I recently emptied my PM sent box)

I have been using the webmail. Hate the outlook interface. So slick you can't tell what's there. Unfortunately this is a work account. So I have to pick it up from the outlook server, or get someone who is an adminstrator to set my forwarding permissions.

Yeah, as far as I can tell each client requests a certificate and then stores it. I just can't remember where exactly. Probably frequently updated big gui's like Thunderbird reset that automatically. But I wouldn't be surprised if microsoft breaks those periodically, just to keep people logging in on their browsers.

Today I did some work on adding a mailcap file in KLV, so that neomutt opens images, audio, video, pdf, office docs, in my preferred applications. Works great. I like the players and viewers in KLV.

geo_c
Old School Hipster, and Such

williams2
Posts: 1023
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 288 times

Re: nmail to neomutt - setting up the accounts.

Post by williams2 »

do you know where that directory of certificates can be found in fossapup?

You can search for types of files using pfind.
Or from the command line.

For example:
/initrd/pup_ro2/
is the basic files of the operating system.

for Fossa 9.5
/initrd/pup_a/
is the main part if the operating system files.

/initrd/pup_rw/
is the save layer
which might be the save file
or if you have a usb flash drive,
this will be ram
/initrd/pup_rw/
and this will be the save file (and is writable, not read only)
/initrd/pup_ro1/

And certificate files are often .pem or .crt

Like this:

Code: Select all

find /initrd/pup_ro2/ | grep -i ssl

## or if you like:

find /initrd/pup_ro2/ /initrd/pup_a/ /initrd/pup_ro1/ /initrd/pup_ro1/ | grep --color -Ei 'ssl|pem$|crt$'

## or you can split the line ay the pipe character |

find /initrd/pup_ro2/ /initrd/pup_a/ /initrd/pup_ro1/ /initrd/pup_ro1/ |
grep --color -Ei 'ssl|pem$|crt$'
Post Reply

Return to “Business”