allow_ansi set, but I only get the first character highlighted

2012-04-11 Thread lilydjwg
I'm using elinks to view those HTML emails. ~/.mailcap contains:

  text/html; muttHtml; copiousoutput

And here's the actual command:

  enconv|elinks -force-html -dump -dump-color-mode 1 -eval "set 
document.css.stylesheet='$HOME/etc/mail.css'" /dev/stdin

The `muttHTML` command highlights correctly in the shell, but in mutt,
only the starting character on each colored area is actually colored.
Here's a screenshot:
http://elimage.edisonnotes.com/76/f2af1e35f5092c87c586333bf73f08c61b4c74

The links should be blue and the quoted part (indented) should be green.

-- 
Best regards,
lilydjwg

Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
-- 
A: Because it obfuscates the reading.
Q: Why is top posting so bad?


Re: allow_ansi set, but I only get the first character highlighted

2012-04-13 Thread lilydjwg
On Thu, Apr 12, 2012 at 09:58:40PM +0200, Michael Ludwig wrote:
> lilydjwg schrieb am 11.04.2012 um 19:40 (+0800):
> > I'm using elinks to view those HTML emails. ~/.mailcap contains:
> > 
> >   text/html; muttHtml; copiousoutput
> 
> Not answering your questions, but as you appear to like Python:
> 
> https://bitbucket.org/blacktrash/muttils
> 
> This allows you to have FF or IE or display your mail.

Thanks, these tools are useful for me.

-- 
Best regards,
lilydjwg

Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
-- 
A: Because it obfuscates the reading.
Q: Why is top posting so bad?


Re: charset in html in external browser

2014-12-20 Thread lilydjwg
On Sat, Dec 20, 2014 at 04:34:34PM +0100, Orm Finnendahl wrote:
> Hi,
> 
>  just found out that there is a "Character encoding" entry in the view
> tab of iceweasel, which probably is easier than going through parsing
> and inserting into html on the fly.
> 
> If someone knows about a "real" solution, I'd still be interested to
> hear about it, though...

Hi, latest version of viewhtmlmsg from
https://bitbucket.org/blacktrash/muttils always works for me :-)

-- 
Best regards,
lilydjwg


IMAP list-wildcard % not supported by server

2015-12-29 Thread lilydjwg
Hi there,

With Tencent's IMAP server, I can't switch to a submailbox in the form
X/Y. In fact I can't even see the Y part. By debugging I find mutt is
listing mailboxes with the pattern "X/Y%", but that server only
responses to patterns like "X/Y*". And replacing that % with * in mutt's
source code works for this server.

So, what's the difference between wildcards % and *? Would mutt add an
option for the user to specify which one to use? Or should I solve this
problem in another way?

-- 
Best regards,
lilydjwg


Re: any conversion worries?

2018-01-16 Thread lilydjwg
On Tue, Jan 16, 2018 at 04:39:37PM -0500, ant wrote:
>   i'm switching to a newer machine (at last) in the
> near future.
> 
>   so going from 32 to 64 bit based system.
> 
>   does mutt do anything different with messages and
> file system layout or encoding?
> 
>   i'm not doing any encryption or anything other than 
> storing files in the Maildir directories/subdirectories.
> 
>   my guess is that all should be ok, but figured i
> could ask the experts.  :)
> 
>   thanks!  :)
>

No, I didn't experience any issue with mutt when switching.
(But I used mbox not Maildir.)

The only issue I met when I switched is vnstat which keeps
its data in a platform-dependent format.

-- 
Best regards,
lilydjwg


Re: HTML email?

2021-04-07 Thread lilydjwg
On Wed, Apr 07, 2021 at 07:22:51AM -0600, John Niendorf wrote:
> Hi Folks,
> 
> How do you all deal with HTML email?
> 
> Thank you,
> 
> John

I view it in mutt with elinks -force-html -dump -dump-color-mode 1. If
that doesn't work well, I open it in my browser with a script
viewhtmlmsg[1] using a custom keybinding:

macro pager \eh "viewhtmlmsg --fork -w 10" "View in 
webbrowser"

