Re: Strange problem on new system with versus (or linefeed versus carriage return)

2024-05-09 Thread Jon LaBadie

On Thu, May 09, 2024 at 05:59:39PM +0200, Dennis Preiser wrote:

On Thu, May 09, 2024 at 04:24:56PM +0100, Chris Green wrote:

I have the following in muttrc so that hitting 'Enter' (the CR key) on
the keyboard sends an E-Mail after composing it:-

bindcompose \n send-message # rather than 'y'

This works as intended on the old system but not on the new system, it
would seem that mutt sees the 'Enter' key as CR (0x0d) on the new
system whereas on the old system it sees it as LF (0x0a).
Can anyone explain why this is and, more to the point, tell me how to



From the documentation:


| 6.2. Enter versus Return
|
| Prior to version 2.2, Mutt used a default ncurses mode (“nl()”). This
| mode maps keyboard input of either  or  to the same
| value, which Mutt interpreted as  internally.
|
| However, starting in version 2.2, this mode is turned off, allowing
|  and  to be mapped separately, if desired. The default
| keyboard mappings set both, but you can override this or create new
| bindings with one or the other (or both).
|
| Note that in terminal application, such as Mutt,  is the same as
| “\n” and ^J; while  is the same as “\r” and ^M.


Kudos to the document writers!  It is nice to see readable
and complete documentation.




fix it?



bindcompose \r send-message # rather than 'y'



--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: Pipe and replace message

2023-11-23 Thread Jon LaBadie

On Wed, Nov 22, 2023 at 08:12:17PM +0100, David Santinoli wrote:


Hallo,

I could not find a way to pipe a message to an external filter and have
the output replace the original message.  As a workaround I open the
message in vim, pipe the whole buffer to the filter, and save it back as
a new message while the original one gets marked for deletion.
It works but it's a bit cumbersome.  Anything more straightforward —
possibly from the index screen?

I'm using mutt 2.1.4 as included in Ubuntu 22.04.


Still doing the same thing, but perhaps reducing keystrokes to 2 total.

In your ~/.vimrc file, map a key sequence of your choice to do the work.
For example:

  map  !Gpr -t -d^M:wq^M  


Here I'm mapping my function key F3.  I sometimes use ",," or ",x" as
my mapped sequence.

Editing your message from the index positions the cursor on the first
blank line after the headers.  "!G" sends line to a filter.  The lines
are the current one to the end of the file.  If you want the headers
sent to the filter shift the cursor first.  Such as:

  map  1G!G...

My example filter "pr -t -d" merely double spaces the lines.  Replace
with a call to your filter.

The ^M (essentially ) is typed in as -V followed by the
 key.

The modified message is then saved and the editor exited with:

  :wq^M

The ^M typed as described above.

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: [OT-ish] Want command line program to selectively delete emails

2023-08-04 Thread Jon LaBadie

On Fri, Aug 04, 2023 at 02:34:44PM -0400, Ed Blackman wrote:

Any suggestions for a command line program to select emails for deletion based on command 
line options?  I specifically want one that can remove emails that were received more 
than X days ago, but can also express "but don't delete if they're flagged".

