Re: Bottom posting v top posting

2018-05-13 Thread José María Mateos
On Sun, May 13, 2018 at 09:52:23AM +1000, Brian Salter-Duke wrote:
> Posting to this list yesterday and a recent incident with my partner,
> prompts me to raise the issue of bottom posting. For a long time, mutters
> have fought battles and wars to get everybody to bottom post. It makes a lot
> of sense, but we have lost every battle and every war. I now only bottom
> post to emails on this list. I also never ever see bottom posting in all the
> hundreds of emails I get every week, other than posts to the mutt lists.

I don't think it's only mutters who do this. I participate in a bunch of 
mailing lists, and in the technical ones (essentially: Python, R, 
sqlite) people respect the bottom-post, trim reply, no HTML "classical" 
netiquette instructions. On others, people just top-post happily; on one 
of those lists, I checked yesterday out of curiosity, the last e-mail in 
a chain of replies contained one new line and the entire message was 45K 
in size. This [1] is 65K, in comparison.

Gmail is quickly becoming Hotmail.

Even on those lists, I bottom-post. I edit what I am replying to and 
answer paragraph by paragraph if necessary. I don't do it out of "this 
is how things should be done", but because I think it helps getting my 
point across. It's good writing. So far, nobody has complained.

This I do with my personal e-mail. At the work, where everybody uses 
Outlook and top-posting is the norm, I just go with the flow. But the 
purposes of sending an e-mail there and sending an e-mail here are 
different.

Cheers,

[1] https://www.gutenberg.org/cache/epub/17192/pg17192.txt

-- 
José María Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en


Re: Bottom posting v top posting

2018-05-18 Thread José María Mateos
Just to add to this thread: by chance, a similar conversation recently 
happened on the main Python mailing list. It's also very interesting 
reading and starts right here: 
https://mail.python.org/pipermail/python-list/2018-May/733194.html

Cheers,

-- 
José María Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en


Re: support of two factor authentication?

2018-06-12 Thread José María Mateos
On Mon, Jun 11, 2018 at 08:26:42PM -0700, Tom Fowle wrote:
> As more isps and email providers require two factor authentication, I 
> hope mutt will support this  security system!

Doesn't mutt already "support" this? I use Fastmail with 2FA enabled. 
What I do then is to generate an app-specific password which is the one 
I use in the mutt configuration. There's not much to support, it's just 
a different password, unless there's something I'm not getting right.

Cheers,

-- 
José María (Chema) Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en


Re: html signature?

2018-03-07 Thread José María Mateos
On Wed, Mar 7, 2018, at 14:02, Grant Edwards wrote:
> text/plain (which usually assumes an 80-colum display) often renders
> especially bad on narrow phone displays.

This can be solved using format=flowed e-mail. I used it for a while (it came 
with a different set of problems) and it was displaying perfectly on my phone 
screen.

Cheers,

-- 
José María (Chema) Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en


Re: format=flowed

2019-01-06 Thread José María Mateos
On Sat, Jan 05, 2019 at 05:02:14PM -0500, Ed Blackman wrote:

> On Wed, Dec 19, 2018 at 11:10:02AM -0800, Will Yardley wrote:
>
> > I honestly think that without better editor integration, and /
> > or some way of validating that the content is actually formatted
> > properly (or post-editing formatting within Mutt), that it's not
> > a good idea for Mutt to support flowed text. Even when people are
> > using the right options in vim and doing everything else right, it
> > seems very fragile and prone to generating invalid flowed emails.

I tried to use flowed text with mutt + vim but there was always 
something that I couldn't get right. The fact that one needs to do some 
macro-editing of the text of the message (adding spaces, etc) seemed a 
bit off to me. Plus, sometimes I reply to e-mails that contain code 
snippets, and in those cases automatic wrapping tends to create some 
havoc.

In the end, I settled with hard line breaks plus this line in my mail 
vim config file:

set formatprg=par\ 72q

par seems to be smarter than regular vim reflowing. I always got some 
"orphaned" line that I needed to join with the next one manually, but 
this works like a charm.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Adding delsp=yes to Content-Type

2019-07-13 Thread José María Mateos
On Sat, Jul 13, 2019 at 07:39:22PM -0400, sunnycemet...@gmail.com wrote:
> Whoops.  The second one should have been:
> 
> >“This is  ”
> >“one line.”
> >
> >Becomes:
> >
> >“This is one line.”

Ah, I understand now, thanks :-)

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Adding delsp=yes to Content-Type

2019-07-13 Thread José María Mateos
On Sat, Jul 13, 2019 at 07:56:24PM -0400, sunnycemet...@gmail.com wrote:
> I concur.  Hanging indents lie beyond the scope of RFC 3676.

Indeed, that is the problem.

> They also don't align necessarily when proportionately spaced fonts
> are used, but José probably already knows this. As an alternative,
> have you considered the following?
> 
> 【1】 This is a list.  How does if flow?  Do the double-width brackets make
> the items stand apart?
> 【2】 Here is another item.  The double-width brackets are called
> “lenticular” apparently.  See U+3010 for more.
> 【3】 Bye.

Nah, it's too much. I'll just stick to the fixed with format. It works 
for my purposes and doesn't give much to think about while writing, but 
thanks for the suggestion.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Adding delsp=yes to Content-Type

2019-07-07 Thread José María Mateos
On Sun, Jul 07, 2019 at 03:27:09AM -0400, sunnycemet...@gmail.com wrote:
> Could you provide an example of such an indented block?

See my response to Cameron above.

> >What's the effect of delsp?
> 
> It basically removes a single trailing space from each f=f line.  Example:
> 
> “This is ”
> “one line.”
> 
> Becomes:
> 
> “This isone line.”
> 
> However:
> 
> “This is ”
> “one line.”
> 
> Becomes:
> 
> “This is one line.”

Mmmh... I don't understand. Aren't those the same two lines? I don't see 
any difference between them.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: flowed text (was: Adding delsp=yes to Content-Type)

2019-07-07 Thread José María Mateos
On Sun, Jul 07, 2019 at 09:59:15AM +1000, Cameron Simpson wrote:

> I'm curious about your experiments with composing flowed text. I'm
> using vim invoked thus:
> 
>  vim \
>  -c 'silent 1,/^$/s/  *$//' \
>  -c 'set filetype=mail' \
>  -c 'set formatoptions=waqj'
> 
> which produces a ... workable experience. It is a little prone to
> minor breakage and I do go back to check for the trailing spaces used
> to mark flowed lines.
>
> I'd be happy to find improvements.
>
> What did you try, and how did it fail? What was good?

Right now this is my vim configuration for mail (not flowed, but 
fixed-with):

setl tw=72
setl fo=watqj
setl nojs
setl nosmartindent
setl noautoindent
" Mark trailing spaces, so we know we are doing flowed format right
"match ErrorMsg '\s\+$'
" Better way
"setl list
set formatprg=par\ 72q

Right now this makes for a quite pleasant experience too; I have to 
reflow replies manually so that par does its magic, but that's fine. I 
stopped using flowed format because I like doing stuff like this:

