Re: muttrc for gmx.com emails

2022-08-05 Thread D.J.J. Ring, Jr.
Those worked, but I still have a problem saving my mail.

This works without an error but it still doesn't save my mail>

set record="Sent"

That's the name of the folder I can see by pressing c to change folders.

Regards,
David

On Sat, Aug 6, 2022 at 12:59 AM Daniel Tameling
 wrote:
>
> Hi,
>
> > Also I haven't figured out how to save a copy of my sent meil to my
> > gmx sent filder.
>
> I also had this problem when adapting my mutt configuration from gmail to 
> gmx.de.
> (I download the mail with mbsync instead of using imap in mutt, but this 
> should still apply)
> I had to add this to my configuration:
>
> set copy="yes"
> set record="+Gesendet"
>
> You just need to find out, what your sent folder is called and use that in 
> record.
>
> btw: at least the German gmx uses a flat folder structure. So I don't need 
> the [GMX]/ you have in your config.
>
> > I can receive gmx.com mail, I can send gmx.com mail, but when starting
> > mutt, I have to change folders to INBOX.
>
> Did you try
>
> set spoolfile=+INBOX
>
> --
> Best,
> Daniel


Re: muttrc for gmx.com emails

2022-08-05 Thread Daniel Tameling
Hi,

> Also I haven't figured out how to save a copy of my sent meil to my
> gmx sent filder.

I also had this problem when adapting my mutt configuration from gmail to 
gmx.de.
(I download the mail with mbsync instead of using imap in mutt, but this should 
still apply)
I had to add this to my configuration:

set copy="yes"
set record="+Gesendet"

You just need to find out, what your sent folder is called and use that in 
record.

btw: at least the German gmx uses a flat folder structure. So I don't need the 
[GMX]/ you have in your config. 

> I can receive gmx.com mail, I can send gmx.com mail, but when starting
> mutt, I have to change folders to INBOX.

Did you try

set spoolfile=+INBOX

-- 
Best,
Daniel


Re: [RFC] Remove additional spaces when quoting already-quoted lines

2022-08-05 Thread Kurt Hackenberg
On Sun, Jul 31, 2022 at 01:47:06PM -0400, Kurt Hackenberg wrote:

>I agree there should not be a space after the '>'.  The trouble is,
>that space is ambiguous: software can't tell whether it's part of the
>quoting or part of the original message.

I spoke too soon.  Now I've experimented with Mutt and Thunderbird[1]
and read some Mutt code, and have a better idea what's going on.  That
space in $indent_string confuses software less than I thought.

$indent_string is only used in a format=fixed reply; it's ignored for
format=flowed replies, which are required to use ">" (no space).  A
fixed block of quoted text with a space after '>' would cause trouble
if the message containing the quote is quoted in a flowed reply -- but
not much trouble.  Those quoted lines would be fixed -- would not end
with a space -- so would not be re-wrapped.  I think the code
constructing the quote in the flowed message would interpret that
space as space-stuffing, and delete it, but that's mostly harmless.

When no flowed-text message is involved, I don't think there's any
formal rule about space or no space, and text won't be re-wrapped or
modified.  A mail reader might misrepresent the quote levels and cause
confusion about who said what, but Thunderbird seems to understand it.
(Thunderbird replaces >>>... with multiple colored vertical lines,
and, in fixed text, accepts '>' with space as a quote marker.)


[1] Mutt and Thunderbird are the only mail readers I know of that
implement text/plain format=flowed.  Mutt only implements it
partially; it relies on an external editor to do some of it.
Thunderbird has its own editor.


muttrc for gmx.com emails

2022-08-05 Thread D.J.J. Ring, Jr.
Hello,

Some of the less talented visually impaired users were wondering if
anyone has come up with a muttrc file that works with a tmpdir inside
~/.mutt?

I attach what I've come up with so far.

I can receive gmx.com mail, I can send gmx.com mail, but when starting
mutt, I have to change folders to INBOX.

Also I haven't figured out how to save a copy of my sent meil to my
gmx sent filder.

Below my signature is the pasted file, it still is dirty from having
other entries left over from gmail, but these have been commented out
with an # at the beginning of the line.

The file is also attached.

Regards,

David Ring

 === muttrc =

### ~/.mutt/muttrc

## Change the following lines to match your GMX account details
## For a bit more information and password encryption instructions go
to the Mutt set-up article
## If you must use pop change imap to pop, change port numbers, etc.
set imap_user = "usern...@gmx.com"
set imap_pass = "MYGMXEMAILPASSWORD"
set smtp_url = "smtp://usern...@gmx.com:mygmxemailpassw...@mail.gmx.com:587/"
set ssl_force_tls   = yes
set ssl_starttls= yes
set smtp_pass = "MYGMXEMAILPASSWORD"
set from = "usern...@gmx.com"
set realname = "MY REAL NAME"
## Comment the next line or change to no to put sig below quoted message(s)
set sig_on_top = yes
set signature="~/.mutt/sig"

