Re: How to use/integrate "notmuch" with Mutt

2021-02-08 Thread boB Stepp

On 21/02/09 12:23PM, Cameron Simpson wrote:

On 08Feb2021 17:17, boB Stepp  wrote:

My online research into "notmuch" does not seem to be giving my expected
results.  My _expectations_ going into this were that with "notmuch" I
could:

1) Open an email in Mutt.

2) Based on that email and its contents assign relevant tags to the email
via notmuch.  These tags would prove useful in the future when searching
for tagged content.

3) From within Mutt I could initiate a notmuch search across _all_ of my
mail directories.  After notmuch returns the search results I could open
any of these emails from within Mutt.

4) Et cetera.  Meaning similar types of actions initiated from *within*
Mutt.  That seems to be key.


Hmm.  I've installed notmuch and notmuch-mutt, both version 0.29.3 dated
2019-11-27 from my package manager.  I was concerned that they wouldn't
properly work with my more current Mutt 2.0.5, but so far I have not
detected any issues.  I used the macros suggested on the ArchLinux wiki I
mentioned in my earlier response to Cameron.  F8 allows me to search all
mailboxes from within Mutt.  The results show up inside a (I guess)
temporary mailbox.  I can open these and do usual Mutt-like stuff.  F9
supposedly reconstructs threads from emails scattered over multiple
mailboxes.  I haven't tested this one yet.  F6 did not do what I thought it
would do from the description.  Apparently all it does is remove the inbox
tag from all emails is the current search results.  In the man pages for
notmuch-mutt it suggests that the portion of the macro "-inbox" can be
replaced with a different tag.

I don't have a good understanding of this macro.  I will paste it in below:

macro index  \
"set my_old_pipe_decode=\$pipe_decode
my_old_wait_key=\$wait_key nopipe_decode nowait_key\
notmuch-mutt tag -- -inbox\
set pipe_decode=\$my_old_pipe_decode
wait_key=\$my_old_wait_key" \
"notmuch: remove message from inbox"

I have a question:  Can this be modified so that the user is prompted to
enter a tag name which can then be applied to all of the search results?
If yes, then that would be wonderful for what I have in mind.  Even better
would be the ability to enter multiple tags after pressing F6.

To finish up I have modified my crontab entry to run "notmuch new --quiet"
after it runs the "mbsync -a -qq" command at five minute intervals.  So far
things seem to be running well.

A perhaps better way of doing this scheduling would be the recommendations
at the ArchLinux wiki at
https://wiki.archlinux.org/index.php/Isync#Integration_with_notmuch_or_mu4e
However, this would require me to do some research on systemd, configuring
and starting services, etc.  Perhaps I'll investigate this later, but
perhaps someone more knowledgeable than me will find this link useful.

--
Wishing you only the best,

boB Stepp


Re: How to use/integrate "notmuch" with Mutt

2021-02-08 Thread boB Stepp

On 21/02/09 12:23PM, Cameron Simpson wrote:

On 08Feb2021 17:17, boB Stepp  wrote:



I'm not using notmuch's tagging facility; I only use it for search. And
that infrequently.


It is this facility that I especially find intriguing if I can make it do
what I hope.


Notmuch itself lives outside mutt. You set it up with "notmuch setup"
and keep it up to date with the "notmuch new" command. (See "man
notmuch-setup" and "man notmuch-new".)


I have gathered this much so far.  I will probably go ahead and install it
and notmuch-mutt and see what I can easily make it do.  Apparently NeoMutt
has integrated notmuch-mutt into their distribution.  Out of curiosity, do
the Mutt developers have any inclinations in this direction?


I've a script for performing a notmuch search and building a result
Maildir containing the search results, and popping up that Maildir in
mutt:

   https://hg.sr.ht/~cameron-simpson/css/browse/bin/notmuch-search?tip

and I routinely invoke it via a stub script with a shorter name which
includes the -t option (includes threads containing the matching
messages).


Will look at this soon, but I wonder if you have independently have
developed similar functionality to what notmuch-mutt is supposed to supply?


Can someone clarify what I can and cannot do with notmuch from *within*
Mutt?  Provide more informative online articles then perhaps I have found?


You could easily write a mutt macro to invoke such a search from within
mutt itself. I haven't myself. I just issue a search from the command
line via my script.


Are you thinking of something like this on the ArchLinux Wiki:
https://wiki.archlinux.org/index.php/Notmuch#Integrating_with_mutt

--
Wishing you only the best,

boB Stepp


Re: How to use/integrate "notmuch" with Mutt

2021-02-08 Thread Cameron Simpson
On 08Feb2021 17:17, boB Stepp  wrote:
>My online research into "notmuch" does not seem to be giving my expected
>results.  My _expectations_ going into this were that with "notmuch" I
>could:
>
>1) Open an email in Mutt.
>
>2) Based on that email and its contents assign relevant tags to the email
>via notmuch.  These tags would prove useful in the future when searching
>for tagged content.
>
>3) From within Mutt I could initiate a notmuch search across _all_ of my
>mail directories.  After notmuch returns the search results I could open
>any of these emails from within Mutt.
>
>4) Et cetera.  Meaning similar types of actions initiated from *within*
>Mutt.  That seems to be key.