1. A list, in which the paragraph gets aligned to the first letter of 
   the block, so it's more noticeable. Otherwise it just looks like a 
   regular paragraph with a number at the beginning.

And, as far as I can tell, this cannot be done correctly with flowed 
text. Plus sometimes I send e-mails to lists that need to copy & paste 
code and one needs to be extra careful with that. In the end, I didn't 
find any obvious advantage to the flowed format (apart from the fact 
that, yes, it degrades gracefully when one's reading the e-mail on a 
phone or something like that) and I went back to this option.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Adding delsp=yes to Content-Type

2019-07-08 Thread José María Mateos
On Sun, Jul 07, 2019 at 06:14:15PM -0700, Kevin J. McCarthy wrote:

> There actually may be an issue with Mutt here. I think the
> space-stuffing is not working, but I haven't had enough time yet to
> look into the problem and possible solutions more deeply. I'll try to
> address this before the next release though.

Just to be clear, I don't think my particular issue is with mutt here, 
it's simply that the kind of structured text I like to use doesn't play 
well with the flowed format; I never thought it was something particular 
to mutt.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


signature.asc
Description: PGP signature


Re: flowed text (was: Adding delsp=yes to Content-Type)

2019-08-29 Thread José María Mateos

On Wed, Aug 28, 2019 at 01:37:02PM -0700, Kevin J. McCarthy wrote:
Mutt doesn't add the trailing spaces.  However, if you are replying to 
a flowed message, they won't be removed.  Whether to reflow the quoted 
content is up to you.  There may be some cases where it's not 
appropriate to do so.


This makes sense, now that you mention it. It wouldn't be appropriate to 
automatically reflow code blocks, etc. Thanks for the clarification.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org/


Re: flowed text (was: Adding delsp=yes to Content-Type)

2019-08-22 Thread José María Mateos

On Sun, Jul 07, 2019 at 10:02:51AM -0400, José María Mateos wrote:

And, as far as I can tell, this cannot be done correctly with flowed
text. Plus sometimes I send e-mails to lists that need to copy & paste
code and one needs to be extra careful with that. In the end, I didn't
find any obvious advantage to the flowed format (apart from the fact
that, yes, it degrades gracefully when one's reading the e-mail on a
phone or something like that) and I went back to this option.


I'm back to trying to get flowed mode working for me, but I'm finding
something funny: mutt is not adding the trailing space to every line when
quoting. I would have assumed this is done automatically, should I use
my editor to reformat the relevant quotations again?

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: flowed text (was: Adding delsp=yes to Content-Type)

2019-08-22 Thread José María Mateos

On Thu, Aug 22, 2019 at 08:24:30PM -0400, José María Mateos wrote:

On Sun, Jul 07, 2019 at 10:02:51AM -0400, José María Mateos wrote:

And, as far as I can tell, this cannot be done correctly with flowed
text. Plus sometimes I send e-mails to lists that need to copy & paste
code and one needs to be extra careful with that. In the end, I didn't
find any obvious advantage to the flowed format (apart from the fact
that, yes, it degrades gracefully when one's reading the e-mail on a
phone or something like that) and I went back to this option.


I'm back to trying to get flowed mode working for me, but I'm finding
something funny: mutt is not adding the trailing space to every line when
quoting. I would have assumed this is done automatically, should I use
my editor to reformat the relevant quotations again?


And on top of that I forgot to set the proper vim variables to add 
trailing spaces to my own lines, so obviously my previous message didn't 
flow at all.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Overwrite draft headers?

2019-09-17 Thread José María Mateos

Hi,

Is it possible to tell mutt to automatically overwrite headers 
(content-type, etc) from a draft that is being edited? My question comes 
after the other day I started a draft using Fastmail's webmail app, then 
finished it using mutt and sent it. Later, I saw that the f=f settings 
were not set in the mail. I've done some tests today and indeed, if the 
draft is not started by mutt, that setting is not present in the header 
and further editing of the message with mutt doesn't fix that. I guess 
it can be done manually, but I'd like to know if there is some setting 
I've overlooked.


Thanks,

--
José María (Chema) Mateos || https://rinzewind.org/


Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"

2019-09-08 Thread José María Mateos

On Sun, Sep 08, 2019 at 11:18:08AM -0300, Marcelo Laia wrote:
However, some messages have html and a single and sort alternate text 
plain said "your mailreader don't support html message". in this case, 
I need to hint "v" and select alternate html and hint enter to read the 
message. 


I have seen messages like the one you mention. They are typically 
newsletters and such (anything composed with an e-mail client is 
unlikely to yield that, in my experience, or at least I can't recall if 
I have ever seen one of those).


What I do is to filter all newsletters to their proper folder, and then 
I have this in my muttrc:


auto_view text/html
folder-hook . 'unalternative_order *; alternative_order text/plain text/html'
folder-hook newsletters 'unalternative_order *; alternative_order text/html 
text/plain'

So my folder "newsletters" will see HTML before text, but for the rest 
of the folders, text comes first.


I don't know if this solution is OK for your current workflow / setup, 
but at least it's working quite well for me.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org/


Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-30 Thread José María Mateos
On Tue, Jul 30, 2019 at 10:08:02AM -0400, Mark H. Wood wrote:

> You may want to examine some netnews clients for ideas. They tend to
> have exactly this: a database of killed threads, easily augmented with
> a simple keystroke.

This. Having used slrn in the past, I was surprised mutt didn't have 
some kind of killfile mechanism readily available (or, if it's 
available, I have completely missed it).

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: imap4s timeouts and closed connections

2019-07-28 Thread José María Mateos
On Sun, Jul 28, 2019 at 11:13:17AM +0100, tech-lists wrote:

> I'm using fastmail for all my mail and I access it with imap4s. Lately
> I've been seeing timeouts, or a mailbox will just close [1], and yet
> my connection (fibre) is stable. I've been using imap with mutt ever
> since direct imap support became available, and this is the first time
> I've really had any problem with mutt in an imap context.

I also have Fastmail and also have these problem -- mailboxes are closed 
and a malformed TLS package warning is shown. I haven't found a way to 
solve this with any combination of timeouts, keepalive, etc. In the end, 
this brought me back to solve whatever issues I had with offlineimap and 
do everything locally now.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org


Re: imap4s timeouts and closed connections

2019-08-08 Thread José María Mateos
On Wed, Aug 7, 2019, at 19:17, tech-lists wrote:
> Please can you tell me what OS you were using and whether you were using
> openssl or gnutls for ssl, when you were experiencing the problem?

Hi,

I'm using Ubuntu 16.04, with the last mutt version available (1.5.24). As far 
as I know, it uses libgnutls.

Cheers,
-- 
José María (Chema) Mateos || https://rinzewind.org


Re: Adding delsp=yes to Content-Type

2019-07-06 Thread José María Mateos
On Sat, Jul 06, 2019 at 12:41:21AM -0400, sunnycemet...@gmail.com wrote:
> Thank you for the helpful response.  I was originally hesitant to 
> clobber
> whatever value for Content-Type that mutt created on its own.  However, the
> following seems to sidestep such concerns:
> 
> set content_type = "$content_type; delsp=yes"
> 
> Hopefully this message body flowed well for you.  ;)