I had been using archivemail 
(https://manpages.debian.org/buster/archivemail/archivemail.1.en.html) from 
cron to delete emails in certain folders. It saves me from having to manually 
go in and purge folders for lists that I want to have available, but don't ever 
read old messages.

It allows commands like:
archivemail --quiet --delete --days=30 ~/mail/folder1/
archivemail --quiet --delete --days=30 --include-flagged ~/mail/folder2/

It supports reading Maildir, IMAP, mbox, MH, but the mailboxes I need to purge 
are all maildir.

When I recently upgraded to Debian 12, I found that archivemail has been 
removed from Debian because it's an unmaintained Python 2 program.

I could probably port archivemail to Python3 with enough time.



I make extensive, but very basic, use of archivemail.  I'm concerned 
about its going away.  Does anyone know of an equivalent, maintained,

program?  Shame if it is dropped.  Though the last update was what,
2011 I think, it has caused no problems, it just works.

Jon


--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: Default save mailbox from a script

2023-07-31 Thread Jon LaBadie

On Sun, Jul 30, 2023 at 03:59:57PM +0200, Nicolas George wrote:

Hi.

I want to use an external command to decide in what mailbox to save
messages.

When I hit ‘s’ with its default action of save-message, mutt asks
“Save to mailbox ('?' for list): =ml/debian”, with the default being
chosen from save-hooks or from the author of the mail.

What I want is that it invokes an external command to set the default.
The idea is that the external command has access to an index of my
mailboxes and implements heuristics of my choosing to store the mail,
but I can still use Mutt's user interface to make a different decision.

What I want could look a little bit like:

save-hook * `~/local/lib/guess_mailbox`

Except it does not work in two ways:

- the backticks are evaluated once when loading the configuration, they
 need to be evaluated when saving the message, each time;

- the command in the backticks need access to the content of the mail.

I am considering a solution based on a macro that pipes the message to
the command and generate a temporary configuration file, then sources it
then saves normally.

Also, I would like to avoid any solution that would slow down Mutt when
I am not trying to save a message. A message-hook invoking guess_mailbox
would probably not be acceptable, for example.

Any advice?


An alternative approach that I'm not sure is possible.

If during delivery of your mail it is passes through
a filter like "procmail" before hitting your Inbox,
have the filter invoke your hueristics program "guess".
Guess could use something like "formail" to add a header

 X-guess: 

This would move the slow aspect to before you read the
message.

The save "s" command could then be macro'ed to: 
 - if no X-guess header invoke regular  cmd

 - if X-guess header present extract suggested folder
   and save there

jl

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: [SOLVED] filter on date

2023-06-02 Thread Jon LaBadie

On Fri, Jun 02, 2023 at 04:33:27PM +0200, steve wrote:

Brilliant! Problem solved.

Thanks to every one who helped me.

  ~ steve ~


An alternative approach - non mutt - is something like
grepmail to pull copies of the messages you want.

Original is left intact until you are sure you have
what you want.

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: test shell env in .muttrc

2022-12-07 Thread Jon LaBadie

On Mon, Dec 05, 2022 at 06:18:05PM -0800, Will Yardley wrote:

On Mon, Dec 05, 2022 at 08:26:16PM -0500, Jon LaBadie wrote:


Perhaps I've overlooked the facility.  Is there a way to test the
shell environment in .muttrc?  Basically an "if" statement.

I enter mutt in several ways (direct, aliases, shell scripts,
functions, etc) and from several devices.  My smart phone needs a
different color scheme than the other devices.


I think there may be an internal way as well, but one option would be to
set an env var (e.g., TYPE) depending on the type of session, and then
do something like (untested):

source ~/.mutt/colors.${TYPE:-default}


Nice suggestion Will, tnx.

I chose XDG_SESSION_TYPE (automatically set: so far to either x11 or 
tty) and it seems to be doing what I was looking for.


--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



test shell env in .muttrc

2022-12-05 Thread Jon LaBadie

Perhaps I've overlooked the facility.  Is there a way to
test the shell environment in .muttrc?  Basically an "if"
statement.

I enter mutt in several ways (direct, aliases, shell scripts,
functions, etc) and from several devices.  My smart phone
needs a different color scheme than the other devices.

It is easy enough to use a macro I have to rotate among
several color schemes, but I would prefer to automate it
on entry if possible.

Jon

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: mark as read

2022-10-03 Thread Jon LaBadie

Thanks Tim and John.  WN is doing what I was looking for
with tagged messages.

Interesting, the 'N' is case insensitive.

jl

On Sun, Oct 02, 2022 at 10:02:22PM +, Tim Chase wrote:

On 2022-10-02 17:23, Jon LaBadie wrote:

Maybe I'm overlooking something.  A "mark as read" command
that works with tagged messages.


I've used W (clear-flag) to clear the N and O options, which can
be used as the operator for a ";"-work-on-tagged-messages if you
want.

-tkc




End of included message <<<


On Sun, Oct 02, 2022 at 06:02:56PM -0400, John Hawkinson wrote:

Jon LaBadie  wrote on Sun,  2 Oct 2022
at 17:23:17 EDT in :


Maybe I'm overlooking something.  A "mark as read" command
that works with tagged messages.


You can use the set-flag command (bound to 'w') with atagged group, so:

 ;wN

to set the 'N' flag on the tagged messages.

And similarly clear-flag ('W') for the opposite situation.

(I don't understand Patrick's reply)




--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



mark as read

2022-10-02 Thread Jon LaBadie

Maybe I'm overlooking something.  A "mark as read" command
that works with tagged messages.

Sometimes I'll select and tag a group of messages I want to
do something with.  Perhaps delete or perhaps save as a
group.  If I'm going to save them I might want to mark them
as read (even if I haven't really read them :).

So, use the semicolon (;) and enter the " N" command
that toggles the 'N' flag.  Whoops, it "toggles" the flag,
so anything I have read gets the N flag turned on.

Maybe " R", "mark the current thread as read".  Whoops,
they are not all the same thread, so only one message gets
marked as read.

Is there any command that will work with tagged messages to
mark them as read irrespective of their current status or
thread status?


--
Jon H. LaBadie mut...@jgcomp.com
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: Postponing and forwarding

2022-09-01 Thread Jon LaBadie

On Wed, Aug 31, 2022 at 07:27:19PM +0200, Jan Eden via Mutt-users wrote:


On 2022-08-31 11:51, X Tec wrote:

...



Also, how can I *forward* messages to other users?


Just hit f while the message is selected in the pager.



An alternative to forwarding is "bouncing"
using "B" rather than "f".

When bouncing, the message body and the subject line
are unchanged.  You have no opportunity to add comments.

I use it mostly for email that should have been addressed
to both my wife and myself but only came to me.  I bounce
it to my wife and she has a clean copy as if she were
addressed in the original "To:" or "Cc:" lists.


--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: vs. / vs.

2022-03-24 Thread Jon LaBadie

On Wed, Mar 23, 2022 at 03:01:31PM -0600, Jon Brinkmann wrote:

First the background:

I'm forced to use a Microsoft Exchange server for my email.  It's configured
(not by me) to tag SPF incorrectly authorized and other suspect messages
as "Undeliverable". It always attaches the original message with the full
original header as attachment 5.  Here's what the "v" command shows for a
typical message:

I   1 [multipa/alternativ, 7bit, nK]
I   2 [text/plain, quoted, us-ascii, nK]
I   3 [text/html, quoted, us-ascii, nK]
I   4 [message/delivery-s, 7bit, nK]
I   5   [message/rfc822, 7bit, nK]
I   6 [multipa/alternativ, 7bit, nK]
I   7 [text/plain, quoted, iso-8859-1, nK]
I   8 [text/html, quoted, iso-8859-1, nK]

I'm working to extract the original message and send it back through procmail
to be properly sorted into my mailboxes.  I've mapped this process to the
'E' key:

macro index E '5procmail;tail 
procmail.log' 'extract & process a message that Microsoft Exchange called undeliverable'

It works great, with one problem:  doesn't pass the mailbox
delimiting "From [email_address] [message_date]" to procmail, which sorts and
writes what it received to a file that's not recognized as a mailbox by mutt.
Is there some way to tell  to pass the delimiter line?  If not,
should this be a code change request?

FYI, it appears that  and  are identical.  At
least they produce identical results.

I could work around the problem by using  (and it appears
that  and  are also identical) which does pass
the delimiter line.  I'd have to save the attachment to a temporary file,
redirect it to procmail and then delete the file.  I'd prefer not to do this
if possible.

I also realize that  is a simpler operation than .
The latter has to deal with, among other things, a pre-existing file with
older messages, file locking, etc.

Thanks,

Jon

End of included message <<<


I sometimes use the program "formail" to add a "From_" line.
It does not seem to pickup the originator from the "From:"
line but from some other entry like "Sender:" or "Return-To:".

Formail can output to stdout or to a specified program.
You might be able to replace "procmail;" in
your macro above with "formail -ds procmail;".

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: Unexplained mutt error

2022-02-25 Thread Jon LaBadie

On Fri, Feb 25, 2022 at 06:25:01PM -0600, Ranjan Maitra wrote:

On Fri Feb25'22 04:31:32PM, Jon LaBadie wrote:

From: Jon LaBadie 
Date: Fri, 25 Feb 2022 16:31:32 -0500
To: mutt-users@mutt.org
Subject: Re: Unexplained mutt error

On Fri, Feb 25, 2022 at 01:33:52PM -0600, Ranjan Maitra wrote:
>
> My apologies, I guess I was not at all clear in my question. I want a
> hook which if I press "r" would give me a query about if I want to
> answer to the list or reply to the sender.
>

Doesn't the "reply_to" setting allow you to do that already.



It does? I have:

set reply_to=yes

I had no idea about this and I looked it up. So I guess I should put
this as a hook inside my list folders. I will try that, thanks!



Have you overlooked the "Type:" for reply_to?  It is type "quadoption".

So instead of just settings yes and no, I think there are 2 additional
settings, "ask-yes" and "ask-no".  Again, I think the "-yes" and "-no"
are the defaults when you just press Enter as your answer.

Jon

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: Unexplained mutt error

2022-02-25 Thread Jon LaBadie

On Fri, Feb 25, 2022 at 01:33:52PM -0600, Ranjan Maitra wrote:


My apologies, I guess I was not at all clear in my question. I want a
hook which if I press "r" would give me a query about if I want to
answer to the list or reply to the sender.



Doesn't the "reply_to" setting allow you to do that already.

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: pretty-print mutt emails

2021-11-22 Thread Jon LaBadie

On Mon, Nov 22, 2021 at 01:56:58PM +, Globe Trotter via Mutt-users wrote:

On Monday, November 22, 2021, 02:53:17 AM CST, Anders Damsgaard 
 wrote:



I use the following sh(1) script to format the message as troff andconvert to 
pdf: https://adamsgaard.dk/tmp/muttprint-groff.sh



It's a bit ugly in places, but it works for me.  This is an example:


https://adamsgaard.dk/tmp/muttprint-example.pdf


I bind it in my muttrc with the following:



    set print_command="$HOME/.config/mutt/muttprint-groff.sh"


This gives me the following errors:

infile = /home/gt/tmp/mutt_SnvEqj
tmpfile = /home/gt/tmp/mutt_KAdWKA
outfile = /home/gt/tmp/mutt_f8z8fN.pdf
formatting /home/gt/tmp/mutt_SnvEqj to groff format in /home/gt/tmp/mutt_KAdWKA
running groff /home/gt/tmp/mutt_KAdWKA /home/gt/tmp/mutt_f8z8fN.pdf
troff: fatal error: can't find macro file s


Ahh, long ago, fondly remembered troff days.

It appears the groff invocation asks for a macro package "s"
(aka "ms" macros) that are not found on your system.

On my Fedora 34 system, there are two groff packages, "groff-base"
and "groff".  The ms macros are in the groff-base package but not
in the groff package.

Jon


Press any key to continue...

I don't quite get what the problem is.

Thanks again!

End of included message <<<


--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Why uw.edu not accepted my signed email?

2021-11-16 Thread Jon LaBadie

On Tue, Nov 16, 2021 at 07:29:01PM +, Claus Assmann wrote:

On Tue, Nov 16, 2021, Andrew D. Arenson wrote:


Deferred: 403 4.7.0 TLS handshake failed.


This has nothing to do with the content of the mail, it's a problem
between the program you use to send (submit?) the mail at the SMTP
level and the MTA at uw.edu.
Do you use mutt directly for this or some MTA?
Check whatever (START)TLS configuration you use for that.



Recently there was a problem with whois and ".edu".

Perhaps it also affected DNS?

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: OT: "domain-level" email hosting services?

2021-10-23 Thread Jon LaBadie

On Sat, Oct 23, 2021 at 02:28:43PM -0400, Nathan Stratton Treadway wrote:

On Sat, Oct 23, 2021 at 10:04:57 -0400, Patrick Shanahan wrote:

I have done the same for >20 years.  but I do use relays for quite a bit.


Relaying outgoing email (i.e. what I sent out from Mutt running at home)
via my ISP's "submission"/port 587  service seems straightforward.



If you are going to continue running an inbound mail server but
are losing your ISP for outgoing mail I've had good experience
with SMTP2GO.  My outgoing volume is small and they have a free
service for upto 1000 messages/month.  They also say they will
slow down delivery if you send more than 25 messages/hr.  But I
weekly send a notice to 40+ club members and have never noticed
any slow down.

Jon

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: displaying html links inside mutt

2021-09-10 Thread Jon LaBadie

On Fri, Sep 10, 2021 at 05:22:18PM +, Globe Trotter via Mutt-users wrote:


As an aside, is it possible to forward html messages (that only arrive as 
text/html)
as attachments? Forwarding incorporates them as text and does not carry 
forward the hidden link.


Not for that purpose, but I sometimes "bounce" (bound to "B" in my mutt) 
messages to a new recipient.  The entire message is resent as if it were

originally addressed to the new recipient.  The headers will still show
that the message passed through your system, but the new recipient may
not even realize it was first addressed to you.

To my knowledge, you can't add any comments to the bounced message.

--
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: multiple color schemes

2021-09-08 Thread Jon LaBadie

On Wed, Sep 08, 2021 at 04:23:59PM +0300, Oleg A. Mamontov wrote:

On Wed, Sep 08, 2021 at 01:20:27AM -0400, Jon LaBadie wrote:

I've always preferred a black letters on white background scheme.
However, after cataract surgery I'm considering using a dark
background scheme.

Has anyone a technique for defining multiple color schemes and
toggling among them while using mutt?

I already keep my color scheme in a separate file and source
that file from ~/.muttrc.  To extend that, I created two
files for light and dark schemes and separate macros (,l and ,d)
to source them while running mutt.

I'd like to reduce that to a single macro that toggles between
the files or one that allows selecting from multiple scheme
files, perhaps in round robin fashion.


You can try something like below approach with dynamically redefined
macro:

~/.muttrc
---
macro index XX source ~/.mutt/colors1.muttrc
---

~/.mutt/colors1.muttrc
---
# colors #1
macro index XX source ~/.mutt/colors2.muttrc
---

~/.mutt/colors2.muttrc
---
# colors #2
macro index XX source ~/.mutt/colors1.muttrc
---


Interesting approach.

Some interpreted languages prevent the redefinition
of a macro while that macro is executing.  Not sure
about mutt's interpreter, I'll have to check.

thanks,

--
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: multiple color schemes

2021-09-08 Thread Jon LaBadie

On Wed, Sep 08, 2021 at 04:31:11PM +1000, raf wrote:

On Wed, Sep 08, 2021 at 01:20:27AM -0400, Jon LaBadie  wrote:


I've always preferred a black letters on white background scheme.
However, after cataract surgery I'm considering using a dark
background scheme.

Has anyone a technique for defining multiple color schemes and
toggling among them while using mutt?

I already keep my color scheme in a separate file and source
that file from ~/.muttrc.  To extend that, I created two
files for light and dark schemes and separate macros (,l and ,d)
to source them while running mutt.

I'd like to reduce that to a single macro that toggles between
the files or one that allows selecting from multiple scheme
files, perhaps in round robin fashion.


Someone else will probably give a better answer, but
here goes. If you have different colour schemes setup
in different files, you can probably set up a macro in
your ~/.muttrc that enables the colour scheme you want
by sourcing the relevant file. e.g. something like:

 macro index something :source colour-scheme-1.muttrc\n
 macro index something :source colour-scheme-2.muttrc\n

Where "something" is a key sequence that doesn't
already do something you care about (e.g. A1, A2). 


That is exactly what I've currently implemented.

For macro names, I sometimes pick my favorite single letter
and add a leading comma.  So my two macros are named ,d (dark)
and ,l (light).


Toggling will be more complicated, but doable, if it's really
needed. It might involve having the macro source a single file,
and also run an external command that replaces the contents of
that file with the "other" file. e.g. something like:


schemes that edit or copy files seem too prone to unanticipated
mess-ups.

Jon
--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


multiple color schemes

2021-09-07 Thread Jon LaBadie

I've always preferred a black letters on white background scheme.
However, after cataract surgery I'm considering using a dark
background scheme.

Has anyone a technique for defining multiple color schemes and
toggling among them while using mutt?

I already keep my color scheme in a separate file and source
that file from ~/.muttrc.  To extend that, I created two
files for light and dark schemes and separate macros (,l and ,d)
to source them while running mutt.

I'd like to reduce that to a single macro that toggles between
the files or one that allows selecting from multiple scheme
files, perhaps in round robin fashion.

--
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: custom macro for "q" key

2021-09-01 Thread Jon LaBadie

On Wed, Sep 01, 2021 at 08:04:29AM +0200, Fourhundred Thecat wrote:

On 2021-08-30 14:28, li...@ifohancroft.com wrote:

...


 macro  index,pager  c  "?"
 macro  indexq  "?"
 bind   browser  q  exit

But it does not behave as I expected:



Likely showing my mutt-ignorance here, but ...

You are defining macros in the index and pager.
Why the switch to bind instead of a macro for the browser?

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Retrieve inbox contents and email body

2021-07-07 Thread Jon LaBadie

On Wed, Jul 07, 2021 at 09:56:10PM +0200, Julius Hamilton wrote:

Unfortunately, I have been trying to get going with some simple tools like
grepmail and mail and I can't find an answer to a simple question I have.

How are these tools configured? It seems like grepmail looks in mailbox
directories already saved in your filesystem, instead of there being some
kind of configuration file or .rc file where you put in your IMAP and SMTP
info. So I would need to already have downloaded a mailbox onto my system.


Well the manpage you read says a required argument to grepmail is 
"file(s)".  That sounds local to me.



Could anyone provide me with some simple steps to download my Gmail inbox
to my filesystem as a mailbox, so that I could grepmail through it? I did
read that the mailbox could be saved to var/mail or just $HOME. In either
case I think grepmail can search for it and find it.


Didn't know, I have google send my gmail to my home account.

I expected you could just select the desired gmail messages and download 
them.  Found out you can only do single messages that way.


Asking google how to do it got me to takeout.google.com.  Google lets
you download all your data throught "takeout".  Its a little clumsy,
but if you deselect all and reselect just "mail", you can download
all your gmail (trash, spam, and archive included :)).

jl

--
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Retrieve inbox contents and email body

2021-07-06 Thread Jon LaBadie

On Tue, Jul 06, 2021 at 06:19:54PM +0200, Julius Hamilton wrote:

Thanks very much.

I am now looking into using a Python IMAP library.

However, I think there must be a way to just dump the contents of a Mutt
page, and that could be an easier short-term solution.
You mentioned there being a print function.
Could you provide an example of using that to print the inbox to stdout? It
would have to be automatic, i.e. not requiring the user to actually open
Mutt themselves and type the print command. So that leads me to the
question of if this command can somehow be passed to mutt as a command line
option, or if there is some bash automation tool for calling it inside Mutt
anyway.

The context is that I just would like to send emails and check for
responses in a more precise and quick way than opening my inbox. I would
like to have commands at my disposal when I am working on something to just
send an email directly and later check for responses to that email, or
check for all new emails from a particular sender. That info would need to
come back as the output of commands, to stdout.

Thanks very much,
Julius


If looking at separate programs, what about "grepmail"?

Ex.grepmail -h -B -e '^Subject: ' 

   -h (grep only headers)
   -B (print body with limited headers)

jon

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Sorting of folders

2021-06-24 Thread Jon LaBadie

On Thu, Jun 24, 2021 at 09:02:37PM +0100, Chris Green wrote:

On Thu, Jun 24, 2021 at 02:54:29PM -0400, Jon LaBadie wrote:

On Thu, Jun 24, 2021 at 11:06:25AM +0100, Chris Green wrote:

[snip]


The date you see with an "ls -l" is called "mtime", time of last
modification of the entries data.  If it happens to match your
directories time of creation (which is not stored) it is coincidence.

For a directory, its data is the list of files it contains.  So mtime
should change whenever an entry is added or removed.  Note, renaming
and entry is typically add an entry, the new name as a link, then
unlink the old name.

Try sorting the directories according to mtime with ls -lt (or -ltr
for reverse order).


You've missed the point (I think), in a maildir the directories whose
mtime dates change are the cur, new and tmp directories.  The parent
directory whose name is the mailbox name never changes mtime (unless
you do something other than adding or removing messages).  The maildir
directory doesn't contain any files that change, only cur, new and tmp
directories.



Obviously I don't use maildir :)

I {over}reacted to what I suspected was a common misconception
about "c"reate time being retained.

Sorry for the noise,
Jon

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Sorting of folders

2021-06-24 Thread Jon LaBadie

On Thu, Jun 24, 2021 at 11:06:25AM +0100, Chris Green wrote:

Is there any way that one can overcome this major disadvantage of
maildir?

Since maildir messages are saved in sub-directories of the named
'maildir directory' there seems to be no practical way to do sorting
of maildirs on anything but name.

What I'd really like to be able to do is to sort on date of last
message.

For example I have a 'shopping/diy' directory which has lots of
sub-directories like 'glue', 'grease', 'lynchpins', etc.  It would be
really handy if I could sort the directories within 'diy' by date as
then the most used ones (or the most recently used ones) would be at
the top of the listing and quicker to get to.  However, as far as I
understand things, this isn't possible with maildir as the date on the
*directory* (e.g. the date on 'glue' or 'lynchpin') is the date of
creation of the directory which might be years ago when I first bought
some glue.

If these were mbox mailboxes then they'd be a file whose date would
reflect the last entry which would be exactly what I want.



The date you see with an "ls -l" is called "mtime", time of last 
modification of the entries data.  If it happens to match your

directories time of creation (which is not stored) it is coincidence.

For a directory, its data is the list of files it contains.  So mtime
should change whenever an entry is added or removed.  Note, renaming
and entry is typically add an entry, the new name as a link, then
unlink the old name.

Try sorting the directories according to mtime with ls -lt (or -ltr
for reverse order).


--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Can Bounce command be used from the command line?

2021-06-10 Thread Jon LaBadie

On Tue, Jun 08, 2021 at 09:06:35AM +1000, Cameron Simpson wrote:

On 07Jun2021 15:49, Jon LaBadie  wrote:

Is there a way to use mutt from the command like to "Bounce" a
received message.  I had hopes for the '-e "command"' option, but
that is limited to configuration commands.


The usual approach is to "push" the requisite keystrokes, which then get
played.

However, to "bounce" a message from the command line it is far more
expedient to just go:

   sendmail -oi addr addr addr ... < message

which is all mutt will be doing. Drops the same messages straight into
the local mail system for deliver to the specified addrs.


On Tue, Jun 08, 2021 at 09:08:36AM +1000, Cameron Simpson wrote:
...


I thought procmail had some directive to 'bounce" messages? Haven't used
it for a while.

Cheers,
Cameron Simpson 


In the end I used the procmail "forward" directive (!).

The semantics of "forward" vs "bounce" caused me to dismiss that
directive.  Mutt's (and my) meaning of forward is to include the
message as part of the body of another message.  Procmail's forward
is like mutt's bounce in that the message is delivered to another
address with the body is unchanged and only headers are added.

Thanks for the pointer causing me to look again (i.e. test it).

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Can Bounce command be used from the command line?

2021-06-07 Thread Jon LaBadie

Some messages I receive my wife should see also.  Rather than
"Forward" ("f" command) them, I typically "Bounce" ("B" command)
them to her.

I would like to automate this procedure for certain sender addresses
so I'm developing a procmail recipie.

Is there a way to use mutt from the command like to "Bounce" a
received message.  I had hopes for the '-e "command"' option, but
that is limited to configuration commands.

Thanks,
Jon

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: index color scheme

2021-04-26 Thread Jon LaBadie

On Tue, Apr 27, 2021 at 08:04:48AM +1000, Cameron Simpson wrote:

On 26Apr2021 16:32, Jon LaBadie  wrote:

I can't figure out the correct configuration for my desired
3 color scheme for the index.

I can get New messages one color and  Read messages a second.

My third color would be for deleted messages.  It works fine
for Read messages that are deleted, but has no affect on New
messages.  They stay the same "New message" color when deleted.

Probably I'm missing something basic and simple.


The color rules are applied in order. Can you show us your rules?

I would guess that your new message rule is after your deleted rule.



That's it.

I thought I had tested order dependency.
Obviously inadequate test design.

Thank,
Jon
--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


index color scheme

2021-04-26 Thread Jon LaBadie

I can't figure out the correct configuration for my desired
3 color scheme for the index.

I can get New messages one color and  Read messages a second.

My third color would be for deleted messages.  It works fine
for Read messages that are deleted, but has no affect on New
messages.  They stay the same "New message" color when deleted.

Probably I'm missing something basic and simple.

jl

--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group and alias

2021-02-28 Thread Jon LaBadie

On Mon, Mar 01, 2021 at 01:19:10PM +1100, Cameron Simpson wrote:

On 28Feb2021 19:00, Jon LaBadie  wrote:

Trying to use the "group" facility.  Expected I could
do something like:
 group -group ABC -addr  -addr  -addr 

And then email 3 people with

 $ mutt ABC

I am able to accomplish this with an alias:

 alias ABC , , 

Is this not an application for which "group" was intended?


Aliases probably predate groups, I'd expect. They can contain only
addresses (including other aliases).

Groups can include regexps for matching, so they're arguably more a
PATTERN thing than an alias is.

And I presume that recognising that often aliases and groups server the
same purpose, alias has a -group options which also adds the addresses
to a named group. I maintain my alias using a small otuside db, and
autogenerate them. They all have the form:

   alias -group group_name alias_name \
   address, \
   ... etc ...

where in fact group_name and alias_name are the same name.



And where/how do you use the group rather than the alias?

Jon
--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


group and alias

2021-02-28 Thread Jon LaBadie

Trying to use the "group" facility.  Expected I could
do something like:

  group -group ABC -addr  -addr  -addr 

And then email 3 people with

  $ mutt ABC

I am able to accomplish this with an alias:

  alias ABC , , 

Is this not an application for which "group" was intended?

Jon
--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


mailing list config - two questions

2021-02-25 Thread Jon LaBadie

While researching my response in another topic I came
across the "subscribe" list that I don't recall seeing
previously.  I've been using the "lists" list for the
same purpose.

As I read it, "lists" items are known mailing lists
and possibly subscribed to while "subscribe" items
mailing lists to which I am subscribed and thus by
default are known.

When is it useful to have a mailing list to which
you are not subscribed "known"?


My mutt index typically shows the poster's name.
But my own posts do not show my name.  This is the
situation for other mailing list also, not just mutt-user
so I must be composing my header's incorrectly.

How should the From:/To:/??? headers be composed so that
mutt picks up my name for display in the index?

--
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Choose 'From:' address based on 'To: address

2021-02-25 Thread Jon LaBadie

On Thu, Feb 25, 2021 at 04:11:02PM +, Alexander Huemer wrote:

Hi

I am subscribed to several mailinglists and use different email
addresses for them, for various reasons.
Is there a configuration option to choose which 'From:' email address
shall be used if a mail to a certain 'To:' address is composed? If a
'To:' address isn't in the mapping, then the 'set from' configuration
setting should be the fallback.

I somehow remember to have read years ago, that somebody has built a
workaround for this issue by hacking something into VIM with some code
completion feature that gives at least a way to choose an address from a
list, but I cannot find the reference to that anymore.

Any thoughts on this would be highly appreciated.


In a separate file I keep a bunch of mailing list send-hooks something
like the following that is sourced into ~/.muttrc :

send-hook 'mutt-users@mutt.org' 'my_hdr From: "Jon LaBadie" '

Depending on the mailing list I may also have a similar line for
the Reply-To: header and a "set signature=..." to specify a unique
signature file.


--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Any "one-step" html viewing macros

2021-02-01 Thread Jon LaBadie

I typically view html attachments by piping them to
a text viewer such as lynx.  However this is a multi-
step process of 'v' to view attachments, 'arrows' to
select the html attachment, '' to invoke my macro,
and upon exiting lynx, several keystrokes to return
to the mutt index.

Has anyone a technique to select the first html attachment
and invoke the viewer in a single step?

Returning to the mutt index directly from the viewer would
be a nice extra if feasible.

Jon
--
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: toggle thread

2020-11-12 Thread Jon LaBadie
On Thu, Nov 12, 2020 at 01:16:52PM +, Globe Trotter via Mutt-users wrote:
> > On Wednesday, November 11, 2020, 11:13:49 AM CST, Ian Zimmerman 
> >  wrote: 
> 
> 
> 
> > On 2020-11-09 18:08, Jon LaBadie wrote:
> 
> > > > I use Alt-Shift-v and I think that is the default binding. HTH
> 
> >> On mine that seems to collapse/uncollapse all threads.  Same as V.
> >> Toggling one thread on mine is v.
> >> 
> >> Neither switches between threaded and unthreaded.
> 
> >And right you are. I should have thought a few seconds longer before
> replying,
> 
> 
> Sorry but I am not understanding. What does it mean it collapses/uncollapses 
> all threads but neither switches between threaded and unthreaded? What is the 
> difference?
> 

In unthreaded, all messages are ordered by some factor other than topic.
Likely by date.

In threaded, all messages from one topic are together.  If collapsed,
only the first message of the topic thread shows in the index.

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: toggle thread

2020-11-09 Thread Jon LaBadie
On Mon, Nov 09, 2020 at 08:48:21AM -0800, Ian Zimmerman wrote:
> On 2020-11-09 16:40, Globe Trotter via Mutt-users wrote:
> 
> > I am looking around for some keystroke setting that will make it is
> > possible to toggle between threaded and unthreaded views of the
> > message list. Is this possible?
> 
> I use Alt-Shift-v and I think that is the default binding. HTH
> 

On mine that seems to collapse/uncollapse all threads.  Same as V.
Toggling one thread on mine is v.

Neither switches between threaded and unthreaded.

-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: change Reply-To:

2020-10-20 Thread Jon LaBadie
On Tue, Oct 20, 2020 at 06:51:15PM +0200, Pau wrote:
> thanks a lot! Is there a way to have several email addresses in a
> single hook, or do I have to repeat the hook for every single email
> address?
> 
> On Tue, Oct 20, 2020 at 6:25 PM ಚಿರಾಗ್ ನಟರಾಜ್  wrote:
> >
> > Hi Pau,
> >
> > You can use a send-hook with something like this:
> >
> > send-hook '~t ' 'my_hdr Reply-To: Alternate 
> > Email '
> >

Something like this is working for me:

  set my_ChGrp='^(aa@chdom1\.com|bb@chdom2\.com|cc@chnet\.net)$'

  send-hook '~t $my_ChGrp' 'my_hdr Reply-To: Me Me '

If they all have the same domain, or one that can be expressed
by a regular expression, something like this might work also:

  send-hook '~t ^.*@chdom\.com$' 'my_hdr Reply-To: Me Me '

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: simple formatting possibilities

2020-09-01 Thread Jon LaBadie
On Mon, Aug 31, 2020 at 01:06:48PM -0400, Mark H. Wood wrote:
> On Sat, Aug 29, 2020 at 07:32:03PM -0600, Akkana Peck wrote:
> > Derek Martin writes:
> > > Your only option for this which would have widespread support would
> > > be HTML.  It is *possible* to generate such messages and send them
> > > with Mutt.  It's just not very easy or user-friendly.
> > 
> > I agree (and the thread you reference is very worthwhile reading).
> > But be warned that people who are used to doing everything in Word
> > documents might not be as amenable to HTML as you might think.
> > 
...
> 
> Well, yes.  I think it's helpful to keep in mind the distinction
> between revisable and final formats.
> 
> Things like .docx and ODF are designed for revisable documents.
> Share these when you want collaborative editing or annotation.  IMHO
> these are very poor formats for distributing finalized documents.
> 
> Things like HTML and PDF are designed for finalized documents.  Share
> these when you just need to disseminate a completed work.  Altering
> documents in these formats is a matter for experts, and some in your
> audience may not be that kind of experts.
> 
> It's easy to edit documents in a revisable format until they are
> satisfactory, and then render the finished content in a final format
> (or multiple final formats) for publication.

Good point Mark.  And certainly my need is distribution of a finalized
document.  I've kinda decided to create the 2 columns of seating
assignments using a text editor and shell tools.  This will be the
main part of the email msg body.  That will also be pasted into an
"odt" document, some formatting and boiler plate added, then exported
as a "pdf" for attachment to the email.

Thanks for all your input.

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: simple formatting possibilities

2020-08-28 Thread Jon LaBadie
On Thu, Aug 27, 2020 at 03:57:04PM -0400, Jon LaBadie wrote:
...
> 
> I fear I've mislead the list readers.  I'm not looking to show some
> thing analagous to a bridge game or hand.  Much more basic than that.
> 
> Currently I send out an email with a paragraph or two of text followed
> by lines like:
> 
>Table 1
> N: Geo Washington (host)
> E: John Adams
> S: Tom Jefferson
> W: James Madison
> 
> Similar lines to those would follow for 6 or 7 tables.  We will now be
> playing 2 sessions each night and I have to double the number of tables.
> It would be nice to be able to do it in 2 columns, like:
> 
>  Table 1 Table 1
>   N: Geo Washington (host)N: Geo Washington (host)
>   E: John Adams   E: James Monroe
>   S: Tom JeffersonS: J.Q. Adams
>   W: James MadisonW: Andrew Jackson
> 
> 
> You viewing it in mutt inside a terminal window probably see two
> nicely aligned columns.  But readers using thunderbird, outlook,
> etc. would not because of the proportional spacing.
> 
> As I'm asking about something for formatting, I threw on to the
> dream list things like "bold" font.

Not a solution I would use, but I created the above two column
sequence in thunderbird.  I did the two "Table 1" headings as
Bold and Underlined the two words "host".  Then sent it to myself
at several email accounts.

Thunderbird created a 2 part message, text and html.  Those MUA's
that understood html showed fine.  That included mutt and w3m.

Viewing the text section with mutt was good on all but the lines
with font changes.  The "Table 1" line and the Geo Washington
lines were shifted full left (no indentation) and had no spacing
between the two columns.


Thanks for all the input, I'll take any more you have.

Right now I'm thinking of composing in LibreOffice and exporting
to a pdf.  Yes it may require a separate viewing program by the
recipients, but I've more confidence they can view .pdf than .docx.

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: simple formatting possibilities

2020-08-27 Thread Jon LaBadie
On Thu, Aug 27, 2020 at 01:40:08AM -0400, Jon LaBadie wrote:
> For so long I've used mutt and composed my emails in ASCII,
> now I guess Unicode, that I'm ignorant of potential approaches
> to a bit of formatted text.
> 
> Both a friend and I organize weekly online bridge games for
> 20-30 players.  My seating notices go out as simple text.  He
> creates a 2 column Word document and includes it as an attachment.
> Players who wish to see his seatings must use an external office
> suite to view the attachment.
> 
> I don't like the attachment approach but the formatting (minimal,
> bold, alignment,?) he uses and the 2 column arrangement would be useful.
> Of course, my using constant width characters and spaces kills
> any alignment my recipients would see with their proportional fonts
> and spaces.
> 
> Is there anything I could use to create such "formated text", then
> distribute it in the body of a mutt message having some hope that
> the recipients see it correctly?
> 