I'm not using notmuch's tagging facility; I only use it for search. And 
that infrequently.

Notmuch itself lives outside mutt. You set it up with "notmuch setup" 
and keep it up to date with the "notmuch new" command. (See "man 
notmuch-setup" and "man notmuch-new".)

I've a script for performing a notmuch search and building a result 
Maildir containing the search results, and popping up that Maildir in 
mutt:

https://hg.sr.ht/~cameron-simpson/css/browse/bin/notmuch-search?tip

and I routinely invoke it via a stub script with a shorter name which 
includes the -t option (includes threads containing the matching 
messages).

>Can someone clarify what I can and cannot do with notmuch from *within*
>Mutt?  Provide more informative online articles then perhaps I have found?

You could easily write a mutt macro to invoke such a search from within 
mutt itself. I haven't myself. I just issue a search from the command 
line via my script.

Cheers,
Cameron Simpson 


Truncated link in html email

2021-02-08 Thread boB Stepp

This was rejected from the Mutt server the first time.  Am resending...

On 21/02/08 07:04PM, boB Stepp wrote:

Just now I came across one of those html emails that Mutt + urlview does
not seem to be able to handle.  This was an email from the clinic I go to
that has embedded a "CLICK TO CHECK-IN" button.  Upon opening it in Mutt,
hitting "v" to view attachments, hitting  to view it with w3m and
finally Ctrl-B to bring up urlview of the links I found that the button's
link was truncated.  What would cause this and how might I remedy the
situation for the future?

TIA!

--
Wishing you only the best,

boB Stepp


How to use/integrate "notmuch" with Mutt

2021-02-08 Thread boB Stepp

My online research into "notmuch" does not seem to be giving my expected
results.  My _expectations_ going into this were that with "notmuch" I
could:

1) Open an email in Mutt.

2) Based on that email and its contents assign relevant tags to the email
via notmuch.  These tags would prove useful in the future when searching
for tagged content.

3) From within Mutt I could initiate a notmuch search across _all_ of my
mail directories.  After notmuch returns the search results I could open
any of these emails from within Mutt.

4) Et cetera.  Meaning similar types of actions initiated from *within*
Mutt.  That seems to be key.

Perhaps I am misunderstanding what I am finding online.  I see that
installing notmuch from my system's package manager should be easy, though
I probably won't get the latest, greatest.  Initial configuration would
seems to be easily done from the command line.  Initial indexing seems to
be easily done from the command line.  It looks like I need to install the
notmuch-mutt package.  But after that it does not appear obvious from what
I am reading that my above expectations are realistic.

Can someone clarify what I can and cannot do with notmuch from *within*
Mutt?  Provide more informative online articles then perhaps I have found?

TIA!

--
Wishing you only the best,

boB Stepp


Re: not to set message id in outgoing email

2021-02-08 Thread Derek Martin
On Wed, Feb 03, 2021 at 08:23:18PM -0600, Peng Yu wrote:
> On Wed, Feb 3, 2021 at 11:23 AM Will Yardley
>  wrote:
> >
> > On Wed, Feb 03, 2021 at 08:57:32AM -0600, Peng Yu wrote:
> > >
> > > When I use mutt to construct an outgoing email, is there a way not to
> > > set the message id? Thanks.
> >
> > Even if Mutt doesn't set one, the first MTA it hits will add one.
> 
> I want the first MTA add one, instead of using the one generated by mutt.

OK, but that's not really an answer.  What problem are you trying to
solve with this behavior?

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



signature.asc
Description: PGP signature


Re: My experiences with Mutt to date: Suggestions for overcoming some issues

2021-02-08 Thread boB Stepp

I thought I would update folks on what I have done and solicit feedback as
indicated.

On 21/01/31 09:16PM, boB Stepp wrote:


1)  I eventually want to migrate all of my Gmail to ProtonMail.  I will
probably never entirely get rid of Gmail...


Based on previous advice here I am in the process of setting up my local
Mutt infrastructure to be able to handle multiple email accounts.  My local
mail file structure is now:

~
/ Mail
/ Gmail
/ Archive
/ Drafts
/ Inbox
/ Sent
/ Spam
/ Trash
/ ProtonMail

Contents are Maildir format.  I have eliminated all of the labeling/nested
labeling I had applied to my Gmail account and reduced the IMAP
accessibility to only see the above labels with the caveat that "Archive"
is on the Gmail side "All Mail".  I hope I don't regret the labeling
removal!

Today's task is to understand and install/configure "notmuch" to search
through this locally stored mail.


2)  I would like to remove all email storage from the cloud, that is,
whether Gmail or ProtonMail, ...