It did flow well for me. Now I'm curious: I tried to get flowed messages 
working for me but in the end I gave up because I couldn't compose 
indented blocks as I like, so I went back to fixed width format. What's 
the effect of delsp?

Best,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Creating HTML emails with mutt

2019-11-03 Thread José María Mateos

On Sun, Nov 03, 2019 at 07:56:34AM -0500, Mark H. Wood wrote:

I like that Mutt presents emails simply.  It ignores all the fancy
to-the-pixel formatting, pointless images, distracting backgrounds,
and flashing multicolored nonsense.  I find that reading mail with
Mutt is more restful than with other MUAs.  Occasionally I do
encounter a message whose text/plain part says only "you must enable
HTML mail to read this message."  I interpret this as "you do not need
or want to read this message," and I happily hit "d" and move on.


My bank still sends me this in the text/plain part of the message every 
month:


Your %%MONTH%% %%ACCOUNTTYPE%% %%STATEMENTRECEIPT%% is ready

But yes, I've also learned to ignore it.

Also, I also want to thank you for writing this down. All the reasons 
why I use mutt boil down to essentially this.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org/


Re: Opening URLs from mutt (was: Creating HTML emails with mutt)

2019-10-30 Thread José María Mateos

On Tue, Oct 29, 2019 at 07:39:34PM -0400, José María Mateos wrote:
To me, the gold standard of "selecting URLs while in text mode to be 
sent to the browser" is a plugin for irssi ("the mutt of IRC clients", 
I'd say) called simply url.pl. It tracks which URLs have been posted to 
all channels one is into and prepends a number between brackets. When 
one wants to visit a given address (let's say, just for this example, 
that I want to visit the third URL that was posted), just has to send 
the command /url 3, and it will be sent to Firefox.


Thinking a bit more about this: is there any way to replicate this 
behavior in mutt using some external script?


Using elinks/w3m/whatever we can have a list of numbered links from the 
HTML portion of the message we are reading. That dump can be piped to a 
temporary file and then read using bash/python/perl/yougettheidea to 
extract link number N (we need a way of passing N to the script), which 
is then sent to firefox.


I know this can't be done with a macro because it can't get any user 
input, unless I'm mistaken, but I was wondering if the above pipeline 
could be implemented somehow with the existing parts.


Cheers!

--
José María (Chema) Mateos || https://rinzewind.org/


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 10:15:34 -0300 Marcelo Laia 
wrote:
> root@marcelo:~# dpkg -l apparmor
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/
> Nome   Versão   Arquitectura Descrição
> +++-==---==
> ii  apparmor   2.13.3-5 amd64user-space parser
> utility for AppArmor root@marcelo:~# 

Following up on this, I am pasting here below the contents of
my /etc/apparmor.d/usr.bin.evince, which allows me to use .mutt as a
folder for pdf files. I guess the culprit should be there (tl;dr: grep
mutt /etc/apparmor.d/usr.bin.evince returns nothing).

---
# vim:syntax=apparmor

# evince is not written with application confinement in mind and is designed to
# operate within a trusted desktop session where anything running within the
# user's session is trusted. That said, evince will often process untrusted
# input (PDFs, images, etc). Ideally evince would be written in such a way that
# image processing is separate from the main process and that processing
# happens in a restrictive sandbox, but unfortunately that is not currently the
# case. Because evince will process untrusted input, this profile aims to
# provide some hardening, but considering evince's design and other factors such
# as X, gsettings, accessibility, translations, DBus session and system
# services, etc, complete confinement is not possible.

#include 