I fear I've mislead the list readers.  I'm not looking to show some
thing analagous to a bridge game or hand.  Much more basic than that.

Currently I send out an email with a paragraph or two of text followed
by lines like:

   Table 1
N: Geo Washington (host)
E: John Adams
S: Tom Jefferson
W: James Madison

Similar lines to those would follow for 6 or 7 tables.  We will now be
playing 2 sessions each night and I have to double the number of tables.
It would be nice to be able to do it in 2 columns, like:

 Table 1 Table 1
  N: Geo Washington (host)N: Geo Washington (host)
  E: John Adams   E: James Monroe
  S: Tom JeffersonS: J.Q. Adams
  W: James MadisonW: Andrew Jackson


You viewing it in mutt inside a terminal window probably see two
nicely aligned columns.  But readers using thunderbird, outlook,
etc. would not because of the proportional spacing.

As I'm asking about something for formatting, I threw on to the
dream list things like "bold" font.

Sorry for any confusion.

I probably will look into PGN because I do somethings email about
hands I've played, etc.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


simple formatting possibilities

2020-08-26 Thread Jon LaBadie
For so long I've used mutt and composed my emails in ASCII,
now I guess Unicode, that I'm ignorant of potential approaches
to a bit of formatted text.

Both a friend and I organize weekly online bridge games for
20-30 players.  My seating notices go out as simple text.  He
creates a 2 column Word document and includes it as an attachment.
Players who wish to see his seatings must use an external office
suite to view the attachment.