# Change the following line if you prefer a different editor.
set editor = "nano"
# This line changes the spelling checker to aspell from less modern ispell
# set ispell="aspell -e -c"

## Basic config, you can leave this as is in most cases
# Not sure if timeout and keepalive value tweaking will help
intermittent connection issues
# (time values are in seconds)
set wait_key = no
set folder = "imaps://imap.gmx.com:993"
set spoolfile = "+GMX"
set imap_check_subscribed
set hostname = gmx.com
set mail_check = 150
set beep_new
set connect_timeout = 25
set timeout = 300
# Keep IMAP connection alive by polling intermittently
set imap_keepalive = 180
# Allow Mutt to open new imap connection automatically
unset imap_passive
set postponed = "+[GMX]/Drafts"
# set postpone=ask-yes
#set record = "+[gmx]/Sent Mail"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies

## You may need to create your tmpdir in some situations.
set tmpdir = ~/.mutt/tmpdir
set certificate_file=~/.mutt/certificates
set alias_file=~/.mutt/aliases
set move = no
set honor_followup_to = ask-yes

## Date Format ##
set date_format="%d %b %R"

## Index Sorting ##
#set index_format="%4C %Z %{%b %d %t} %-15.15L (%4l) %s"
set index_format="%4C %Z %{%b %d %H:%M} %-15.15L (%?l?%4l&%4c?) %s"

## Automatically includes quote of the original msg in replies
# set include

## If you want to be asked whether to include quoted message(s)
 set include=ask-yes

## Asks whether to forward non plain text mime types attached as they
came or to convert to inline plain text
set mime_forward = ask-no
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'

## The next two are set oposite of default if uncommented. *(needs more study)
#set strict_threads = yes
#set sort_re = no
set auto_tag = yes

## Reminds you of missing subject or empty body with msg
sent as default
set abort_nosubject = ask-no
set abort_unmodified = ask-no
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc Bcc
set attribution = "\n  %n wrote:\n%d\n"

## Character or string to appear at the start of quoted lines in replys
set indent_string = "> "
set forward_format = "[FWD: %a] %s"
set mailcap_path= ~/.mutt/mailcap
#auto_view text/html
#set implicit_autoview = yes

##  Uncomment below to read plain text instead of html when both formats exist.
#alternative_order text/plain text/html *
set folder_format = "%2C %f %8s %d %t %F %-8.8u %N %d"

## Scrolls one line at a time, i.e. smoothly scrolls, instead of only
moving up or down by whole pages, screen-fulls if you will
set menu_scroll = yes

## Read and write progress messages update frequency: The value is a
number of messages.
set read_inc = 20
set write_inc = 10

## Some useful extra key bindings
## Improve tab completion: complete address aliases with tab...
bind attach view-mailcap
#bind editor  complete# default Mutt setting
# bind editor ^T complete-query
# unset query_command   # default Mutt setting
bind editor  noop

## Optimize copy and save to show mailbox list without prompting
## Use numbers to jump directly to a mailbox, i.e. skip arrowing
macro index,pager C "?" "copy a
message to a mailbox"
macro index,pager s "?" "move a
message to a mailbox"

##This configuration provides encryption via gpgme  auto-signing
is default for all.
##Also stores encrypted mail as such, I.E. sent folder
## Uncomment the encrypt-to line in ~/.gnupg/gpg.conf and fill in your key-id.
## Don't forget to replace your-key-id with your key id below in the
pgp_sign_as line!
#set 

Re: [RFC] Remove additional spaces when quoting already-quoted lines

2022-08-05 Thread Tim Chase
On Thu, Aug 04, 2022 at 08:17:39PM +0200, Dennis Preiser wrote:
> I use vim and have the following vim9script function in my vimrc:
>
> | #---
> | # fix mail quotes for mutt, e.g. '> >foo' -> '>> foo'
> | # muttrc: set editor='vim -c ":call FixMailQuotes()"'
> | # cursor placement only useful if edit_headers is set in mutt
> | #---
> | def g:FixMailQuotes()
> | # find first body line after headers
> | var first_body_line = search('^$') + 1
> | # compress quote marks
> | while search('^>[> ]* >', 'w') > 0
> | silent! s/> >/>>/e
> | endwhile
> | # add space after last '>' if none is present
> | silent! :%s/^[>]*\zs>\ze[^> ]/> /e
> | # place cursor at first line of body
> | cursor(first_body_line, 1)
> | enddef
>
> Not better, but gets along without perl (of course only if you use
> vim). Quotes are merged and it is ensured that there is a space after
> the last quote character.
>
> '> >> >foo' becomes ' foo')