/usr/bin/evince {
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  #include 
  #include 
  #include 
  #include 
  #include 

  # For now, let evince talk to any session services over dbus. We can
  # blacklist any problematic ones (but note, evince uses libsecret :\)
  #include 

  #include 
  dbus (receive) bus=system,
  # Allow getting information from various system services
  dbus (send)
  bus=system
  member="Get*"
  peer=(label=unconfined),
  # Allow talking to avahi with whatever polkit allows
  dbus (send)
  bus=system
  interface="org.freedesktop.Avahi{,.*}",
  # Allow talking to colord with whatever polkit allows
  dbus (send)
  bus=system
  interface="org.freedesktop.ColorManager{,.*}",

  # Terminals for using console applications. These abstractions should ideally
  # have 'ix' to restrict access to what only evince is allowed to do
  #include 

  # By default, we won't support launching a terminal program in Xterm or
  # KDE's konsole. It opens up too many unnecessary files for most users.
  # People who need this functionality can uncomment the following:
  ##include 
  ##include 

  /usr/bin/evince rmPx,
  /usr/bin/evince-previewer Px,
  /usr/bin/yelp Cx -> sanitized_helper,
  /usr/bin/bug-buddy px,
  # 'Show Containing Folder' (LP: #1022962)
  /usr/bin/nautilus Cx -> sanitized_helper, # Gnome
  /usr/bin/pcmanfm Cx -> sanitized_helper,  # LXDE
  /usr/bin/krusader Cx -> sanitized_helper, # KDE
  /usr/bin/thunar Cx -> sanitized_helper,   # XFCE

  # For Xubuntu to launch the browser
  /usr/bin/exo-open ixr,
  /usr/lib/@{multiarch}/xfce4/exo-1/exo-helper-1 ixr,
  /etc/xdg/xdg-xubuntu/xfce4/helpers.rc r,
  /etc/xdg/xfce4/helpers.rc r,

  # For text attachments
  /usr/bin/gedit ixr,

  # For Send to
  /usr/bin/nautilus-sendto Cx -> sanitized_helper,

  # GLib desktop launch helper (used under the hood by g_app_info_launch)
  /usr/lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop rmix,
  /usr/bin/env ixr,

  # allow directory listings (ie 'r' on directories) so browsing via the file
  # dialog works
  / r,
  /**/ r,

  # This is need for saving files in your home directory without an extension.
  # Changing this to '@{HOME}/** r' makes it require an extension and more
  # secure (but with 'rw', we still have abstractions/private-files-strict in
  # effect).
  owner @{HOME}/** rw,
  owner /media/**  rw,
  owner @{HOME}/.local/share/gvfs-metadata/** l,
  owner /{,var/}run/user/*/gvfs-metadata/** l,

  owner @{HOME}/.gnome2/evince/*   rwl,
  owner @{HOME}/.gnome2/accels/rw,
  owner @{HOME}/.gnome2/accelsevince   rw,
  owner @{HOME}/.gnome2/accels/evince  rw,

  # Maybe add to an abstraction?
  /etc/dconf/**   r,
  owner @{HOME}/.cache/dconf/user rw,
  owner @{HOME}/.config/dconf/userr,
  owner /{,var/}run/user/*/dconf/ w,
  owner /{,var/}run/user/*/dconf/user rw,
  owner /{,var/}run/user/*/dconf-service/keyfile/ w,
  owner /{,var/}run/user/*/dconf-service/keyfile/user rw,

  owner /{,var/}run/user/*/at-spi2-*/   rw,
  owner /{,var/}run/user/*/at-spi2-*/** rw,

  # from http://live.gnome.org/Evince/SupportedDocumentFormats. Allow
  # read and write for all supported file formats
  /**.[bB][mM][pP] rw,
  /**.[dD][jJ][vV][uU] rw,
  /**.[dD][vV][iI] rw,
  

Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 15:05:24 +0100  (Nuno Silva)
wrote:
> Does "grep -R mutt /etc/apparmor.d/" return anything?
> 
> I suspect that, in a system with this issue, the problematic rule would
> be in abstractions/private-files, and usr.bin.evince includes
> abstractions/evince[1] which includes abstractions/private-files.

For me, just this line:

/etc/apparmor.d/abstractions/ubuntu-console-email:  /usr/bin/mutt Cx -> 
sanitized_helper,

But take into account that I have no problems with evince in .mutt.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


How to send links from Firefox

2019-10-14 Thread José María Mateos
Hi,

I have set up Firefox so that mutt is the designed e-mail client. 
However, when I click on "Email link...", the e-mail body doesn't go 
into the text editor (vim, in my case).

I guess there might be some wrapper script that takes care of that (by 
piping the URL to a temporary file and then tell mutt to use that one, 
for example), but I haven't figured out how to do this. Can anyone offer 
some help?

Thanks a lot,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: How [Mutt] to send links from Firefox

2019-10-14 Thread José María Mateos
On Mon, Oct 14, 2019 at 07:51:10PM -0400, Kurt Hackenberg wrote:

> That's probably not arguments. Mutt probably can't run without a
> terminal. I bet the missing terminal emulator was the problem.

(Resending because I forgot to reply to the list)

No, it was something different. I got a terminal and mutt was invoked,
but then the content of the body didn't make to the editor.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Creating HTML emails with mutt

2019-10-28 Thread José María Mateos

On Mon, Oct 28, 2019 at 11:11:31PM +0100, Matthias Apitz wrote:

Well, do you speak for you or for a 'lot of people'? Who they are?
I speak only for my own interests (as I said: I do not need this).


Talking for myself, I really don't need point 1 (composing of HTML 
messages), but number 2, opening links in an easy way, would be a nice 
to have. I can always user urlview or send the HTML file to Firefox, but 
any of these solutions is slower than simply being able to somehow tell 
mutt "open URL #12 from this e-mail", and have that sent to the web 
browser.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org/


Re: Creating HTML emails with mutt

2019-10-28 Thread José María Mateos

On Mon, Oct 28, 2019 at 10:40:16PM +, Chris Green wrote:

Isn't that handled by your terminal program?  Mine certainly allows
one to right click on any URL to open it.


Not if the URL spans several lines. I think it's a common issue across 
several terminal programs and last time I read about it I think it's due 
to the way mutt handles URLs, but perhaps I'm mistaken.


--
José María (Chema) Mateos || https://rinzewind.org/


Re: Opening URLs from mutt (was: Creating HTML emails with mutt)

2019-10-29 Thread José María Mateos

On Tue, Oct 29, 2019 at 01:37:29PM +1300, martin f krafft wrote:
Yes, it does. I think Chris' and José's points were more about 
requiring an external tool to provide functionality which has become so 
core to everyday email use that mutt could learn to do it.


Urlview also obstructs your view to context when using it. I've opened 
it a million times only to find myself staring at a list of tracking 
URLs that all look the same, now knowing which one appeared in the 
paragraph I was just reading. Mutt could do a much better job, with a 
UI/UX similar to what rxvt-unicode offers (but cannot due to 
ncurses…), i.e.:


Yes, that's precisely what I meant. Problems when selecting URLs come 
precisely from two very precise e-mail types:


1. Very long URL compilations. Say RISKS Digest, for instance. If anyone 
here is subscribed, they know what I mean.


2. Newsletters with tracking links.

To me, the gold standard of "selecting URLs while in text mode to be 
sent to the browser" is a plugin for irssi ("the mutt of IRC clients", 
I'd say) called simply url.pl. It tracks which URLs have been posted to 
all channels one is into and prepends a number between brackets. When 
one wants to visit a given address (let's say, just for this example, 
that I want to visit the third URL that was posted), just has to send 
the command /url 3, and it will be sent to Firefox.


Now, visualizing HTML e-mail with elinks -dumps or something similar 
also prepends a number between brackets, but I have found that urlview 
and elinks don't always agree on the numbering. In the end, if the 
e-mail is a complex HTML newsletter, I just open it with Firefox and 
click on whatever links I want to read. If it's a text message, I select 
the URL with the mouse and paste it in the address bar of a new Firefox 
tab. It takes just a few seconds of my time, it's not a big deal... but 
it could be better :-)


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-19 Thread José María Mateos
On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> message in a pop-up window.  All directory names I have tried other
> than .mutt allow the PDF file to be read.
> 
> Has anyone else here seen anything like this?  It would seem that it's
> an error in evince but of some relevance to mutt use.

I can't reproduce this on my end. I copied a PDF file in my ~/.mutt
directory and all these options work:

$ evince test.pdf (from inside ~/.mutt)
$ evince .mutt/test.pdf (from my home directory)
$ evince ~/.mutt/test.pdf (same)

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 09:43:51 +0100 Chris Green  wrote:
> Thanks for trying it José, what version of evince are you running?
> Mine is "GNOME Document Viewer 3.32.0".

I'm running 3.18.2 on an Ubuntu Mate 16.04 with Xfce as a desktop
manager.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Creating HTML emails with mutt

2019-10-25 Thread José María Mateos
On Sat, 26 Oct 2019 11:16:25 +1300 martin f krafft
 wrote:
> In any case, given how email has changed in the last 20 years, and how 
> text/plain messages are causing display issues across different device types 
> (e.g. they are not “responsive”)

If you want to accomplish this, wouldn't it be enough not to wrap the
text? That way the client/screen will do its own wrapping, no need to go
the HTML way.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Dynamically setting the from address

2020-09-28 Thread José María Mateos

On Mon, Sep 28, 2020 at 02:11:58PM +, ಚಿರಾಗ್ ನಟರಾಜ್ wrote:
I'd like to automatically set the from address to @chiraag.me if the 
email was sent to such an address, keeping the @.com 
address as the from address if that is not the case.


Hi,

If I understood correctly, what you want can be done by adding

set reverse_name

to your .muttrc.

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


signature.asc
Description: PGP signature


Re: Block, autoreplay and purge messages with attachement size large than 1MB

2020-05-27 Thread José María Mateos

On Wed, May 27, 2020 at 04:59:20PM -0300, Marcelo Laia wrote:

3. If the attachment is larger than 1MB, send a message with the
following text: "Dear colleague, your message has not been delivered. My
system has detected that it contains attachments larger than 1MB. It was
blocked! Please upload the attachment in the cloud ( drive, dropbox,
onedrive, etc.) and send me the message again with the link to download
the attachment. Thank you very much! "

4. Purge the message from my local and remote dir


Not what you asked specifically, but wouldn't it be easier to do this 
filtering + autoresponse on the server side? Unless you have a 
particular requirement to do this on the client side, of course, in 
which case ignore this message.


Best,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Block, autoreplay and purge messages with attachement size large than 1MB

2020-05-28 Thread José María Mateos

On Wed, May 27, 2020 at 05:22:23PM -0300, Marcelo Laia wrote:

You are very welcome!

I asked to do this in the client side because I use Gmail. How I could
do this on the Gmail side? If it is possible, I will love it!


Hi Marcelo,

I've done a small test but I haven't been able to make it work, though I 
think I've followed a reasonable path. You're welcome to try to 
replicate it, I can't really tell why it fails, it's not like there's a 
log somewhere.


First I have created a template (make sure you have them enabled: 
Settings > Advanced > Templates). Edit a new mail and use the "three 
dot" menu at the bottom of the composing window: Templates > Save draft 
as template > Save as new template. Give it a proper name 
(large_autoreply, for instance).


Then create a filter with this search: "has:attachment larger:256K". I'm 
using 256K so we don't have to use attachments that are too large to 
test it. Put that in the search box (or use the options to get basically 
the same effect) and then click "Create filter". Choose "Delete it" and 
"Sent template", and choose the one we just created. Click on the blue 
"Create filter" button.


Now I send an e-mail to that address with a large attachment (300kb)... 
and the e-mail is deleted, but for some reason I don't get the 
autoresponse back. It's true that I haven't used gmail in a while, so 
perhaps there is something more to the templates that I haven't done.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: plain-text email and kernel development

2020-09-16 Thread José María Mateos

On Tue, Sep 15, 2020 at 08:30:49AM +0200, Francesco Ariis wrote:

Hello mutters,
   I have just finished reading this article on The Register: «Relying
on plain-text email is a 'barrier to entry' for kernel development, says
Linux Foundation board member». [1]

Of course this opinion is not shocking, given that the «Linux Foundation
board member» in question is a Microsoft attaché.
The comment section was definitely not supportive of the idea.

I post it here as we had our fair share of discussion on plain text vs. rich
text too and I consider the debate not tangential to what mutt is; so it
is interesting to see opinions of the broader open-source community
—F

[1] https://www.theregister.com/2020/08/25/linux_kernel_email/


I remember that article. The idea I got in the end is that the person 
who was complaining didn't understand how to use one of the tools for 
the job, which in this case was his e-mail client. For what I remember, 
he was sending HTML e-mail but wasn't aware of it, or the Gmail 
interface (I think it was Gmail, but I could be mistaken) was mangling 
the input.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: is it possible to have two options for viewing html mail?

2020-10-24 Thread José María Mateos

On Sat, Oct 24, 2020 at 08:54:18PM +, Globe Trotter via Mutt-users wrote:

Lots of people send me mail in HTML format (even though I do not like it). I 
have the following set up in my .mailcap:

text/html; w3m -I %{charset} -T text/html; copiousoutput

so it converts things using w3m more or less okay, however, I am wondering is 
it possible to have an option for viewing using midori/firefox for the cases 
where w3m is not enough?


Yes. In .muttrc:

bind attach  view-mailcap # if you want to see html content using 
Return.

Then in your .mailcap:

text/html;  mutt_bgrun /usr/bin/firefox %s >/dev/null 2>&1; needsterminal
text/html; elinks -dump ; copiousoutput

The second link is the equivalent to your w3m (I use elinks). The second 
one is a script I found some time ago. You can get a copy here, for 
example https://github.com/RichiH/mutt_bgrun. It saves the html file in 
a temp folder, runs firefox and deletes the file.


Then, to use this, just go to the list of attachments in the message, 
select the HTML file, press Enter and you should have the message in a 
new firefox tab.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Using Maildir format, changing mailbox

2020-06-05 Thread José María Mateos

On Fri, Jun 05, 2020 at 04:15:10PM +0200, mutt...@mail.com wrote:

What I'd like is that when I press '?' I get a list of *mailboxes*
rather than directories, because, as a user, I'm really not interested
in directories, I only want to know about mailboxes.


I also use the Maildir format and I get directly a list of mailboxes. I 
don't know your particular config, but make sure you have


set mbox_type = Maildir

somewhere in your .muttrc.

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: error in displaying pdf

2020-12-03 Thread José María Mateos

On Thu, Dec 03, 2020 at 03:30:47AM +, Globe Trotter via Mutt-users wrote:

Thank you very much! This works.


Thanks very much from me too. This has been bothering me for a while but 
never thought there could be a very simple solution :-)


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


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

2021-02-01 Thread José María Mateos

On Mon, Feb 01, 2021 at 06:32:41AM -0800, Andrew Marks wrote:

Primarily speed, not waiting for mutt to establish an SMTP connection
and authenticate to a remote MTA. The mail is sent to the local MTA
instantly, and the local MTA is working to relay the mail appropriately
while I continue working in mutt.


I was thinking about this. I have offlineimap running, so I have a local 
copy of all my mail, but the SMTP connection still goes through my mail 
provider, not locally. While I can appreciate the increase in speed that 
a local rely can offer, I wonder if it doesn't add another layer of 
complexity as I would have to be monitoring the logs to make sure the 
e-mail was actually sent. How does it work when the remote e-mail server 
is not available or it returns some kind of error. Can one receive local 
messages that notify of a problem?


So far I like my current solution because it avoid this: sending an 
e-mail takes a few seconds (very few, 2 - 3 tops) but when the process 
is done on mutt I know the remote server has the e-mail.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


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

2021-02-01 Thread José María Mateos

On Mon, Feb 01, 2021 at 04:34:47PM -, Grant Edwards wrote:

If you set up your local MTA properly, yes. However, that's not
trivial. I maintained a local queueing MTA for many years, but after
multiple screwups where mail wasn't getting sent (and I didn't find
out in a timely manner) I switched to a non-queueing MTA (e.g. ssmtp)
and later to mutt's SMTP support.


Been there, done that. I was running my own Postfix server back when you 
could get a dyndns domain name and no one really cared if you sent 
e-mails from your cable IP; and when that started to return too many 
errors I just started using Yahoo! SMTP servers as a relay. I'm amazed 
at how reckless I was back then :-)


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Any "one-step" html viewing macros

2021-02-01 Thread José María Mateos

On Mon, Feb 01, 2021 at 09:46:04PM +0300, Oleg A. Mamontov wrote:

I use below macro (Alt-h) for the same:
---
macro index,pager h /html "view first 
html attachment"
---
Of course, I also have Chrome as a viewer for text/html in mailcap.
Hope this helps.


I tried it and in my case (using mutt 1.9.4 on Ubuntu 18.04) this opens 
the attachment list and selects the first HTML attachment, but then I 
have to click enter and q to open the HTML portion in a tab and then 
exit.


I remember that at some point I had lost the ability to open HTML 
attachments in the browser pressing Enter, and someone on the list told 
me to add this to my .muttrc:


bind attach  view-mailcap

So I've changed the macro to this, and it works perfectly in my case, 
thanks a lot for this "recipe":


macro index,pager ,b "/html" "View 
first HTML attachment in browser"

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: not to set message id in outgoing email

2021-02-03 Thread José María Mateos

On Wed, Feb 03, 2021 at 10:36:42PM +0530, Chinmaya Nagpal wrote:

On Wed, Feb 03, 2021 at 10:46:06AM -0600, Peng Yu wrote:

This does not work. Have you tried it yourself?


I did just now; my muttrc has the following lines:

 ignore *
 unignore From Date To Cc Bcc Subject

and the Message-ID header is not shown in the editor or when viewing
messages.


You're talking of different things, I think. Peng Yu is asking about how 
to have mutt not generate a message-id header automatically. You are 
talking about not displaying it within mutt, but it's not the same 
thing.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Should I have all my mailing lists in both 'lists' and 'subscribe'?

2021-02-15 Thread José María Mateos

On Mon, Feb 15, 2021 at 12:50:55PM +, Chris Green wrote:

Currently I automatically add all mailing lists I am subscribed to
into my muttrc file against both 'lists' and 'subscribe', is this
correct/OK?


I never added any mailing list I'm subscribed to, and everything works 
well; I don't particularly care about the follow-up header, most 
people's clients won't know what to do with it anyway. As long as the 
'reply-to-list' function works for me (and it does, see this e-mail as 
an example), I'm more than happy.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Should I have all my mailing lists in both 'lists' and 'subscribe'?

2021-02-15 Thread José María Mateos

On Mon, Feb 15, 2021 at 03:32:54PM +, Chris Green wrote:

I think L[ist reply] depends on there being a List-Id header in the
list's messages to work if the list isn't in lists/subscribe.

Most of the lists I use do have List-Id headers but not (quite) all.


Yes, you're right. The worst offender right now, if I'm not mistaken, is 
Google. But in those cases I just get an error message from the reply to 
list key and reply normally.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Deleting old maildir messages, is what I'm doing OK?

2021-02-15 Thread José María Mateos

On Mon, Feb 15, 2021 at 05:07:54PM +, Chris Green wrote:

Does no one else ever delete mail messges? :-)


I do, but for Junk / Trash I just set expiration times on those folders 
on my e-mail provider (Fastmail) so I don't even have to think about 
that.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Headers in Editor

2021-08-29 Thread José María Mateos

On Sun, Aug 29, 2021 at 06:02:43PM +0200, Rene Kita wrote:

The idea behind this is, that can you view/edit the headers while
replying. That's why the headers are cleared if you delete these lines.
They want end up in the body of that mail.

As already that said in another reply, 'set edit_headers=no' disables
this feature.


Just a brief addition: you can still use the header-editing 
functionality if in the send screen (the one where you press 'y' and the 
message gets sent) you press 'E'. That'll open the editor with the 
headers included. 'e' gets you to the regular editor.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: The (old) linewrap issue with URLs etc.

2021-11-12 Thread José María Mateos

On Fri, Nov 12, 2021 at 09:25:47AM +, Chris Green wrote:

I know this has been discussed before but I can't immediately find the
discussion or a solution.


Probably not the solution you're looking for, but what I do (and I guess 
more people here do) is to let go of the mouse entirely and have some 
external program that understands URLs and we then pipe the message to 
that program and select the URL we want to open.


In my case:

macro pager e 'urlscan' 'Follow links with urlscan'

Then I just press 'e' when reading a message (or CTRL + b for 'urlview', 
which is a bit simpler), select the URL I want to open and exit that 
program. Overall it's faster than relying on the mouse, I must say, 
though it forces you to scan through the list of links until you've 
found the one you're looking for.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Default path for saving attachments?

2022-02-17 Thread José María Mateos

Hi all,

When I want to save an attachment, the default path is the path where 
mutt was launched (typically my home folder). I'd like to know if 
there's any config variable to set the destination folder for saved 
attachments. I know the workaround is to start mutt in a different 
place, but I'd prefer the config option.


Thanks,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Default path for saving attachments?

2022-02-17 Thread José María Mateos

On Thu, Feb 17, 2022 at 06:47:44PM +0100, Francesco Ariis wrote:

I have macros like

   macro attach D ~/download/
   macro attach T /tmp/

to save to different folder. Would that do?


It'd definitely work, but I'd like to know if there's some way to change 
the default behaviour through a config option.


Thanks!

--
José María (Chema) Mateos || https://rinzewind.org


Re: Default path for saving attachments?

2022-02-17 Thread José María Mateos

On Thu, Feb 17, 2022 at 07:01:52PM +0100, li...@2ion.de wrote:

On Thu, Feb 17, 2022 at 12:35:32PM -0500, José María Mateos wrote:

I'd like to know if there's any config variable to set the destination folder
for saved attachments. I know the workaround is to start mutt in a different
place, but I'd prefer the config option.


Check out the $attach_save_dir configuration option [1].

[1] https://man.archlinux.org/man/muttrc.5#attach_save_dir


Thank you and Jean Louis, this is exactly what I was looking for, but it 
looks like it's still not available in the version I'm using (1.9.4 on 
Ubuntu 18.04). I'm glad to know it exists, though.


--
José María (Chema) Mateos || https://rinzewind.org


Re: Unexplained mutt error

2022-02-22 Thread José María Mateos

On Tue, Feb 22, 2022 at 09:42:46AM -0500, José María Mateos wrote:

On Mon, Feb 21, 2022 at 06:10:51PM -0600, Ion wrote:

I used the same password as IMAP as the Fastmail help page tells me
"Your app-specific password. You cannot use your regular Fastmail
password." So does the "set ssl_force_tls =yes" not cover authentication?


You need to create a password to use with IMAP / SMTP, it's not your 
regular password: 
https://www.fastmail.help/hc/en-us/articles/360058752854-App-passwords


Given that you're using Fastmail, this is my SMTP config:

# SMTP SETTINGS
# Use port 565 for SMTP instead of 465 so we can mask the IP when sending.
set smtp_url = 'smtps://ch...@rinzewind.org@smtp.fastmail.com:565/'
# Source the password from file
# This file is in the following format:
# set smtp_pass = "pass"
# set imap_pass = $smtp_pass
source ~/.creds/mutt.pass

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Unexplained mutt error

2022-02-22 Thread José María Mateos

On Mon, Feb 21, 2022 at 06:10:51PM -0600, Ion wrote:

I used the same password as IMAP as the Fastmail help page tells me
"Your app-specific password. You cannot use your regular Fastmail
password." So does the "set ssl_force_tls =yes" not cover authentication?


You need to create a password to use with IMAP / SMTP, it's not your 
regular password: https://www.fastmail.help/hc/en-us/articles/360058752854-App-passwords


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: pgp Sign as: config

2022-04-11 Thread José María Mateos

On Mon, Apr 11, 2022 at 06:09:01PM +0200, Orm Finnendahl wrote:

How do I set the "" value that it uses my HexKey?


I have my GPG options here:

$ cat .gnupg/gpg.conf
default-key 263080EC
encrypt-to 263080EC

There I declare what's my default key and I also tell it to always 
encrypt to me too if I send something encrypted.


While checking my config I've seen that I'm also defining the key to use 
in .muttrc:


set pgp_sign_as = 263080EC

Hope this helps,

--
José María (Chema) Mateos || https://rinzewind.org


Re: ask-yes for sending?

2022-06-08 Thread José María Mateos

On Wed, Jun 08, 2022 at 01:55:06PM -0500, Bryan K. Walton wrote:

To be precise, what I would like is the ability to cancel sending when
my ispell check shows me something that requires manual intervention.
It would be nice to have a confirmation come up after spell
checking, but before sending.  Then, I could cancel the actual send and
fix the error, and then send again.


I know this is not exactly what you've asked for, but wouldn't it better 
in that case to run the spell checking during the editing phase? I use 
aspell with vim, at it highlights words that it doesn't recognize as I'm 
typing.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Mutt configuration tips

2022-06-14 Thread José María Mateos

On Tue, Jun 14, 2022 at 03:26:47PM -0400, Christopher Conforti wrote:

I imagine there are a number of users who, like me, enjoy tinkering
with and tweaking their setup, adjusting every detail to their liking.
So for those who do:
* Have you done anything unusual with your configuration? Why?
* What's your favorite thing about your mutt configuration? Why?
* If you could give three tips to a new user, what would they be?


I think I'm pretty much eliminated by your premise, because my 
configuration is pretty minimal, but I'll chime in: just keep things 
simple. You can go crazy with hundreds of options and their 
combinations. Do something very minimal that works for you and then, if 
you find there's something else you'd need, start investigating how to 
do that.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


signature.asc
Description: PGP signature


Re: Offlineimap only for current folder

2022-07-28 Thread José María Mateos

On Thu, Jul 28, 2022 at 04:44:07PM +0300, Oleg A. Mamontov wrote:

I use the following approach for the same problem but with mbsync:
---
folder-hook . "source ~/.mutt/on-folder-change"
---

where ~/.mutt/on-folder-change has the below content:
---
set record = ^
set my_folder = `echo $record | sed 's|.*/||' | sed 's|\\.|/|g'`
macro index,pager o ":unset wait_keyclear; printf '# syncing =$my_folder\\n\\n'; 
mbsync full:$my_folder:set wait_key" "sync current folder"
---

I know, it looks a bit creepy but works pretty well :)