I don't write HTML mails.

[1]: https://github.com/lilydjwg/viewhtmlmsg

-- 
Best regards,
lilydjwg


Re: HTML email?

2021-04-08 Thread lilydjwg
On Wed, Apr 07, 2021 at 08:00:38AM -0600, John Niendorf wrote:
> Thank you - where do you put the python3 script and how do you let mutt know 
> it is there?

Put it somewhere in $PATH, or you can use an absolution path.

-- 
Best regards,
lilydjwg


Re: [OT] fetchmail replacement supporting Oauth

2022-05-02 Thread lilydjwg
On Mon, May 02, 2022 at 03:04:11PM -0700, Will Yardley wrote:
> On Tue, May 03, 2022 at 03:18:20AM +0530, Bhaskar Chowdhury wrote:
> > Will Yardley  writes:
> > 
> > > On Sun, May 01, 2022 at 02:17:40PM -0400, Ed Blackman wrote:
> > >> 
> > >> Google seems serious about disabling app passwords for good this time
> > >> in favor of Oauth.
> > >
> > > Any links / docs / background on this?
> > 
> > Probably this : https://getmail6.org  
> 
> Sorry, I meant background on the assertion that Google was planning to
> blanket disable application passwords.
> 
> I know a lot of _organizations_ have started (with both Office365 and
> Gsuite) started disabling "legacy" (read: Internet standard) protocols
> like IMAP, or making it more difficult to use without OAUTH / MFA login
> support.
> 
> But did a quick search and hadn't found references to Google disabling
> app passwords more broadly than that, so was just wondering where the OP
> had read that (as it would likely affect many of us on this list)

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).

PS: Access code from a testing OAuth app will expire in 7 days. It'd be
better to get a non-testing one.

[1]: https://support.google.com/accounts/answer/6010255

-- 
Best regards,
lilydjwg


Re: [OT] fetchmail replacement supporting Oauth

2022-05-04 Thread lilydjwg
On Wed, May 04, 2022 at 08:49:42AM -0600, Akkana Peck wrote:
> lilydjwg writes:
> > 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).
> 
> How did you get your OAuth tokens? I tried following
> https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough
> and
> https://github.com/tenllado/dotfiles/tree/master/config/msmtp
> but when I got to the step of running their oauth2.py python2 script
> with --generate_oauth2_token and clicking through all the "THIS IS
> DANGEROUS, ARE YOU SURE YOU TRUST THIS APP AND DON'T WANT TO
> CANCEL?" screens, I always got a HTTP Error 401: Unauthorized. I
> have my app defined, listed myself as a test user and added the
> https://mail.google.com/ scope.
> 
> Is there another way of getting the tokens besides the python 2
> script that hasn't been updated since 2018?

I'm using the "getmail-gmail-xoauth-tokens" program from getmail6. Usage
is described here:

https://github.com/getmail6/getmail6/blob/master/docs/getmailrc-examples#L291

It works with offlineimap and msmtp too. And it doesn't depend on other
part of getmail6 so you can grab this script without installing the
whole getmail6 if you don't use it.

> I know, not strictly a mutt question, but any mutt user who uses
> gmail will have to deal with this before the end of the month.
> 
> ...Akkana

-- 
Best regards,
lilydjwg


Re: Gmail OAuth/OOB deprecation: how to fix?

2022-05-05 Thread lilydjwg
On Thu, May 05, 2022 at 09:51:32PM +0100, Dave Ewart wrote:
> [...]
>
> They refer to
> https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html
> 
> "What do I need to do?
> 
> "Migrate your app(s) to an appropriate alternative method by
> following these instructions [... as per the instructions in the blog
> post above ...]:"
> 
> Then they list my 'apps', which is something I just called
> 'mutt-gmail-auth' in my GSuite account.
> 
> Being quite honest, I don't really understand what it's describing here
> as I don't understand OAuth - I just followed a HOWTO! Nor can I see
> what to do to fix it. I don't understand what OOB means in this context.
> Does the config just need a minor tweak, or is this whole approach a
> complete non-starter now that Google has changed stuff?