For now I am abandoning this goal as it was pointed out that I might want
to access certain archived emails from my phone or some other device
outside of my PC.  I still wonder, though, if I should pare down what is
stored in the Gmail cloud to the absolute minimum necessary, but retain the
full archive on my PC?  But this may be too hard and time-intensive and
would appear to violate the bidirectional syncing between my PC and Gmail.


3)  I would like my local storage of my emails to allow for me to store
certain content types in sensible folders...


Hopefully "notmuch" will make this goal unnecessary.


4)  I would like to be able to quickly search through all locally stored
emails...


"notmuch"


5)  I would like to be able to auto-backup locally stored emails on my PC
to another hard drive on my local network.  I guess this would be
facilitated by a sensible organization of my PC's email storage?


Remains to be implemented.  The above folder structure should make this
trivial to accomplish.

Using the above folder structure I have installed isync/mbsync and msmtp.
Both programs can easily handle multiple email accounts.  Currently I only
have Gmail setup, but once I have worked out all of the details, I will add
my ProtonMail account and start the transition from Gmail to ProtonMail.

I have setup a crontab job (My first ever!) to run mbsync every five
minutes.  Mutt checks the local mail much more frequently.  Probably should
make this a similar time interval to the crontab interval.  I was concerned
that if there were to be a network interruption or when my router reboots
at 3 AM that mbsync would hang, but after one day of this it did not.  I do
have a question about this though.

The original crontab command to run was:

killall mbsync &>/dev/null; /usr/bin/mbsync -a -qq

The thought was that if mbsync hung up due to a connectivity issue then the
"killall mbsync" would solve this and reissue the command afresh.  But I
could never get this to work.  When I checked my crontab logs I saw:

Feb  8 01:35:01 Dream-Machine1 CRON[612121]: (bob) CMD (killall mbsync
&>/dev/null; /usr/bin/mbsync -a -qq )
Feb  8 01:35:01 Dream-Machine1 CRON[612119]: (CRON) info (No MTA installed,
discarding output)

I never got this to work and I do not understand why it does not work.  Can
anyone shed any light on this?

So I changed the command to:

mbsync -a -qq

and everything has been working.  I was curious as to what would happen at
3 AM when my router would reboot.  I got:

Feb  8 03:00:01 Dream-Machine1 CRON[614314]: (bob) CMD (mbsync -a -qq )
Feb  8 03:00:24 Dream-Machine1 CRON[614312]: (CRON) info (No MTA installed,
discarding output)

Hmm.  The same "No MTA installed, discarding output" as with the originally
worded command.  More information, but I still do not see why this message
is generated.

Anyway, so far, results-wise, I am extremely pleased with the improved
responsiveness of Mutt.  I thought Mutt was fast when it was doing all of
the IMAP/smtp stuff itself.  Now it is crazy instantaneous access to the
local mail stores!  Really like it!!

One concern based on earlier discussion in this thread.  I am now using
msmtp as my MTA client.  What will happen if I send an email when, for
whatever reason, Gmail connectivity is broken?  Will it get resent?  Will I
get a notification?  I do not understand msmtp well enough (yet) to answer
this.  I suppose I could experiment and disconnect from my network, send an
email and see what happens...

Now on to "notmuch" and see what I can do about searching through my
currently unlabeled/untagged email store.

Any further guidance is always both solicited and welcome!  Thanks for all
of the help to date.

--
Wishing you only the best,

boB Stepp


Re: Passphrase error

2021-02-08 Thread Øyvind A . Holm
On 2021-02-07 09:27:03, Rob Pyott wrote:
> Hello Mutt team!
>
> I installed Mutt on AntiX Linux and can read my Yahoo mail. When 
> sending though, I’m asked for a passphrase. I don’t have one, so then 
> I get “no key specified” and I can’t send.
>
> My muttrc is basic with nothing on passphrase or SMIME.

I don't use Yahoo Mail, but I use Mutt against Gmail. In the old days it 
worked with a passphrase, but three years ago I had to install an "app 
password". I created this password from my Google Account page and Mutt 
uses this password to access Gmail. In my `.muttrc` I have this line:

set imap_pass=`cat ~/.mutt-gmail`

Maybe Yahoo has a similar system you can use.

Øyvind

geo:60.38,5.33;u=500
OpenPGP fingerprint: A006 05D6 E676 B319 55E2  E77E FB0C BEE8 94A5 06E5
2dea8da8-6a1e-11eb-915c-5582e081d110


Re: trouble making my "messages needing a reply" pattern

2021-02-08 Thread Cameron Simpson
On 07Feb2021 19:04, Kevin J. McCarthy  wrote:
>On Mon, Feb 08, 2021 at 12:49:32PM +1100, Cameron Simpson wrote:
>>I've winnowed my failing pattern down to
>>   ~( !~>(~P) )
>>which is not accepted.
>
>I think this is from a small bug with trailing whitespace inside 
>parentheses.  Try
>  ~(!~>(~P))

Thanks, that works. Cheers, Cameron