At least I understand what you're doing, more or less :-) Thanks for 
your solution. I'll stand by in case someone posts something a bit more 
straightforward (which I think might not exist.)


--
José María (Chema) Mateos || https://rinzewind.org


Offlineimap only for current folder

2022-07-28 Thread José María Mateos

Hi all,

I have offlineimap running on a cron job every 5 minutes, but from time 
to time (for example, I've received a login code) I want to refresh the 
current folder faster. For that, I have this macro:


macro index,pager G "!offlineimap\n" "Retrieve new IMAP messages"

It works well, but this refreshes all folders; I'd be great if it worked 
only for the folder I'm currently in. Is there any "environment 
variable" for the macro that I can use in this case?


Thanks!

--
José María (Chema) Mateos || https://rinzewind.org


Re: [OT] fetchmail replacement supporting Oauth

2022-05-02 Thread José María Mateos
On Mon, May 2, 2022, at 23:25, lilydjwg wrote:
> Google doesn't disable app passwords (requires 2FA). Google is going to
> disable account passwords login at the end of this month.[1]
>
> I've switched to OAuth because I don't want to enable 2FA (which means
> if I lost all my devices, I would lose access to my Google account).

Your concern is valid, but I think there are ways around it, and using 
application passwords looks to me like a good security practice.

What I personally do is to store the 2FA tokens in Authy in the phone, but also 
keep a backup copy (that sometimes is the working copy, as I don't always have 
the phone in the same room with me) in a KeePassXC[1] vault that I sync in 
Dropbox and in a couple of other machines I have access to. As long as you have 
access to this password file, you have access to your TOTP tokens.

Cheers,

[1] https://keepassxc.org/

-- 
José María (Chema) Mateos || https://rinzewind.org


Re: [OT] fetchmail replacement supporting Oauth

2022-05-04 Thread José María Mateos
On Tue, May 3, 2022, at 14:35, Derek Martin wrote:
> You're on vacation.  You probably didn't bring a laptop, because...
> you're on vacation.  You go out and leave your phone somewhere, never
> to be seen again.  Now what?

This is getting a bit off topic, but I just want to add: in the situation you 
describe, you need to get a new device somehow. With the set up I described in 
my previous message, when I have a new device I can get access to my 
credentials, as long as I have SCP access to the server that stores the backup 
copies.

That's how I see it, unless I'm missing something.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org


Re: Is linewrap dead?

2022-08-29 Thread José María Mateos

On Mon, Aug 29, 2022 at 03:43:37PM +0200, Angel M Alganza wrote:

Perhaps if there was a way to configure Mutt to wrap long lines while
reading mail with them and Vim to do the same (visually but not actually
including the new lines) while editing they would be bearable for us who
preffer wrapped mail?


You can do that. For mutt:

unset markers
set wrap = 78

That'll wrap long lines at 78 characters and won't use markers to show 
where a line was wrapped (I found that quite distracting.)


For vim, you can enable soft line wrapping. For example: 
https://vim.works/2019/03/16/wrapping-text-in-vim/


I think this is what you mean in your message, at least. This won't wrap 
any text lines and will leave the client to deal with it as it sees fit. 
On mutt's side, it'll wrap long lines at the 78 char mark.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Is linewrap dead?

2022-08-30 Thread José María Mateos

On Tue, Aug 30, 2022 at 02:58:38PM -0400, Kurt Hackenberg wrote:
Also, does vim have some option to make whitespace at end of line 
visible, or some other way to show that text is marked as flowed? That 
would be a big help.


I have:

setl list
set listchars=trail:•

This uses a nice fat dot to signal trailing spaces.

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Re: Viewing HTML message with Firefox

2022-10-10 Thread José María Mateos

On Mon, Oct 10, 2022 at 12:27:52PM +0200, Jan Eden via Mutt-users wrote:

The problem was related to the target dir (/tmp/mutt_attach). Although
it was accessible by the current user, Firefox was not able to display
files at file:///tmp/mutt_attach/file.html – while Epiphany was.

Whatever the reason, I changed the script to store HTML files in
/home/jan/mutt_attach, and Firefox successfully opens
file:///home/jan/mutt_attach/file.html.


What version of Firefox are you using? I started seeing exactly the same 
problem when I upgraded my Ubuntu installation to 22.04, where Firefox 
is handled by snap, and the filepaths it can access seems to be somewhat 
restricted. I ended up using a solution similar to yours: placing the 
temporary file in a folder within my user folder.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: muttrc for gmx.com emails

2022-08-06 Thread José María Mateos

On Sat, Aug 06, 2022 at 01:27:05AM -0400, D.J.J. Ring, Jr. wrote:

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"


I don't use `record`, but I think you need either a + or a = sign in 
front of the mailbox name.


set record="+Sent"

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Macro variable with current folder name?

2023-03-11 Thread José María Mateos

On Sat, Mar 11, 2023 at 07:30:13PM +0100, Dennis Preiser wrote:

When I use the following macro inside the folder-hook (I don't have
offlineimap)

macro index,pager G "!/bin/echo $record\n"; \


Ok, found the issue. The problem is that the folder name contains '=' 
(as in =INBOX) and for folders also '/' (as in =mutt/). These characters 
need to be removed or offlineimap, understandably, doesn't understand 
what folder I'm talking about.


This is the end solution (which works for my folder structure, other 
people might need a different sanitizing function):


folder-hook . 'set my_record=$record; \
   set record=^; \
   macro index,pager G "!offlineimap -o -l /tmp/offlineimap.log -f 
$(echo $record | sed -e 's/[=\/]//g')\n" \
"Retrieve new IMAP messages for current folder"; \
   set record=$my_record'

Thanks a lot for your help.

--
José María (Chema) Mateos || https://rinzewind.org


Re: Macro variable with current folder name?

2023-03-11 Thread José María Mateos

On Sat, Mar 11, 2023 at 06:15:14PM +0100, Dennis Preiser wrote:


folder-hook . 'set my_record=$record; \
  set record=^; \
  macro index,pager G "echo $record"; \
  set record=$my_record'


Thanks for your suggestion. I tried this:

folder-hook . 'set my_record=$record; \
   set record=^; \
   macro index,pager G "!offlineimap -o -l /tmp/offlineimap.log -f 
$record\n" \
"Retrieve new IMAP messages for current folder"; \
   set record=$my_record'

However, I got an error that leads me to think that the parameter 
$record is not being received on the other side. Perhaps I should 
surround the variable name with something so that the shell recognizes 
it?


Thanks again!

--
José María (Chema) Mateos || https://rinzewind.org


Macro variable with current folder name?

2023-03-11 Thread José María Mateos

Hi everybody,

I have this macro:

macro index,pager G "!offlineimap -o -l /tmp/offlineimap.log\n" "Retrieve new IMAP 
messages"

It works well, but I typically use only for =INBOX, so checking all the 
folders (the default behaviour) is a waste. I've been trying to find if 
there's any way to pass only the current folder name in the macro. 
Something like


macro index,pager G "!offlineimap -o -l /tmp/offlineimap.log -f $FOLDER_NAME\n"

I haven't been able to find anything like that. I've found some old 
solutions online[1] but they look slightly cumbersome; I'd like to set 
up just one macro, not several (I could have one for the INBOX and 
another one for all folders, though, but still, it's two macros). Also, 
they're old responses, and mutt has changed since then.


Cheers!

[1] 
https://stackoverflow.com/questions/36238630/mutt-download-only-current-folder-using-offlineimap


--
José María (Chema) Mateos || https://rinzewind.org


Re: How do I see the text/html version of an email?

2023-04-23 Thread José María Mateos

On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
Some considerate organisation has been sending me MIME mails with 
content in a text/html section and a wholly blank text/plain version.  
What I see in mutt is the blank text/plain.  Who on Earth thought a 
blank text/plain section was somehow a good idea?


I've seen a worse version of this: the text version and the html version 
are completely different.


On my side, I have this:

auto_view text/html
folder-hook . 'unalternative_order *; alternative_order text/plain text/html'
folder-hook boletines 'unalternative_order *; alternative_order text/html 
text/plain'

So normally I look at the plain-text version, except in my folder 
"boletines" (Spanish for "newsletters"), where I default to HTML.


In those cases where I'm in another folder and I need to look at the 
HTML content, I use this macro:


macro index,pager ,b "/html" "View 
first HTML attachment in browser"

This opens the first available HTML attachmend (typically the message 
body) in my browser of choice (set up via ~/.mailcap).


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Is there any way to view text/html inline *only if* we think text/plain is not right?

2023-05-18 Thread José María Mateos

Hi everybody,

Lately I've been receiving mail in which the text/plain part and the 
text/html part are at odds. This is typically caused by generator 
software that ignores text/plain, or uses some old version, etc.


Today I changed my settings to view text/html first via w3m, but I'm not 
entirely comfortable with this.


What I'd really like to do is:

1. Display text/plain by default.
2. If I'm not convinced by that version, press some key and then 
text/html is displayed inline (using w3m, lynx, links, or whatever in 
the ~/.mailcap file).
3. If that's still not good enough, use a macro I already have to run 
mutt_bgrun and display that mail using Firefox directly.


I don't know if point 2 is a possibility, to be honest. Does anyone know 
if this can be done?


Thanks a lot,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Is there any way to view text/html inline *only if* we think text/plain is not right?

2023-05-18 Thread José María Mateos

On Thu, May 18, 2023 at 08:03:26PM -0400, John Hawkinson wrote:

José María Mateos  wrote on Thu, 18 May 2023
at 19:53:50 EDT in :


2. If I'm not convinced by that version, press some key and then text/html is 
displayed inline (using
w3m, lynx, links, or whatever in the ~/.mailcap file).


Well, some key *sequence* is: 'v', 'j', 'j', RET
assuming that it's a normal multipart/alternative with two parts so two 
down-arrows ('j') get you to the 2nd part.


That works (I have to remove a "bind attach  view-mailcap" I 
have in my .muttrc), but opens the view outside of the pager. Would 
there be a way to have that inside the pager, as one would normally get 
when prioritizing text/html in alternative_order?


Or alternatively, you could create a macro to do the same, although I'm not 
sure it's worth the bother?


A member of the list provided a macro to open the first HTML attachment 
on Firefox and I've been using it for a while.


macro index,pager ,b "/html" "View 
first HTML attachment in browser"

I guess something similar could be done here.

Cheers!

--
José María (Chema) Mateos || https://rinzewind.org


Re: [Mutt] Is there any way to view text/html inline *only if* we think text/plain is not right?

2023-05-19 Thread José María Mateos

On Fri, May 19, 2023 at 08:07:00AM -0400, José María Mateos wrote:
I think this is very close to what I'd like to do, but going to 
text/html, displaying the message, then switch back to text/plain 
again. I'm going to play around with this to see if I can manage to get 
the desired effect, thanks!


This did the trick, thanks a lot for the tip:

# Use this macro to view HTML messages inline
macro pager ,a "unalternative_order *alternative_order text/html 
text/plainunalternative_order *alternative_order text/plain 
text/html" "View HTML content inline"

Cheers!

--
José María (Chema) Mateos || https://rinzewind.org


Re: [Mutt] Is there any way to view text/html inline *only if* we think text/plain is not right?

2023-05-19 Thread José María Mateos

On Fri, May 19, 2023 at 02:54:46AM +0200, Mihai Lazarescu wrote:

I use this macro:

macro pager ~ 'unalternative_order *alternative_order 
text/html text/enriched text/plain'

to switch to HTML and this:

macro pager '`' 'unalternative_order *alternative_order 
text/plain text/enriched text/html'

to switch to text.


I think this is very close to what I'd like to do, but going to 
text/html, displaying the message, then switch back to text/plain again. 
I'm going to play around with this to see if I can manage to get the 
desired effect, thanks!


--
José María (Chema) Mateos || https://rinzewind.org