Not sure if you want it, but this reduces a bunch of that code
to a one-liner

  %s/^\(> *\)\+/\=substitute(submatch(0), ' ', '', 'g').' '

finding any quoted indentation, removing all the spaces from it,
and tacking on one space at the end.

Additionally, I think that your first_body_line pair of lines can
be reduced to just a raw search:

  /^$/+

reducing your function to:

  def g:FixMailQuotes()
%s/^\(> *\)\+/\=substitute(submatch(0), ' ', '', 'g').' '
/^$/+
  enddef

Just in case you find it useful.

-tkc






Re: [RFC] Remove additional spaces when quoting already-quoted lines

2022-08-05 Thread Derek Martin
On Mon, Aug 01, 2022 at 10:40:22AM +1000, raf via Mutt-users wrote:
> On Sun, Jul 31, 2022 at 01:47:06PM -0400, Kurt Hackenberg  
> wrote:
> > set indent_string = '>'
> > 
> > You could argue that should be the default value of $indent_string.
> 
> Not successfully. Changing a default affects all users who are
> obviously happy with the default and forces them to "fix" their
> configuration to put it back the way it was. There is rarely a good
> reason to do that. A recently discovered security flaw is a good
> reason, but that's about it.

I concur 100%.  Changing defaults--particularly ones such as this,
which is a long-standing convention used by the overwhelming majority
of e-mail users--needs a very strongly compelling justification.  A
random group of individuals who do not like the aesthetic of the
current long-standing convention does not constitute such a reason.

Note that changing this does not impact only the sender; in fact it
primarily affects the receiver, who may, for instance, be running a
custom filter that expect the well-established convention, and breaks
on those rare occasions when the sender does something... eccentric.
More likely, it may simply give some users difficulty in figuring out
who said what, because it makes lining up the levels harder, visually.

If anything, I would argue in favor of enforcing the convention and
removing configurability entirely, for that reason.  But I'm not
draconian enough to make that argument seriously. =8^)

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



signature.asc
Description: PGP signature


Re: setting up subscribed groups

2022-08-05 Thread Sam Kuper
On Fri, Aug 05, 2022 at 07:19:34AM -0400, Jude DaShiell wrote:
> Very basic question ahead.  In man muttrc subscribe [group-name]
> [regexp] [regexp] has two regexp entries beside it.  how are those
> used correctly to subscribe mutt-users and other groups?

It's a bit unclear what you are asking.

If you are asking "what does 'regexp'" mean, it's short for "regular
expression".  "regex" is also short for "regular expression".  For more
information, try entering

man 7 regex

at your command line.


If, instead, you are asking, why are there *two* "[regexp]" entries in
the syntax of the "subscribe" command, note the correct syntax:

subscribe [-group name] regexp [ regexp ... ]

The square brackets indicate optional paramenters.

I guess (but others may correct me) that reason the "subscribe" command
allows for more than one regular expression as its parameters, is to
allow for cases where, for instance, the user wishes to inform Mutt of
subscriptions to:

- multiple mailing lists, by using a single invocation of the
  "subscribe" command; or

- a single mailing list that (unusually) uses multiple different list
  addresses.

Sam


setting up subscribed groups

2022-08-05 Thread Jude DaShiell
Very basic question ahead.  In man muttrc subscribe [group-name] [regexp]
[regexp] has two regexp entries beside it.  how are those used correctly
to subscribe mutt-users and other groups?



Re: mutt, imaps and OAuth2

2022-08-05 Thread Sébastien Hinderer
Hello,

Will Yardley (2022/08/04 16:44 -0700):
> Yeah, if you can use an application password, and if your org has IMAP
> enabled, this is the easiest approach and the path of least
> resistence.

That indeed corresponds to my experience.

> There's also the external Python script used for oauth2, if it hasn't
> been mentioned elsewhere in the thread
> 
> https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py
> https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py.README
> 
> IIRC, it will / can work w/ Gmail

I was aware of it but it has not been mentionned. Thanks.

I came accross another similar project:

https://github.com/google/gmail-oauth2-tools

I think both projects work the same way and the difficulty I encountered
while trying to use both of them was the creation of the appropriate
"project". I was able to create one but then when I tried to use it I
was told that it was not following Google's rules but with no more
precision (was it the logo which was missing? Should I have given it a
scope? Permissions...?).

Also, what I didn't like so much about the approach provided by the
script in mutt's repository was that it kindo of made it mandatory to
use an encryption tool. Not that I think it's a bad idea, but it feels
to me that given the complexity the process already has, it would be
nice to be provided with a way to start _without_ encryption, at least
to remove some of the complexity at the beginning.

Best wishes,

Sébastien.