If you are using it in testing mode, you don't need to do anything as
they say:

> No action is required on your part as apps using OOB in testing mode
> will not be affected by this change.

The OOB refers to you manually copy the access code from your browser to
your application.

Without OOB, you can run a local web server or register your own
protocol to receive the code.

-- 
Best regards,
lilydjwg


Re: Gmail OAuth/OOB deprecation: how to fix?

2022-05-06 Thread lilydjwg
On Fri, May 06, 2022 at 03:11:54PM +0100, Dave Ewart wrote:
> On Thursday, 05.05.2022 at 20:27 -0700, Robin Lee Powell wrote:
> 
> > Try this:
> > https://nidkil.me/2018/01/18/setting-up-mutt-to-send-mail-using-gmail-with-2fa-set/
> 
> Is this something you are using or recommend? I note that the post is
> more than four years old and my query relates to a very recent change in
> the Google setup.

I'm using the script and method from getmail6 [1] but have adapted it to
msmtp and offlineimap.

> I thought 'app passwords' were considered somewhat deprecated by GMail,
> to be honest... ?

No. GMail is deprecating login via account passwords, not app passwords.

[1] https://github.com/getmail6/getmail6/blob/master/docs/getmailrc-examples

-- 
Best regards,
lilydjwg


Re: Gmail OAuth/OOB deprecation: how to fix?

2022-05-06 Thread lilydjwg
On Fri, May 06, 2022 at 03:10:37PM +0100, Dave Ewart wrote:
> [...]
> 
> Hmm, so "testing mode" is where I did the initial setup to hardcode the
> tokens into my (encrypted) config?
> 
> So it sounds like maybe I don't need to do anything, but is there a
> better way that doesn't use 'testing'? [Maybe it's not needed, I've been
> using the single 'testing' setup unmodified since late 2020!]

AFAICT testing mode isn't affected and can continue to work as before.
That 'testing' means that you can only add limited testers to use your
app (the thing that has a client_id etc). For personal use the only
annoying part I find is that the access code expires every 7 days.

-- 
Best regards,
lilydjwg


Re: Gmail OAuth/OOB deprecation: how to fix?

2022-05-06 Thread lilydjwg
On Fri, May 06, 2022 at 03:32:38PM +0100, Dave Ewart wrote:
> [...]
> 
> What are the implications of the access code expiring? I don't see any
> symptoms which might be associated with that and the Mutt client is
> running in 'screen' 24/7/365.

When it expires you need to login via web and copy the code again. You
mean your access code doesn't expire? That's a good thing. Maybe it only
applies to recently created apps (e.g. mine).

> Testing with a single 'user' of my 'app' is fine: it's just me talking
> to my Gmail :-)

-- 
Best regards,
lilydjwg


illegal characters replaced in attachments when saved?

2010-08-31 Thread lilydjwg
Hi, there. I sent a C program as an attachment in GBK encoding, but
mutt took it as UTF-8. But there was nothing seems wrong until some
time later when I need the C program file. I opened the mail in mutt,
and the file is displayed with illegal characters replaced by `?'.
And, what surprises me is that, when I press `a' to save the file,
I've got what was displayed --- not the orignal file! But I think the
orignal file should be saved.

Is this a bug? Can I make mutt do what I want? Thank you.



Re: do not allow mutt to send email without attchement

2011-01-15 Thread lilydjwg
2011/1/15 Alexander V Vershilov :
> Hello.
>
> I have got a problem that sometimes I forgot add attachements
> to my email, or misspress 'y' key instead of 'a'.
> Idea of workaround is to add some markup in test (for example
> '{{file}}') and if there is such a markup doesn't allow to send
> email in send-hook, otherwise delete this markup and send email.
>
> Maybe somebody have workaround for this? Or any other ideas.
>

If you use Vim, you can try this ftplugin:
 http://www.vim.org/scripts/script.php?script_id=2796

(Resending because the previous one went directly to the sender. I'm
used to press `r' instead of 'L', sorry.)