I don't like the attachment approach but the formatting (minimal,
bold, alignment,?) he uses and the 2 column arrangement would be useful.
Of course, my using constant width characters and spaces kills
any alignment my recipients would see with their proportional fonts
and spaces.

Is there anything I could use to create such "formated text", then
distribute it in the body of a mutt message having some hope that
the recipients see it correctly?

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


saving tagged messages to separate folders

2020-08-24 Thread Jon LaBadie
Most of my mail comes from senders for whom I've already
set up an save file (mbox).  So when I do a save "s" it
goes to the correct file.

If I tag several messages from different senders and use
the "s" command, it saves all the tagged messages to the
file of the first tagged message.

Is there a command I could use to save the tagged messages
to their individual sender's save files?

Jon
-- 
Jon H. LaBadie j...@labadie.us
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Going GUI...er

2020-04-09 Thread Jon LaBadie
On Sun, Apr 05, 2020 at 12:45:09PM -0700, Felix Finch wrote:
> On 20200405, Akkana Peck wrote:
> > Is there any way to configure mutt to alert me at the top of the
> > message if there are any text/calendar or image/* attachments
> > anywhere in the message, even as part of a multipart/alternative?
> > I feel like I miss a lot in mail messages because mutt doesn't tell
> > me about attachments.
> 
> I wonder if the number of attachments could be shown in the index?
> 
> I don't know if that would be sufficient; a lot of work emails are loaded 
> with stupid company logos and such.
> 
> Maybe the index could include a count of attachments only of specific types 
> enumerated in a mutt var.  Or maybe a count of attachments not enumerated in 
> a mutt var.
> 
>  set show_attachments=text/calendar;text/html
>  set hide_attachments=image/png
> 
> %p is unused.  Let it stand for the number of parts:
> 
>  set index_format="%4C %Z %{%b %d} %-15.15L %p (%?l?%4l&%4c?) %s"
> 

%X is already defined as the number of attachments.
%Maybe that would suffice instead of a new %p.

Jon

> Just spitballin'!
> 
> -- 
>... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
> Felix Finch: scarecrow repairman & wood chipper / fe...@crowfix.com
>  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
> I've found a solution to Fermat's Last Theorem but I see I've run out of room 
> o
>>> End of included message <<<

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Going GUI...er

2020-04-04 Thread Jon LaBadie
On Sat, Apr 04, 2020 at 09:41:59AM +0200, Vegard Svanberg wrote:
> Hi,
> 
> I love Mutt.
> 
> However, I'm increasingly finding myself having to resort to various
> tricks to deal with HTML only emails (with picture attachments),
> calendar invites, and other oddities and awkward stuff people send.
> 
> My Holy Grail, which would be a native Mutt GUI client, I guess, doesn't
> seem to exist.
> 
> I don't know how I would survive with a regular GUI client like
> Thunderbird or Evolution. I've tried, but they all suck. Mutt's
> keybindings, search and navigation features are irreplaceable.
> 
> Currently I'm running Mutt from a machine which I ssh into from 5 other
> computers I use frequently (IMAP backend - self-hosted).
> 
> Suggestions? What does everyone else do?

A long time ago when I was a UNIX instructor I spent most of
my time at client sites.  The many security aware sites blocked
my ssh back home for mail reading but generally allowed access
to yahoo's email site.

Again, at that time, yahoo allowed "?reverse pop?", i.e. I could
send my emails received at home (my business site) to my yahoo
email account.

I created a second user "jonpop" which got a copy of all my
emails and filtered out those I did not care to see when
traveling.  The rest got uploaded to yahoo.

Yahoo no longer allows this, nor do I need it anymore.  But
the jonpop account still gets everything and filters out little.
I have Thunderbird on most of my computers and rather than
connect to "jon" they all connect to "jonpop".  If I want to
see a fancy email I read it in Tbird.

While in mutt, if I want to get the gist of a fancy email I
have a function key macro that tries to render the html.
At times it has used lynx, elinks, w3m, and firefox.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: What environment variable affects the "charset" variable?

2019-07-08 Thread Jon LaBadie
On Mon, Jul 08, 2019 at 05:53:22AM -0500, Peng Yu wrote:
> Hi,
> 
> `mutt -D` prints 'charset="iso-8859-1"' when it runs in a
> non-interactive bash session scheduled by crontab.
> 
> But the same command prints 'charset="utf-8"' when it runs in an
> interactive bash session. I suspect that this is affected by an
> environment variable.
> 
> Does anybody know why there is such a difference?

Processes run by cron do not mimic your login environment.
If you need specific things set that are typically set in
.profile etc., you need to set them in your crontab file
or the executed script.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Aliases

2018-11-19 Thread Jon LaBadie
On Mon, Nov 19, 2018 at 10:07:39PM -0500, Thomas Schneider wrote:
> Steve:
> 
> I would just add 'joe' to the CC line in vim.  Then I quit vim and go
> back in.  'joe' is expanded.  Since I have this vim mapping:
> 
> map ; :wq^M
> 
> (where '^M' is a control M)
> it takes only two characters: ';e'!
> 
I'd hate to give up the ';' as a normal vim command.
My goto for an impromptu mapping is double comma ',,'.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: smart saving

2018-11-02 Thread Jon LaBadie
On Fri, Nov 02, 2018 at 08:23:31AM -0400, Ben Fitzgerald wrote:
> On Fri, Nov 02, 2018 at 12:48:20PM +1100, Erik Christiansen wrote:
> > On 01.11.18 19:06, Ben Fitzgerald wrote:
> > > When I hit "s" it would be lovely to have the last folder I saved a 
> > > message
> > > with the same "meta" (simple case - same "from:").
> > 
> > That is the mutt default, in my experience. Since that is never useful
> > here, I set save-hooks to meet local needs. While most of mine set a
> > second archive mailbox for each delivery mailbox, there is one which
> > parallels your use-case:
> > 
> > fcc-save-hook '%L fam_grp' family
> > 
> > That sets "family" as the default save destination for anything from
> > anyone I've listed in a "alias -group fam_grp rita   r...@example.com"
> > line. It's an fcc-save-hook rather than just a save-hook to put my
> > replies there as well. Now _that_ is smart, and seems far more useful
> > than spraying emails disc-wide based on nothing more than "From:".
> 
> Interesting, I'll check this out. My "From:" example was a bit too
> contrived. Ultimately I'd like this for work, where I end up with
> many emails, from the same 50 people, that could be about different
> things. It might hash the subject and then dump it into the same
> folder I put in the first time.
> 

Don't know if this is something you can use.

I store may received email in mbox format under ~/Mail/.
Mutt will automatically create the file the first time I receive
and save the email, using the sender's email name.

For some situations it is better to have one mbox for multiple
email addresses.  For example, I communicate with several people
from one business office and would prefer to read emails from
them as a group rather than individuals.

For that I designate one file as "master", and make the other
email names links (hard or soft) to the master.  Then mutt saves
to the current email address but this is simply a link to the
master "office email address".

I also do this for individuals who use multiple emails.  And for
people with hard to remember email names (who can remember that
"enzulumeti" is actually Susan :).

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Hardware cursor and console colours resetting when starting mutt

2018-09-30 Thread Jon LaBadie
On Fri, Sep 28, 2018 at 10:26:31PM +0100, David Woodfall wrote:
> Hi
> 
> In the (framebuffer) console I've used the standard escape codes to
> set a small 1/3 block cursor to make it more visible, and softened
> the colours to not be so stark.  They were a bit of a headache
> before, and the normal cursor is very hard to see. 
> 
> Unfortunately, when I start mutt everything resets back to the
> defaults.  I only see a couple of settings regarding the cursor, but
> they don't seem to help.  I've tried running with a -F /dev/null so
> it doesn't seem to be something in my config.  Is there any way of
> avoiding this?
> 
> In screen it's not so bad, but the cursor resets even just switching
> to the window where mutt is running.  The colours remain as they were
> though.
> 
> The cursor code I use is:
> 
> printf '\e[?3c'
> 
> Any ideas?
> 
Programs that use the ncurses library will run initializations
defined in their terminfo entries.  According to "man terminfo"
there are 6 or 7, like initialization_string_1 or _2 or _3.

Check your terminfo entry (infocmp) and see if any are defined
that would modify your desired settings.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Bottom posting v top posting

2018-05-13 Thread Jon LaBadie
On Sun, May 13, 2018 at 05:43:53PM -0400, Thomas Schneider wrote:
...
>
> So Top posters never read further down the email, it's a total waste
> of bandwidth.
> 

Another example of this: I typically bottom/in-line
respond even private emails.  As most of you may
note I have a lot of personal info in my standard
signature.  Yet even people with whom I've had many
exchanges will ask my address or phone number.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: mails to lists automatically?

2017-02-20 Thread Jon LaBadie
On Mon, Feb 20, 2017 at 01:29:20PM +0100, Michelle Konzack wrote:
> Hello *,
> 
> I have my own Mailserver and sort my mails to different folders. Exactly
> list mails go to the appropriated list folder and PMs stay in the  INBOX
> where I decide what to do with it.
> 
> However, if I am in a List-Folder like
> 
> .ML_mail.mutt-users@mutt_org/
> 
> I like to have the default set to send to the List and not a PM.
> If I press R, it should ask me if I want a PM or RTL.
> 
> How can this be archived easyly?

Something similar may already be in there, the "L" command.
If set up, 'L' replies to the list, 'r' replies to the
message poster.

I think the mailing list address must be added to the "list"
parameter in .muttrc.

I use different email addresses and customized signature
files for each list.  So I create a set of folder- and
send-hooks for each list as well.

jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Tagging duplicates -- [SOLVED]

2016-11-09 Thread Jon LaBadie
On Wed, Nov 09, 2016 at 12:13:00AM -0500, Jon LaBadie wrote:
> A year or more back someone posted a technique for
> tagging duplicate mails in a mailbox.  It used T~=.
> The tagged mails could then be deleted.
> 
> I'm now using mutt on another system and the T~=
> sequence does not work and I can't see what I
> might have added to my .muttrc to make it work.
> 

Cameron hit a home run.  The ~= pattern only works in
threaded view.  On the new system, without a .muttrc,
the view was defaulting to date ordering.  Switch to
threaded view and T~= works fine.

Thanks CS,
Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Tagging duplicates

2016-11-09 Thread Jon LaBadie
On Wed, Nov 09, 2016 at 12:15:50AM -0800, David Champion wrote:
> * On 08 Nov 2016, Jon LaBadie wrote: 
> > A year or more back someone posted a technique for
> > tagging duplicate mails in a mailbox.  It used T~=.
> > The tagged mails could then be deleted.
> > 
> > I'm now using mutt on another system and the T~=
> > sequence does not work and I can't see what I
> > might have added to my .muttrc to make it work.
> 
> It should just work.
> 
> What happens when it doesn't work? If I tag-pattern something that isn't
> defined -- in this case, "~." -- I get this:
> 
> .: invalid pattern modifier
> 
> Do you get that error, or does it just not tag anything?

No error message, no action/effect when I use T~= or D~= .

If I use the ~. instead, I also get the ".: invalid pattern modifier"


>>> End of included message <<<

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Tagging duplicates

2016-11-09 Thread Jon LaBadie
On Wed, Nov 09, 2016 at 08:10:31AM +0100, Francesco Ariis wrote:
> On Wed, Nov 09, 2016 at 12:13:00AM -0500, Jon LaBadie wrote:
> > A year or more back someone posted a technique for
> > tagging duplicate mails in a mailbox.  It used T~=.
> > The tagged mails could then be deleted.
> 
> `~=` works here, but I am on 1.5.23.

The working one is 1.7.1 (Fedora 24) the non-working one
is 1.5.21 (CentOS 7.2).


-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Tagging duplicates

2016-11-09 Thread Jon LaBadie
On Tue, Nov 08, 2016 at 10:24:09PM -0800, Will Yardley wrote:
> On Wed, Nov 09, 2016 at 12:13:00AM -0500, Jon LaBadie wrote:
> > 
> > I'm now using mutt on another system and the T~= sequence does not
> > work and I can't see what I might have added to my .muttrc to make it
> > work.
>  
> Do the messages show up as duplicates according to Mutt in the index?
> Do they have identical message-ids?

yes
> 
> Does ~= show up under "Simple Patterns" in muttrc(5)?

yes, I guess that explains why I don't see anything
in my .muttrc file, nothing extra is needed.

On the system that T~= or D~= is not working, I don't
even have a .muttrc file yet.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Tagging duplicates

2016-11-08 Thread Jon LaBadie
A year or more back someone posted a technique for
tagging duplicate mails in a mailbox.  It used T~=.
The tagged mails could then be deleted.

I'm now using mutt on another system and the T~=
sequence does not work and I can't see what I
might have added to my .muttrc to make it work.

Any refresher?

Thanks, Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: How to save multiple attachments quickly

2016-11-04 Thread Jon LaBadie
On Fri, Nov 04, 2016 at 01:04:17PM +, Chris Green wrote:
> I have just sent myself an E-Mail which has 50 or so attachments, they
> are a load of VCARD files which I can't concatenate at the sending
> end. 
> 
> So, how can I save them all quickly without doing each one separately?
> 

This is still separate, but saves some typing.

Read the mail message in an empty directory.
Use the v command to list the separate parts.
Skipping the body, use the t command to tag each vcard.
  This isn't too bad as the command tags and moves to the
  next part, so just hold down for auto repeat
Use the ";" command to do something with the tagged parts.
  I didn't find a way to save all in one file,
  maybe someone else can.
Use the s command to save the parts.  It will save them
  one at a time under the original names.  But again,
  it automatically moves to next item.  Use the auto-
  repeat feature again with the return key

Now they are on your linux system and you can catenate
them easily.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: how would you match this?

2016-10-16 Thread Jon LaBadie
On Sun, Oct 16, 2016 at 10:29:09PM +0200, nfb wrote:
> > It looks to me as if a second round of evaluation is being done.
> > During the first round the "\"s would be removed leaving "[[0-9]+]".
> > 
> > The second round would pair the first "[" with the first "]", the
> > one before the "+" and would make your character class be digits
> > or opening square bracket.  The final square bracket would be literal.
> > 
> > You may have to play with the number of backslashes, probably doubling
> > them though in some troff documents it was even necessary to tripling
> > them in order to have one preserved when it was needed.
> 
> Thank you, your explanation is plausible... I indeed already tried
> with some escaping before posting. I'll try harder.
> But in any case, doesn't it sound like a bug? Because a correct
> regular expression is not matching as it should.
> Thanks again.

I played around with your sequence and confirmed your observation.
Changing the quotes from double to single quotes seems to get
what you are looking for.

Again that would go along with preserving backslashes during one
round of evaluation.  In a double quoted string parsed by the shell,
depending on the following character, a backslash may be escaping the
next character or may be literal.  Using single quotes removes the
ambiguity and makes them literal irrespective of the next char.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: how would you match this?

2016-10-16 Thread Jon LaBadie
On Sun, Oct 16, 2016 at 05:58:27PM +0200, nfb wrote:
> Hi,
> maybe this is a general and basic question about regex, but i also
> tried on regex101.com and it really should work...
> In my body i'd like to color URL indexes in the form [$ANYNUMBER], so
> in my muttrc i set a line like this:
> 
> color body brightmagenta default "\[[0-9]+\]"
> 
> Now, strings like:
> 
> [1]
> [123]
> etc.
> 
> are matched, and this is what i want, but it seems it also matches
> something like:
> 
> 123]
> :123]
> 12:123]
> 
> What am i doning wrong?

It looks to me as if a second round of evaluation is being done.
During the first round the "\"s would be removed leaving "[[0-9]+]".

The second round would pair the first "[" with the first "]", the
one before the "+" and would make your character class be digits
or opening square bracket.  The final square bracket would be literal.

You may have to play with the number of backslashes, probably doubling
them though in some troff documents it was even necessary to tripling
them in order to have one preserved when it was needed.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group reply [SOLVED] now alternates

2016-09-27 Thread Jon LaBadie
On Tue, Sep 27, 2016 at 02:20:14PM +0200, Ionel Mugurel Ciobîcă wrote:
> On 26-09-2016, at 17h 20'26", Jon LaBadie wrote about "Re: group reply"
> > Did a reply to everyone in the "To:" header but the
> > original author in the "From:" header was not included.
> > 
> 
> Another shot in the dark: Is there a chance that the original author
> is one of your alternates and you set up metoo variable to no?
> 
Pay the man!!!  That's it.
My alternates definition is a regex that matched the author.

A couple of queries about alternates.

I simply have:

  alternates ".*@labadie\.us" ".*@jgcomp\.org" ".*@jgcomp\.com"

I can definitely make it more specific, but with many aliases
I may need a long list.  Is a large alternates list common?

The .muttrc comments show this as "set alternates=" but my
form obviously works.  Do both forms work?  Is there a difference?
Can multiple "alternates" lines appear in .muttrc?

Why am I asking something that I can easily try?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group reply

2016-09-26 Thread Jon LaBadie
On Mon, Sep 26, 2016 at 05:30:47PM -0400, Nathan Stratton Treadway wrote:
> On Mon, Sep 26, 2016 at 14:38:00 -0400, Jon LaBadie wrote:
> > On Mon, Sep 26, 2016 at 02:02:24PM -0400, Guy Gold wrote:
> > > A shot in the dark..(and eventhough you inspected the headers_ :)
> > > 
> > > Nothing odd set into the "reply to:" header on the original
> > > message ?
> > 
> > None present in original message.
> 
> Mail-Followup-To: header?
> 
Not that one either.

Here is the entire header section minus the Received: lines,
the msg id shortened, and email addresses slightly munged.

  From gu...@jgcomp.com  Sun Sep 25 12:35:02 2016
  Return-Path: <gu...@jgcomp.com>
  X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on cyber.jgcomp.com
  X-Spam-Level: **
  X-Spam-Status: No, score=2.8 required=4.0 tests=BAYES_20,DOS_OUTLOOK_TO_MX,
FSL_HELO_NON_FQDN_1,HTML_MESSAGE,MIMEOLE_DIRECT_TO_MX autolearn=no
autolearn_force=no version=3.4.1
  X-Original-To: j...@jgcomp.com
  Delivered-To: j...@jgcomp.com
  X-Virus-Scanned: amavisd-new at jgcomp.com
  Return-Receipt-To: "Gundula U. LaBadie, PhD" <gu...@jgcomp.com>
  From: "Gundula" <gu...@jgcomp.com>
  To: "'George'" <...@comcast.net>,
"'Gertrude'" <...@gmail.com>,
    "'Christy'" <...@gmail.com>,
"'Erika'" <...@yahoo.com>,
"'Zeb'" <...@gmail.com>,
"'Mike'" <...@gmail.com>
  Cc: "'Jon LaBadie'" <j...@jgcomp.com>
  Subject: Reston Home Tour - October 15
  Date: Sun, 25 Sep 2016 12:31:04 -0400
  Message-ID: 
  MIME-Version: 1.0
  Content-Type: multipart/alternative;
boundary="=_NextPart_000_040F_01D21728.AEAB2C70"
  X-Mailer: Microsoft Office Outlook 11
  Thread-Index: AdIXSjV3gYlyf9HKTWG9qvIIVg5MZw==
  X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
  Status: RO
  X-Status: A
  Content-Length: 4694
  Lines: 120
  

I noted the strange use of both single and double quotes in
the To: header but not the From: header.  Neither eliminating
the single quotes or adding them to the From: line had any
effect.

One other note, this message had both text and html versions
of the message.  But that should not affect mutt's handling
of replies should it?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group reply

2016-09-26 Thread Jon LaBadie
On Mon, Sep 26, 2016 at 10:21:11PM +0200, Jostein Berntsen wrote:
> On 26.09.16,14:38, Jon LaBadie wrote:
> > On Mon, Sep 26, 2016 at 02:02:24PM -0400, Guy Gold wrote:
> > > A shot in the dark..(and eventhough you inspected the headers_ :)
> > > 
> > > Nothing odd set into the "reply to:" header on the original
> > > message ?
> > 
> > None present in original message.
> > 
> 
> What happens if you do "R" instead?
> 
> Jostein
> 

I presume you meant "r" rather than "R" (recall postponed msg).

Well I wasn't expecting that.  "r" acted just like "g".
Did a reply to everyone in the "To:" header but the
original author in the "From:" header was not included.

Why do you ask?

Jon
> > > 
> > > On Sun,Sep 25 07:35:PM, Jon LaBadie wrote:
> > > > I don't recall this happening before.  I replied to
> > > > a message using 'g' and the message author was not
> > > > included in the list of recipients of my reply.
> > > >
> > > > I did not notice the omission until the author
> > > > mentioned she did not get my reply.  But I went
> > > > back to the original message and typed 'g' and
> > > > she is not in the recipient list.
> > > >
> > > > Another oddity, I had trouble finding the original
> > > > message to run the test.  Turns out saving that
> > > > message saved it to the first recipients file
> > > > rather than the authors file.
> > > >
> > > > I don't see anything strange in the headers, but ...
> > > >
> > > > Any clue what might cause this?
> > > >
> > > > Jon
> > > > --
> > > > Jon H. LaBadie j...@jgcomp.com
> > > >  11226 South Shore Rd.  (703) 787-0688 (H)
> > > >  Reston, VA  20190  (703) 935-6720 (C)
> > > >
> > > 
> > > --
> > > Guy Gold
> > > Cambridge, Massachusetts
> > > > > End of included message <<<
> > 
> > -- 
> > Jon H. LaBadie j...@jgcomp.com
> > 11226 South Shore Rd.  (703) 787-0688 (H)
> > Reston, VA  20190  (703) 935-6720 (C)
> > 
>>> End of included message <<<

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group reply

2016-09-26 Thread Jon LaBadie
On Mon, Sep 26, 2016 at 02:02:24PM -0400, Guy Gold wrote:
> A shot in the dark..(and eventhough you inspected the headers_ :)
> 
> Nothing odd set into the "reply to:" header on the original
> message ?

None present in original message.

jl
> 
> On Sun,Sep 25 07:35:PM, Jon LaBadie wrote:
> > I don't recall this happening before.  I replied to
> > a message using 'g' and the message author was not
> > included in the list of recipients of my reply.
> > 
> > I did not notice the omission until the author
> > mentioned she did not get my reply.  But I went
> > back to the original message and typed 'g' and
> > she is not in the recipient list.
> > 
> > Another oddity, I had trouble finding the original
> > message to run the test.  Turns out saving that
> > message saved it to the first recipients file
> > rather than the authors file.
> > 
> > I don't see anything strange in the headers, but ...
> > 
> > Any clue what might cause this?
> > 
> > Jon
> > -- 
> > Jon H. LaBadie j...@jgcomp.com
> >  11226 South Shore Rd.  (703) 787-0688 (H)
> >  Reston, VA  20190  (703) 935-6720 (C)
> > 
> 
> -- 
> Guy Gold
> Cambridge, Massachusetts
>>> End of included message <<<

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


group reply

2016-09-25 Thread Jon LaBadie
I don't recall this happening before.  I replied to
a message using 'g' and the message author was not
included in the list of recipients of my reply.

I did not notice the omission until the author
mentioned she did not get my reply.  But I went
back to the original message and typed 'g' and
she is not in the recipient list.

Another oddity, I had trouble finding the original
message to run the test.  Turns out saving that
message saved it to the first recipients file
rather than the authors file.

I don't see anything strange in the headers, but ...

Any clue what might cause this?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Sidebar patch - where can I find user instructions for using it?

2016-09-08 Thread Jon LaBadie
On Thu, Sep 08, 2016 at 09:03:44AM +0100, Chris Green wrote:
> On Thu, Sep 08, 2016 at 02:32:46AM +0200, Jostein Berntsen wrote:
> > On 07.09.16,15:50, Chris Green wrote:
> > > I have a login (as in ssh login) account on a system where they have
> > > just changed to using mutt with the sidebar patch.  It's mutt 1.5.23
> > > on a Debian 8 system.
> > > 
> > > Are there instructions for using the patch anywhere?  I use mutt
> > > (unpatched) at home so I know all the basics but at the moment I can't
> > > make the sidebar do anything.
> > > 
> > 
> > Check the Documentation section in this link:
> > 
> > http://www.lunar-linux.org/mutt-sidebar/
> > 
> > THe sidebar is also now a standard feature in the new mutt 1.7.0:
> > 
> > http://www.mutt.org/doc/UPDATING
> > 
> OK, thanks, just what I needed.
> 
Useful indeed.  However there are several differences from the
cited webpage and my instance of 1.7.0 (Fedora 24).

Some examples:

toggle sidebar_visible  can use
sidebar-toggle-visible

sidebar-scroll-up and sidebar-scroll-down  are
sidebar-page-up and sidebar-page-down

in addition to sidebar-next and sidebar-prev  there are also
sidebar-next-new and sidebar-prev-new

jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: saved or deleted?

2016-08-31 Thread Jon LaBadie
On Wed, Aug 31, 2016 at 12:51:25PM -0500, Derek Martin wrote:
> On Tue, Aug 30, 2016 at 06:34:13PM -0700, Claus Assmann wrote:
> > On Tue, Aug 30, 2016, Derek Martin wrote:
> > 
> > > Why, then, do you feel the need to distinguish between a deletion
> > > caused by a copy, and a deletion caused by you explicitly deleting the
> > > message?  In both cases, it is legitimately a deletion.
> > 
> > In the former case the user still has a copy of the message, in the
> > latter case most likely not...
> 
> But you had to take action to save the message, including telling Mutt
> where to save it.  It's a pretty big difference, IMO.  I'm somewhat
> inclined to think that if you can't remember you did all that, there's
> really no help for you. ;-)  [If the smiley isn't adequate to convey
> it, I'm being fecetious.]

I'm to that age were memory might be a problem :)

> 
> Is the issue just that Mutt does not give adequate confirmation that
> it saved the message?

No, confirmation via status line is fine but fleeting.
Mutt sessions can last for a long time and the
confirmation quickly gone.
> 
...
> 
> My sense is that a status message that persists long enough to be seen
> would provide more value in more contexts.  
> 
> If users can't manage to remember whether they saved a message that's
> marked as deleted, they should probably check, or take to doing a sync
> more often to compensate (e.g. do all "normal" deletes and then sync;
> then and only then consider saving messages, and sync when they have
> been saved, etc.).

Forget the nature of my poorly chosen subject and just
discuss copy vs delete.  Someone has decided that it
is important to display a 'D' flag whenever a message
is marked for deletion.  (can't you remember that you
deleted it? :)

I'm saying that it would help my workflow to know if
a message has been copied.  Doesn't matter if it was
copied via the 's' command or the 'C' command.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: saved or deleted?

2016-08-31 Thread Jon LaBadie
On Tue, Aug 30, 2016 at 06:49:54PM -0500, Derek Martin wrote:
> On Mon, Aug 29, 2016 at 02:33:01PM -0400, Jon LaBadie wrote:
> > The message index shows a "D" when a message has been
> > deleted or when it has been saved.  Is there a way
> > to distinguish which of the two operations (delete
> > or save) has been performed?
> 
> As Florian points out, the message is marked "D" because Mutt has, in
> fact, executed the delete operation on it.  It will be purged the next
> time you sync (or change folders, if so configured), unless you
> (u)ndelete it beforehand.  The deletion is essentially what
> distinguishes the "save message" and "copy message" operations.
> 
> Why, then, do you feel the need to distinguish between a deletion
> caused by a copy, and a deletion caused by you explicitly deleting the
> message?  In both cases, it is legitimately a deletion.

Rephrasing, how can I tell if a deleted message has been copied?

Currently, if I am uncertain I have to copy it just in case and
in the future, delete the duplicate if I created one.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: saved or deleted?

2016-08-29 Thread Jon LaBadie
On Mon, Aug 29, 2016 at 02:06:34PM -0500, Will Fiveash wrote:
> On Mon, Aug 29, 2016 at 02:33:01PM -0400, Jon LaBadie wrote:
> > The message index shows a "D" when a message has been
> > deleted or when it has been saved.  Is there a way
> > to distinguish which of the two operations (delete
> > or save) has been performed?
> 
> I wrote a small patch (attached) to provide a '$' indication in the
> index for messages that have been successfully saved or copied.  It
> exists in a separate column from the deletion indicator.
> 

Sounds like a nice enhancement.  Unfortunately I use mutt from
several distro repositories rather than building my own.

Have you submitted your patch or a enhancement request?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


saved or deleted?

2016-08-29 Thread Jon LaBadie
The message index shows a "D" when a message has been
deleted or when it has been saved.  Is there a way
to distinguish which of the two operations (delete
or save) has been performed?

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: [SPAM?] Re: no MUTTRC environment variable?

2016-07-02 Thread Jon LaBadie
> > On Thu, Jun 30, 2016 at 08:02:38PM -0400, Xu Wang wrote:
> >>
> >> I have read the environment variables section in 'man mutt' and there
> >> does not seem to be a MUTTRC environment variable. One can set using
> >> -F option but sometime environment variable is nice.
> >>
> >> Can someone confirm this is correct? Is there a reason for this?
> >

How about implementing your own with a mutt alias?


  alias mutt='mutt ${MUTTRC:+-F ${MUTTRC}}'

If MUTTRC is not set, or is the empty string, this becomes
just "mutt" and ~/.muttrc will be used as normal.  But if
MUTTRC is set it becomes "mutt -F ${MUTTRC}" and uses the
rc file specified in the variable.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: From: oddity

2016-05-13 Thread Jon LaBadie
On Fri, May 13, 2016 at 10:49:09AM -0700, Will Yardley wrote:
> On Fri, May 13, 2016 at 12:36:09PM -0400, Jon LaBadie wrote:
> > 
> > I received an email sent to a group of about 10 family and friends.
> > Their addresses are all in the "To:" list, no "Cc:" list.  When I
> > reply to the message, with either "g" to reply to the group or "r" to
> > reply to just the sender, the From: line of the message is set to
> > someone other than me.  The replyer set to one of the other addresses
> > in the list (happens to be the 3rd one, I'm 6th).
> 
> Do you have $reverse_name set, and how is $alternates configured?
> 
$reverse_name is set to yes

For alternates I have these 2 lines

alternates ".*@labadie\.us" ".*@jgcomp\.org" ".*@jgcomp\.com"
unalternates "logwatch@*\.jgcomp\.*" "logcheck@*\.jgcomp\.*"

That's it.  The email address being selected (my wife) is
in the same domain as my address so it is simply matching on
the ".*@jgcomp.com".  If I remove that from the alternates
line the correct address is selected.

Thanks, now to ponder how I want to change alternates.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


From: oddity

2016-05-13 Thread Jon LaBadie
This is only happening on one message,
but I can't figure out why.

I received an email sent to a group of about 10
family and friends.  Their addresses are all in
the "To:" list, no "Cc:" list.  When I reply to
the message, with either "g" to reply to the group
or "r" to reply to just the sender, the From: line
of the message is set to someone other than me.
The replyer set to one of the other addresses in
the list (happens to be the 3rd one, I'm 6th).

I have no "hooks" in my .muttrc that involve
the email address selected as the From address.

Any guesses as to what could cause this behavior?

mutt version 1.6.0 from Fedora 22 repo.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: My print command cannot use "read -p"

2016-04-22 Thread Jon LaBadie
On Fri, Apr 22, 2016 at 12:34:48AM -0700, David Champion wrote:
> * On 21 Apr 2016, Jon LaBadie wrote: 
> > 
> > Unless it has changed recently, bash runs redirected read
> > commands in a sub-process.  Thus the variable fn would not
> > get set in the main process.
> 
> I haven't run into this (that I recall) with regular input redirection.
> It does happen with piped input redirection (to a read) because the
> pipeline terminal isn't the current shell.
> 
> yes:
> read fn  
> no:
> cat /dev/tty | read fn

Thanks for the correction David.
My negative bash experience was with pipes as in:

  date | read wday mon day time zone yr

which works fine in ksh and zsh.  I badly assumed
the limitation was to any redirection.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: My print command cannot use "read -p"

2016-04-22 Thread Jon LaBadie
On Thu, Apr 21, 2016 at 10:00:08PM -0700, David Champion wrote:
> * On 21 Apr 2016, Xu Wang wrote: 
> > Hi,
> > 
> > I would like to have a print command that takes input from the user.
> > But mutt pipes the message to the print command so I guess I cannot
> > use something like
> > read -p "where to save?" filename
> > 
> > because read looks on STDIN and mutt already piped to STDIN.
> 
> You've analyzed it right. Solution: read  
>   #!/bin/bash
>   ## WARNING UNCHECKED INPUT
>   ## JUST A PROOF OF CONCEPT
>   read -p 'Save to: ' fncat >"$fn"

Unless it has changed recently, bash runs redirected read
commands in a sub-process.  Thus the variable fn would not
get set in the main process.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: My print command cannot use "read -p"

2016-04-21 Thread Jon LaBadie
On Fri, Apr 22, 2016 at 12:47:45AM -0400, Xu Wang wrote:
> Hi,
> 
> I would like to have a print command that takes input from the user.
> But mutt pipes the message to the print command so I guess I cannot
> use something like
> read -p "where to save?" filename
> 
> because read looks on STDIN and mutt already piped to STDIN.
> 
> I am using bash.
> 
> Any idea?
> 

exec 22< /dev/tty

read -u 22 -p "where to save" filename


-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: set config file from environment variable?

2016-04-16 Thread Jon LaBadie
On Sat, Apr 16, 2016 at 11:09:11PM -0400, Xu Wang wrote:
> It is possible to set config file with
> 
> mutt -F /path/to/muttrc
> 
> Is it possible to do so with environment variable? I looked at
> environment variable section in man mutt and could not see it so I'm
> guessing it is not possible, but I want to double-check.
> 

Seems like there should be a MUTTRC variable doesn't it?

I don't know if an alias like this would help.  It becomes
mutt -F $MUTTRC if MUTTRC is set, otherwise it is just mutt.
But MUTTRC doesn't have to be an exported variable.

  alias mymutt='mutt ${MUTTRC+-F ${MUTTRC}}'

or even

  alias mutt='mutt ${MUTTRC+-F ${MUTTRC}}'

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group mailings with blind cc - RTM

2016-04-16 Thread Jon LaBadie
On Fri, Apr 15, 2016 at 02:40:27PM -0400, Jon LaBadie wrote:
> I'm trying to set up a way to send periodic notices
> to a list of people with the restriction that the
> recipients email addresses not be generally visible,
> thus they would be listed in the Bcc: header.
> 
> My approach is to create an email alias "tf...@jgcomp.com"
> and a mutt alias "tfc" to be "Tuesday Fun Club - Community
> Center" <tf...@jgcomp.com>.  This works fine.
> 
> Next step was to set up a send-hook on the tfccc email addr.
> This would setup "my_hdr Bcc:" to be the list of recipients,
> or later perhaps a mutt group alias for the list.  I've done
> similar settings before, but not for the Bcc: header.
> 
> This step doesn't work.  Either nothing gets added or the
> list gets added to the To: header.
> 
> I'm not sure if the approach is bad or something about my
> syntax.  Any guidance would be appreciated?

Well it doesn't solve the problem, but reading the fine manual
explains why my approach doesn't work.  From section 19:

  19. Change Settings Based Upon Message Recipients
  ...
  Note
  ...
  Also note that my_hdr commands which modify recipient headers,
  or the message's subject, don't have any effect on the current
  message when executed from a send-hook.

  20. Change Settings Before Formatting a Message

So it appears you can't change the recipients from within a send-hook.

I compose in vi, so I'll just append a group alias to the Bcc line.
I was simply trying to automate that step.

Thanks,

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: group mailings with blind cc

2016-04-15 Thread Jon LaBadie
On Fri, Apr 15, 2016 at 09:48:26PM +0200, Alarig Le Lay wrote:
> On Fri Apr 15 14:40:27 2016, Jon LaBadie wrote:
> > I'm trying to set up a way to send periodic notices
> > to a list of people with the restriction that the
> > recipients email addresses not be generally visible,
> > thus they would be listed in the Bcc: header.
> > 
[snip]
> 
> Hi,
> 
> Why do you don’t set up a mailing list? That’s their aim.
> If you do so, you don’t have to care about Bcc header, just send a mail
> to tf...@jgcomp.com.
> 

Not enough traffic.  I wouldn't expect more than
1 or 2 messages a year.  Like meet times change
in the summer, revert in fall.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


group mailings with blind cc

2016-04-15 Thread Jon LaBadie
I'm trying to set up a way to send periodic notices
to a list of people with the restriction that the
recipients email addresses not be generally visible,
thus they would be listed in the Bcc: header.

My approach is to create an email alias "tf...@jgcomp.com"
and a mutt alias "tfc" to be "Tuesday Fun Club - Community
Center" .  This works fine.

Next step was to set up a send-hook on the tfccc email addr.
This would setup "my_hdr Bcc:" to be the list of recipients,
or later perhaps a mutt group alias for the list.  I've done
similar settings before, but not for the Bcc: header.

This step doesn't work.  Either nothing gets added or the
list gets added to the To: header.

I'm not sure if the approach is bad or something about my
syntax.  Any guidance would be appreciated?

-- 
Jon H. LaBadie mut...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: How do you survive without notmuch?

2016-04-07 Thread Jon LaBadie
On Wed, Apr 06, 2016 at 07:52:00PM -0400, Ben Boeckel wrote:
> On Thu, Apr 07, 2016 at 09:38:43 +1000, Cameron Simpson wrote:
> > For historic reasons, "$@" evaluates to a single "" if there were no 
> > arguments 
> > at all, introducing a spurious new empty argument. Possibly the thinking 
> > was 
> > that something like "$@" should never vanish; after all "$x" will produce 
> > an 
> > single empty string if $x is empty. The ${1+} simply avoids using "$@" at 
> > all 
> > unless there are arguments, producing correct behaviour in the no-arguments 
> > case.
> 
> What shell is that? I've *never* encountered such a bug (well, I'd classify it
> as such at this point) and I do quite a bit of shell scripting.
> 

For several years starting in '83 the group I worked with authored
some of the AT courses on shell programming.  This was one defect
that we reported in the Bourne shell, but not the Korn shell courses.

With each new OS release or hardware variant, we had a set of about
four oddities to check.  We felt this one was a bug but while I was
there it was not fixed.  Others were poorly defined things that
varied from release to release or among hardware variants.

If I remember correctly, the "$@" bug was not fixed in the original
System V release and possibly even SVR2.  I'm sure it was fixed by
the great merger, SVR4.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: How do you survive without notmuch?

2016-04-06 Thread Jon LaBadie
On Wed, Apr 06, 2016 at 04:26:52PM -0500, Derek Martin wrote:
> Hi Cameron,
> 
> On Wed, Apr 06, 2016 at 09:50:28AM +1000, Cameron Simpson wrote:
> > Consider using ${1+"$@"}, which preserves quoting.
> 
> How is this better than just "$@"?  I believe it's non-portable (and
> for that reason I'm less familiar with that syntax) but if I
> understand correctly it expands like:
> 
>   if $1 is set use that, otherwise use "$@" (all arguments, individually 
> quoted)
> 
> It seems as though this always evaluates to $1 (since if $1 is unset,
> $@ is also necessarily empty)... which I think is not what is needed
> here.  Am I mistaken?  I believe just "$@" (including the quotes) is
> what you want here.

In the distant past constructions like that were needed because of a
bug in the shells.  If you had no arguments, "$@" was passed as "",
a single null argument.  Now it is correctly passed as no arguments.

OT BTW I typically used ${@+"$@"} and playing with it after seeing
this thread discovered a bug in handling it in ksh but not bash or zsh.
Ksh only checks $1 for set/null rather than the entire list of args.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: omit empty mailboxes from list

2016-03-27 Thread Jon LaBadie
On Sun, Mar 27, 2016 at 06:49:30PM +1100, Erik Christiansen wrote:
> On 26.03.16 10:02, Christian Ebert wrote:
> > * Erik Christiansen on Saturday, March 26, 2016 at 19:54:16 +1100
> > > To return to a mailbox which was read earlier in the mutt session,
> > > in the index, press 'c' to initiate a mailbox change, then either:
> > > 
> > > a) type in the full name of the desired mailbox,
> > > b) type a few characters, then hit  for autocompletion,
> > > c) if b) meets multiple alternatives, hit  again, for a list.
> > > d) hit , to cycle through visited mailboxes, till you're back.
> > 
> > e) hit - to go back to the previously visited mailbox
> 
> Ah, e) can go back only _one_ mailbox, then goes into an endless back
> and forth loop with the last mailbox. That fails entirely to return
> further up the history list of previously visited mailboxes. (The
> express use-case presented.)
> 

Assuming I have already visited more than two mailboxes,
my up arrow key goes back through the history.  Even
including a "-" that was used along the way.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: omit empty mailboxes from list

2016-03-27 Thread Jon LaBadie
On Sun, Mar 27, 2016 at 09:05:17PM +1100, Erik Christiansen wrote:
> On 26.03.16 15:10, Jon LaBadie wrote:
> > I can see what you both are referring to.  There are big differences
> > between 'c' and 'y' for my work style.  First, 'y' shows the files
> > defined by the "mailboxes" parameter, the ones I'm looking for.  In
> > contrast, 'c' shows the files defined by the "folder" parameter which
> > in my case is not the receiving mailboxes, but the previously saved
> > mail in ~/Mail (about 800 files). 
> 
> That's not what happens here, I hit 'c' and mutt immediately offers the
> mailbox with new mail which appears highest in the (one or more)
> "mailboxes" lines in my .muttrc. I.e. it not only serves as a serialised
> version of the 'y' list, restricted to those with new mail (your
> specified use-case),

No, I specifically asked about non-empty files,
not ones containing new mail.

> but also prioritises the list in the order given in
> the "mailboxes" parameter. (Bonus points for that!)
> 
...
> 
> If another delivery mailbox appears earlier in "mailboxes", and has
> mail, it'll take precedence. If no mailbox is proffered, then there is
> no new mail. (As '.' would then confirm.)
> 
> Are you hitting '?' to go to the 800 file list?

Im the earlier paragraph you quoted yes, I was refering to the
indexes generated by the 'y' command immediately or the 'c'
command after '?'.

Apologies for not recognizing that the files in the mailboxes 
list containing new mail were shown in the 'c' prompt.  The
earliest one in the list contains copies of my wife's mail
which I don't normally read and so skip quickly to the '?'.
(But it is nice to be able to more safely examine her suspicious
mail in mutt rather than her opening them in outlook)
> 
> > Another difference, 'y' immediately goes to the index where 'c' goes
> > to a prompt on the status line with a suggested path.  That is where
> > the '-' and up/down arrows can be used or a '?' entered to get to the
> > index.
> 
> Used with a "mailboxes" parameter, 'c' automates the use-case you're
> trying to achieve manually. (And very usefully adds priority)
> 
> > All useful learning thank you.  But I'll ask my original query again.
> > 
> > Is there a way to have the index shown by the 'y' command limited to
> > those files that are NOT empty?
> 
> Not empty, or not containing new mail?

Not empty
...
> If the use-case _must_ be "NOT empty", then just use the mailbox file
> format, rather than maildir. IIRC, a mailbox file from which all mails
> have been deleted, is also deleted. A non-exsistent file can hardly be
> listed by 'y'.

I read some mailboxes not "owned" by my login account.  While I haven't
checked in quite some time, in the past I found that when the mailboxes
are automatically created the permissions don't allow me full access.
Thus I set them manually to //world as 660 and leave
them in place when empty.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: omit empty mailboxes from list

2016-03-26 Thread Jon LaBadie
On Sat, Mar 26, 2016 at 12:11:55PM +, Christian Ebert wrote:
> * Erik Christiansen on Saturday, March 26, 2016 at 21:52:40 +1100
> > On 26.03.16 10:02, Christian Ebert wrote:
> >> * Erik Christiansen on Saturday, March 26, 2016 at 19:54:16 +1100
> >>> To return to a mailbox which was read earlier in the mutt session,
> >>> in the index, press 'c' to initiate a mailbox change, then either:
> >>> 
> >>> a) type in the full name of the desired mailbox,
> >>> b) type a few characters, then hit  for autocompletion,
> >>> c) if b) meets multiple alternatives, hit  again, for a list.
> >>> d) hit , to cycle through visited mailboxes, till you're back.
> >> 
> >> e) hit - to go back to the previously visited mailbox
> > 
> > OK, but that is d) mapped to a different key.
> 
> No it isn't, the binding is 'c' as you wrote above for
>  which presents the 'Open mailbox' prompt. When I
> enter - at the prompt it takes me back to the previous folder,
> very much like cd does.
> 
> > Incidentally,
> > here '-' gives:   "Key is not bound.  Press '?' for help."
> 
> No, 'c', and then - at the prompt.
> 
> > I'm on Mutt 1.5.21, and default bindings may have changed since then.
> > (I have no binding for  in the index, so d) would seem to be
> > default.)
> 
>  the prompt goes up in history, it's not a command binding,
> and will show you what you previously entered (somewhat like in a
> shell), entering - at the prompt will not present the previously
> visited mailbox, only '-', will not expand by hitting tab, but
> after hitting enter take me to the previous mailbox.
> 

I can see what you both are referring to.  There are big differences
between 'c' and 'y' for my work style.  First, 'y' shows the files
defined by the "mailboxes" parameter, the ones I'm looking for.  In
contrast, 'c' shows the files defined by the "folder" parameter which
in my case is not the receiving mailboxes, but the previously saved
mail in ~/Mail (about 800 files). 

Another difference, 'y' immediately goes to the index where 'c' goes
to a prompt on the status line with a suggested path.  That is where
the '-' and up/down arrows can be used or a '?' entered to get to the
index.

All useful learning thank you.  But I'll ask my original query again.

Is there a way to have the index shown by the 'y' command limited to
those files that are NOT empty?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: omit empty mailboxes from list

2016-03-25 Thread Jon LaBadie
On Fri, Mar 25, 2016 at 04:16:27PM -0700, Will Yardley wrote:
> On Fri, Mar 25, 2016 at 11:12:34PM +, Christian Ebert wrote:
> > 
> > May not be exactly what you want, but are you aware of the
> > next-unread-mailbox command?
> 
> Hah, does the same thing as the macro I posted that I have been using
> forever always something new to learn.
> 
Ain't that the truth!!

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: omit empty mailboxes from list

2016-03-25 Thread Jon LaBadie
On Fri, Mar 25, 2016 at 11:12:34PM +, Christian Ebert wrote:
> * Jon LaBadie on Friday, March 25, 2016 at 14:36:17 -0400
...
> > 
> > Recently I've been trying to adapt to using the "y"
> > mutt command to list my mailboxes and select the one
> > I want to read next.  Unfortunately the mailbox list
> > includes the empty ones as well as ones with readable
> > mail.  Is there a way to eliminate the empty files
> > from the list prepared by the "y" command?
> 
> May not be exactly what you want, but are you aware of the
> next-unread-mailbox command?
> 
>>> End of included message <<<

No I was not.  Found it in the list of unbound functions.
Thanks, I've mapped it to a function key and will try it out.

It isn't quite what I was looking for.  Sometimes I leave read
mail in the mailbox and want to go back to it.  If I understand
this function, the box I want may be skipped over.  But I can
always fall back to one of the 50 aliases in my ".mailiases"
file.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


omit empty mailboxes from list

2016-03-25 Thread Jon LaBadie
Like many others, procmail splits my incoming mail
into many mailboxes.  My way of reading them is a
set of shell aliases doing "mutt -f ..."  All begin
with "m" (e.g. mm for this list) and "m" by itself
lists the non-empty mailboxes.

So my mail reading consists of starting and quitting
mutt many times as I switch among the mailboxes.

Recently I've been trying to adapt to using the "y"
mutt command to list my mailboxes and select the one
I want to read next.  Unfortunately the mailbox list
includes the empty ones as well as ones with readable
mail.  Is there a way to eliminate the empty files
from the list prepared by the "y" command?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: decoding UTF-8

2016-03-15 Thread Jon LaBadie
On Tue, Mar 15, 2016 at 11:18:47AM +0100, Ionel Mugurel Ciobîcă wrote:
> On 14-03-2016, at 17h 30'55", Jon LaBadie wrote about "decoding UTF-8"
> > I frequently find headers (mostly Subject, but also From/To)
> > that I assume are some representation form for a UTF-8 encoded 
> > string as they start with "=?UTF-8?" and end with "=?= ".
> > For example:
> > 
> >   To: =?UTF-8?B?Z3VuZGk=?= <user@domain>
> > 
> > Is my assumption correct?  What is the representation called?
> > Is there a tool to regain the original string?
> > I believe my video system can display the larger
> > character set.
> > 
> 
> If after =?UTF-8 there is ?Q then the non-ascii characters (and =) are
> represented by their hexadecimal representation, for example ç is
> =C3=A7.
> 
> If after =?UTF-8 there is ?B then all characters are encoded using an
> algorithm that takes 6bits at the time. You can encode and decode this
> with base64:
> 
> # echo "something" | base64
> # c29tZXRoaW5nCg==
> 
> #echo "Z3VuZGk=" | base64 -d
> gundi
> 
> 
> Ionel
> 

Thank you Ionel.

I looked at over 400 messages in my spam quarantine directory where
I see a lot of these encodings.  The vast majority had ?B? after
the UTF-8.  I tried a few of them and they did decode with base64.

Instead of ?B?, seven had ?Q? and two had ?q?.  These did not
decode with base64.  Gee, maybe they are ROT13 :-)

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


decoding UTF-8

2016-03-14 Thread Jon LaBadie
I frequently find headers (mostly Subject, but also From/To)
that I assume are some representation form for a UTF-8 encoded 
string as they start with "=?UTF-8?" and end with "=?= ".
For example:

  To: =?UTF-8?B?Z3VuZGk=?= 

Is my assumption correct?  What is the representation called?
Is there a tool to regain the original string?
I believe my video system can display the larger
character set.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


eliminate empty mailboxes from 'y' index

2016-03-01 Thread Jon LaBadie
I have a large set of aliases to start mutt on my
collection of mail boxes.  So I typically enter
and exit mutt many times.

I've been looking at the 'y' command to see if I
should change my behavior.  One problem for me is
the index displays all my mail boxes including
empty ones.

Is there a way to eliminate empty mail boxes from
the index display?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: shell script macro

2016-01-20 Thread Jon LaBadie
On Wed, Jan 20, 2016 at 12:46:46PM -0600, Derek Martin wrote:
> On Tue, Jan 19, 2016 at 11:28:19PM -0500, Jon LaBadie wrote:
> > I'm trying to write an index macro invoking a shell script.
> > Simple enough, but I would like to pass the current sender's
> > address to the script.  Not the full address, just the
> > "user@host" part.
> 
> I'm pretty ignorant about Mutt's macro features, having never had any
> specific occasion to need those facilities.  However, what I will say
> is, if you can figure out how to pass the address to your script, you
> can easily convert it to user@host in the script.  I suspect it'll be
> easier to do that than to get mutt to do exactly that.
> 
> Hope that helps.

Thanks, as a fall back, that is what I will do.  I can write the macro
as piping to "formail -x From:" and feed that to my script via stdin.
Then edit that in my script to get the user@host address portion.

BTW I will use the macro to build up a list of email addresses of
advertisers who I will accept email from, but wish to filter into
a separate "ads" mailbox.

I was hoping to not need formail, instead passing something like the
"%f" ?variable?parameter?flag? or whatever it is called.  That would
be the full "From" string including the sender's "real" name.

What I was looking for was how to use the %f (if possible in a macro)
and if an alternative was available where mutt already removed the
sender's real name.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


shell script macro

2016-01-19 Thread Jon LaBadie
I'm trying to write an index macro invoking a shell script.
Simple enough, but I would like to pass the current sender's
address to the script.  Not the full address, just the
"user@host" part.

suggestions?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: warning about missing attachment

2016-01-11 Thread Jon LaBadie
On Mon, Jan 11, 2016 at 01:02:41PM +0100, Matthias Apitz wrote:
> El día Monday, January 11, 2016 a las 10:16:39PM +1100, Erik Christiansen 
> escribió:
> 
> > On 11.01.16 11:34, Matthias Apitz wrote:
...
> 
> > "set edit_headers=yes" in .muttrc? If the latter, are you certain they
> 
> I have in my .muttrc:
> 
> # needed by CheckAttach,
> # http://www.vim.org/scripts/script.php?script_id=2796
> set edit_headers
> 

Shouldn't edit_headers be set to a "value", either yes or no?

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Move old messages

2015-11-30 Thread Jon LaBadie
On Mon, Nov 30, 2015 at 04:52:41PM +0200, Danny wrote:
> > On 28Nov15 09:55 +0200, Danny wrote:
...
> > 
> > will save to a folder in ~/mail/incoming/os/bsd/FreeBSD-OLD
> > 
> > Also make sure that the folder already exists, otherwise mutt will ask
> > to create it.
> > 
> 
> The folder exists and is rw ...
> 

You also need execute permission on folders.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)



Re: Move old messages

2015-11-27 Thread Jon LaBadie
On Fri, Nov 27, 2015 at 04:49:17PM +0100, bastian-muttu...@t6l.de wrote:
> On 27Nov15 16:33 +0200, Danny wrote:
> > O.k ... I tried various combinations but it does not seem to work
> > 
> > folder-hook .FreeBSD push 
> > 'T~s>5d;s/incoming/os/bsd/FreeBSD-OLD is
> > what I tried last ...
> 
> Right. Of course I inserted some typo.  ~s is the metachar for the
> subject of the mail. Try it with a ~d which corresponds to the date
> received.
> 
>   folder-hook .FreeBSD push 
> 'T~d>5d;s/incoming/os/bsd/FreeBSD-OLD
> 
> Watch out:
> The first argument to folder-hook is a regexpr. So be careful with that.
> .FreeBSD will (most probably) match both of your mailboxes FreeBSD and
> FreeBSD-OLD.
> 
> Better try first:
> 
>   folder-hook FreeBSD$ push 
> 'T~d>5d;s/incoming/os/bsd/FreeBSD-OLD
> 
> Here, the '$' marks the end of a line, thus the folder FreeBSD-OLD will
> not be matched.
> 
Nice Bastian, I may also have a use for something like this.

One thought, if I'm away for a week or more this would archive several
days of unread mail.  Adding a simple ~R to the pattern seems to
eliminate this concern.  Are there any side-effects I overlook?

  folder-hook FreeBSD$ push 
'T~R~d>5d;s/incoming/os/bsd/FreeBSD-OLD

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Do not load attachments until asked for

2015-11-25 Thread Jon LaBadie
On Wed, Nov 25, 2015 at 12:58:40PM -0800, fe...@crowfix.com wrote:
> On Wed, Nov 25, 2015 at 09:37:30PM +0100, Matthias Apitz wrote:
> > El día Wednesday, November 25, 2015 a las 12:21:15PM -0800, 
> > fe...@crowfix.com escribió:
> > 
...
> > Btw: I'm still waiting for the day/mail when some stupid soul can attach an 
> > ISO file of a CD or DVD to a mail and it passes the MTA chain :-)
> 
> OMG! Someone will try to attach the Internet!  Or someone will send mlaware 
> described as being the Internet!  :-) :-)
> 
> But more seriously, someday speeds and storage will be such that this will be 
> commonplace, and we will look back to today and laugh at our primitive 
> systems.
> 

I've already had that shock when comparing HTML emails
with their text only equivalents.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Press any key to continue

2015-09-21 Thread Jon LaBadie
On Tue, Sep 22, 2015 at 11:03:18AM +1000, Cameron Simpson wrote:
> On 21Sep2015 14:36, Ben Boeckel <maths...@gmail.com> wrote:
> >On Mon, Sep 21, 2015 at 12:32:02 -0500, David Champion wrote:
> >>set my_wait_key=$wait_key
> >>unset wait_key
> >>set wait_key=$my_wait_key
> >
> >Well, that looks nasty, but it works:
> >
> >   macro generic \Cy \
> >   ":set my_wait_key = $wait_key:unset 
> > wait_keykillall -USR1 offlineimap:set wait_key 
> > = $my_wait_key:unset my_wait_key" \
> >   "kick offlineimap"
> 
> I have macros like this. It is nasty, at least when expressed in precisely
> this way.
> 
> Jon LaBadie and David Champion's suggestion of having a pair of macros to
> save the current config state and restore it (by stuffing the value of $foo
> into $my_foo for various $foo) is probably the generic way to go there.
> 
> So you might have ",y" mapped to a macro to save various settings (i.e. save
> everything that any of your macros fiddle with) and ",Y" mapped to pull the
> values back from $my_foo et al into the settings again.
> 
> Then put ",y" at the start of your macros and ",Y" at the end.
> 
...
> I think about this issue frequently. My preferred general approach would be
> some kind of stack of settings: "push settings", do work, "pop settings".
> And possibly "push particular setting(s)".
> 
> There are three trickinesses that spring to mind: (a) ...  (b) making the
> "pop settings" operation run even when something in the middle of your
> macro fails and (c) ...

That is no different than the situation in the above macro.  The only code
that changes settings is the code between the save and restore.  In the
above macro, the save and restore is explicit in dealing with one setting
instead of generically saving and restoring multiple settings.  The problem
of something failing in the middle of the macro is unchanged.

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Press any key to continue

2015-09-21 Thread Jon LaBadie
On Mon, Sep 21, 2015 at 02:36:34PM -0400, Ben Boeckel wrote:
> On Mon, Sep 21, 2015 at 12:32:02 -0500, David Champion wrote:
> > set my_wait_key=$wait_key
> > unset wait_key
> > set wait_key=$my_wait_key
> 
> Well, that looks nasty, but it works:
> 
> macro generic \Cy \
> ":set my_wait_key = $wait_key:unset 
> wait_keykillall -USR1 offlineimap:set wait_key = 
> $my_wait_key:unset my_wait_key" \
> "kick offlineimap"
> 
> I still think some command or function to do this would help a lot.
> Wrapping all functions like this is…tedious to say the least. It also
> makes reading these things annoying since the meat of the binding is
> buried 65 characters into the line.

Can a macro be executed by another macro?
Back in my troff days we used to write macros like
"save_a_group_of_settings" and "restore_saved_settings".

After the housekeeping macro calls appeared at the start
and end of several other definitions, the mind learns to
ignore them when considering the logic of the macro later.

-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: N Flags don't appear in Browser Menu

2015-08-26 Thread Jon LaBadie
On Thu, Aug 27, 2015 at 01:00:04AM +0200, Joe wrote:
 On Wednesday 26.08.15   08:03, Joe wrote:
  On Tuesday 25.08.15   09:43, Ian Zimmerman wrote:
   On 2015-08-25 17:35 +0200, Joe wrote:
   
%N should mean: show N flag for mailboxes containing New mail 
messages
   
all mailboxes are in mbox format (at now) not in maildir format.
I have many mailboxes, filled using fetchmail/procmail.
   
   With mbox, AFAIK mutt detects newness simply by comparing mtime with
   atime of the file.  If they're the same, it is new.
   
   Are you possibly mounting the filesystem with the noatime option?
  
  In /etc/mtab I have the following set up for filesystem of root
  partition:
  ---
  /dev/sda5 / ext4 rw,commit=0 0 0
  ---
  
  So, no noatime option...
 
 
 
 I tried to send a message myself (sender and recipient are the same address).
 My procmail config deliver this type of messages in a mailbox called
 test-mail (~/Mail/test-mail), and it is mbox format.
 
 Now if I use stat command before opening that mailbox with mutt or any other
 client I can see (my shell returns that output in Italian instead of English):
 ---
   File: Mail/mail.tests
   Dim.: 41075   Blocchi: 88 Blocco di IO: 4096   file regolare
 Device: 805h/2053d  Inode: 2434807 Coll.: 1
 Accesso: (0600/-rw---)  Uid: ( 1000/ joe)   Gid: (   16/ dialout)
 Accesso  : 2015-08-26 17:16:35.0 +0200
 Modifica : 2015-08-26 23:48:13.819996412 +0200
 Cambio   : 2015-08-26 23:48:13.819996412 +0200
 Creazione: -
 ---
 
 
 So we have:
 
 mtime (Aug 26 17:16)  atime (Aug 26 23:48)
 
 As explained by Ian Zimmerman and by man pages of mbox(5):
 ---
 If the modification-time (usually determined via stat(2)) of a nonempty mbox
 file is greater than the access-time the file has new mail.
 ---
 
 
 This should mean our mail.test mailbox contains new messages and I would
 expect Mutt shows N flag when I'm in browser menu.
 
 In my ~/.muttrc I've set:
 ---
 set folder_format = %4C %t %-40f %30.30d %-10.10N
 set sort_browser = reverse-date
 ---
 
 
 So I expected an N flag at the end of mail.test line in browser menu.
 But I can just view the following line when I open Mutt browser menu:

What is the character width of your terminal?  By my count the
N field starts at about the 84th character.  Also, why specify
a 10 char wide field for a 1 char piece of data?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: mutt and mailboxes

2015-08-01 Thread Jon LaBadie
On Sat, Aug 01, 2015 at 10:06:36PM +0200, Joel Dahl wrote:
 On Sat, Aug 01, 2015 at 07:32:16PM +0100, spaceman wrote:
  Hi Joel,
  
  What a mess. Is it possible to get list of mailboxes looking more similar 
  to
  the first example?
  
  Nope,
  http://dev.mutt.org/trac/wiki/MuttFaq/Display
  
  Having seen the IMAP folder format I wanted something similar, but 
  apparently 
  it ain't possible. The variable which controls it folder_format which is 
  documented in the man page for muttrc.
  
  Regards,
  spaceman
 
 Thank you. With folder_format I can at least improve the format somewhat.
 

You could lie to mutt about the width of your terminal screen and
see if it messes anything else up.

  $ COLUMNS=200 mutt

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: Reading encrypted mail remotely

2015-07-30 Thread Jon LaBadie
On Wed, Jul 29, 2015 at 10:49:26PM -0700, Ian Zimmerman wrote:
 On 2015-07-30 07:33 +0200, Suvayu Ali wrote:
 
  It's mutt after all, why not ssh into your preferred system and run mutt?
 
 Err ... that's actually what I do, in the other direction.
 
 Because the mail is on the server.
 
 The question is, is there any way to forward my private key information
 over the ssh link, from my desktop where it is available as a local file
 (not on the hard drive on a thumb drive which I plug in), to the server
 so mutt can use it.

Untried, mount, using sshfs, the directory containing the private key
information on your server.  Do it as part of your .profile when you
login, or start mutt from a script that mounts the pki directory.

jl
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


  1   2   >