is it possible to auto-detect mailing list?

2018-04-20 Thread Yubin Ruan
Most mailing lists emails have several sepecial headers, for example,
"Mailing-List" and "X-Mailing-List". Is it possible to mark those emails as
subscribed (as if we have used `subscribe l...@address.org' in .muttrc), such
that there is a 'L' flag showing up in the index?

Yubin


choices on reading HTML emails

2018-04-10 Thread Yubin Ruan
Hi,

Can anyone share some approaches for reading HTML emails.
Currenlty I use w3m:

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

But sometimes I receive some HTML mails which can not be handled that well by
w3m, so I want to open that html attachment in a browser. How can I switch
between?

Yubin


sidebar not indenting

2018-03-24 Thread Yubin Ruan
Hi,

I have these three options set in the configuration files but the mailbox is
not indenting properly:

set sidebar_folder_indent=yes
set sidebar_indent_string=" "
set sidebar_short_path=yes

I am using mutt 1.9.4. What could be the problem?

Yubin


Re: Reply with another email as attachment?

2018-03-14 Thread Yubin Ruan
On Wed, Mar 14, 2018 at 02:22:26PM +0100, Bastian wrote:
> On 14Mar18 12:48 +, David Woodfall wrote:
> > I couldn't find how to do that, apart from actually finding the file
> > and attaching it that way. When I pressed 'a' to attach and then '?'
> > for a list I had a list of my folders up, but mutt wouldn't let me enter
> > them and gave a 'couldn't attach ' error.
> > 
> > Is there a way of doing this?
> 
> a - attach-file- attach file(s) to this message
> A - attach-message - attach message(s) to this message
> 
> I don't remember all the keybindings. I have to look up especially those 
> which are rarely used. I find it really helpful to hit '?' on the 
> current view to get the list of keybindings along with their 
> description. You can search within that list with '/'. In your case, 
> searching for 'attach' you'll find the command 'attach-message'. Maybe 
> this helps a bit.

Whoop! This is much cleaner!

Yubin


what does the leading - mean in the attachment view?

2018-03-13 Thread Yubin Ruan
Hi,

Just out of curious: in the attachment view (of the compose view), there are
some attachments with a - before them:

---
- I1 /path/to/file1   [text/plain, 7 bit, us-ascii, 13]
- A1 /path/to/file2   [text/plain, 7 bit, us-ascii, 13]

what does that - mean?

Yubin


Re: html signature?

2018-03-07 Thread Yubin Ruan
On Thu, Mar 08, 2018 at 12:40:26AM -0500, Scott Kostyshak wrote:
> On Wed, Mar 07, 2018 at 10:21:24PM +, Matthias Apitz wrote:
> 
> > Sorry, I meant:
> > 
> > In case of real text/plain part (and not only 'click here to read this 
> > mail' or other suggestions the like) I do READ them.
> 
> Many of the HTML-only emails come from automated email systems. I
> usually respond and explain to them why I would appreciate a plain-text
> email. I list a few reasons. I find that one reason that they seem
> particularly responsive to is to point out that people with disabilities
> may have trouble with HTML-only emails.

Why?

--
Yubin


Re: weird appearance of Chinese email in pager

2018-03-07 Thread Yubin Ruan
On Wed, Mar 07, 2018 at 09:20:37PM -0500, Patrick Shanahan wrote:
> * Yubin Ruan <ablacktsh...@gmail.com> [03-07-18 21:09]:
> > On Wed, Mar 07, 2018 at 05:34:13PM -0800, Will Yardley wrote:
> > > On Fri, Mar 09, 2018 at 09:31:21AM +0800, Yubin Ruan wrote:
> > > > On Wed, Mar 07, 2018 at 05:15:23PM -0800, Will Yardley wrote:
> > > > > Oh - I think I see what you're saying; if it's a single long string,
> > > > > like:
> > > > > 
> > > > > 这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子
> > > > > 
> > > > > Mutt can't infer any boundaries, and so doesn't wrap it?
> > > > 
> > > > Exactly.
> > > 
> > > Do you have $wrap set to a value, or to 0?
> > > 
> > > set wrap=72
> > > works for me, however, you might then have problems with other things
> > > breaking (long links, and such)
> > 
> > set wrap=72 will only force wrapping long line, but it does not solve the
> > continuation problem. For example, check this very long line:
> > 
> > 长长。这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子..这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子(shit
> >  ! very long 
> > line),这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子
> > 
> > note there is only one line above, and I want the line to show as it is.
> 
> you realize you can set the pager to something outside mutt such as "less"
> in a terminal
> 
> see man muttrc

Yes, I can even use vim as the pager. But that is not clean...

Yubin


Re: weird appearance of Chinese email in pager

2018-03-07 Thread Yubin Ruan
On Wed, Mar 07, 2018 at 05:34:13PM -0800, Will Yardley wrote:
> On Fri, Mar 09, 2018 at 09:31:21AM +0800, Yubin Ruan wrote:
> > On Wed, Mar 07, 2018 at 05:15:23PM -0800, Will Yardley wrote:
> > > Oh - I think I see what you're saying; if it's a single long string,
> > > like:
> > > 
> > > 这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子
> > > 
> > > Mutt can't infer any boundaries, and so doesn't wrap it?
> > 
> > Exactly.
> 
> Do you have $wrap set to a value, or to 0?
> 
> set wrap=72
> works for me, however, you might then have problems with other things
> breaking (long links, and such)

set wrap=72 will only force wrapping long line, but it does not solve the
continuation problem. For example, check this very long line:

长长。这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子..这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子(shit
 ! very long 
line),这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子,这是一个很长的句子

note there is only one line above, and I want the line to show as it is.

Yubin


Re: weird appearance of Chinese email in pager

2018-03-07 Thread Yubin Ruan
On Wed, Mar 07, 2018 at 05:15:23PM -0800, Will Yardley wrote:
> On Wed, Mar 07, 2018 at 05:07:54PM -0800, Will Yardley wrote:
> > On Fri, Mar 09, 2018 at 08:34:28AM +0800, Yubin Ruan wrote:
> > > Hi, I am writing to ask if anyone have any solution for properly formating
> > > mails in Chinese in the pager. I am using the builtin pager but it seems 
> > > to
> > > not be able to calculate the width of Chinese characters. It tend to take 
> > > a
> > > whole line of Chinese characters as just one unit, and when it is too 
> > > long,
> > > this whole line is shown in a second line, which make the appearance ugly:
> 
> > > 
> > > ++
> > > |这是一个例子,   |
> > > |这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
> > > |这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
> > > |这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
> > 
> > It renders Ok for me; I see 
> > 这是一个
> > at the beginning of each line.
> 
> Oh - I think I see what you're saying; if it's a single long string,
> like:
> 
> 这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子
> 
> Mutt can't infer any boundaries, and so doesn't wrap it?

Exactly.

Yubin


weird appearance of Chinese email in pager

2018-03-07 Thread Yubin Ruan
Hi, I am writing to ask if anyone have any solution for properly formating
mails in Chinese in the pager. I am using the builtin pager but it seems to
not be able to calculate the width of Chinese characters. It tend to take a
whole line of Chinese characters as just one unit, and when it is too long,
this whole line is shown in a second line, which make the appearance ugly:

++
|这是一个例子,   |
|这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
|这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
|这是一个很长的句子这是一个很长的句子这是一个很长的句子这是一个很长的句子|
||
| ...|
||
++

You see, the second line should begin from where the first line ends, but now
it is just chopped as a whole...

VIM used to have this problem, but it can be solved by "set ambiwidth=double".
Does mutt has similar option?

I guess this is due to my local configuration, as my local is entirely in
English. But I don't know the local things that much, so I don't know how to
configure it properly.

Thanks,
Yubin


Ways to copy long URL conveniently

2018-02-28 Thread Yubin Ruan
Hi, do you guys have any ways to conveniently copy a long URL which spans
across several lines and have + prefixes before it. Currently in the pager I
have to copy each part separatly in order to advoid copying the + prefix.

Hmm...is this question sound too trivial...?

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


Re: Is collapse subthread possible?

2018-02-26 Thread Yubin Ruan
On Mon, Feb 26, 2018 at 08:42:50PM -0800, Ian Zimmerman wrote:
> On 2018-02-26 20:43, Tim Chase wrote:
> 
> > > > You can use Alt-v to collapse and open a sub-thread and Alt-V to
> > > > collapse and open all sub-threads.
> > > 
> > > what is the command for that? My key configuration of Alt-v binds to
> > > toggling the entire thread instead of a subthread.
> > 
> >  V: collapse-all
> >  v: collapse-thread
> 
> I think this is a misunderstanding.  Yubin is asking for a command to
> collapse one _sub_thread, _not_ an entire thread.  For example, this
> thread now has 5 messages; the question is about a feature to collapse
> just the part from the 3rd message (for example).

Yes.
 
> To my knowledge, this command doesn't exist.  However, with a clever
> macro using a message-id pattern, it is possible to _hide_ all messages
> with the current message in the reference chain.  I think this was
> dicussed here within the last year or so, with Francesco Ariis one of
> the participants.

Can you provide any links to that discussion? I can find no record of that
when searching for "Francesco Ariis" in mutt-user@ archive: 
https://www.mail-archive.com/search?q=Francesco+Ariis=mutt-users%40mutt.org

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


Re: Is collapse subthread possible?

2018-02-26 Thread Yubin Ruan
On Tue, Feb 27, 2018 at 03:17:30AM +0100, Jostein Berntsen wrote:
> On 27.02.18,08:08, Yubin Ruan wrote:
> > Such a feature would be nice for reading threads which contains lots of
> > messages. 
> > 
> > Yubin
> > 
> 
> You can use Alt-v to collapse and open a sub-thread and Alt-V to 
> collapse and open all sub-threads.

what is the command for that? My key configuration of Alt-v binds to toggling
the entire thread instead of a subthread.

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


Is collapse subthread possible?

2018-02-26 Thread Yubin Ruan
Such a feature would be nice for reading threads which contains lots of
messages. 

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


cannot send large email (with large attachment) using SMTP directly

2018-02-23 Thread Yubin Ruan
I find that sending a empty email with a ~12M attachment using SMTP directly
will cause a SMTP session error at the end. Is that a mutt problem or the SMTP
server (which is Gmail) problem?

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


Re: Gmail undelete configuration

2018-02-20 Thread Yubin Ruan
On Tue, Feb 20, 2018 at 03:58:28PM -0800, Keith Smiley wrote:
> I realized this might actually be a side-effect of my nametrans settings
> which at some point were required in my configuration, but I'm not sure if
> they still are:
> 
> https://github.com/keith/dotfiles/blob/95ba28fb8e7be24ed3bbcfebcfd8aafc2b146b3f/mutt/offlineimaphelpers.py#L37-L53
> https://github.com/keith/dotfiles/blob/95ba28fb8e7be24ed3bbcfebcfd8aafc2b146b3f/offlineimaprc#L23
> 
> --
> Keith Smiley
> 
> On 02/20, Keith Smiley wrote:
> > It looks like that does fix undelete, but offlineimap doesn't move the
> > message to the trash, only the archive, when I use the default d
> > command. Do I need some other configuration to make that part work as
> > expected?

Deleted messages are not moved by offlineimap, but instead by the Gmail imap
server, that said, when you mark a message as deleted (using MUA such as
mutt), offlineimap will see what happen and send a "DELETE 30403" command to
the Gmail imap server, in which 30403 is the message id. After receiving that
command, the Gmail imap server will move that message to [Gmail]/Trash. That
is the same for archiving.

So, you can look into those folders in the Gmail web interface. If those
messages exist, then there might be some problem in your local mailbox
configuration. It could be that offlineimap doesn't/haven't pulled those
messages. I would suggest using "offlineimap -f $foldername" to pull that
particular folder and see what happen.

Yubin

-- 
Yubin Ruan <http://fastdrivers.org>


Re: Gmail undelete configuration

2018-02-19 Thread Yubin Ruan
On Mon, Feb 19, 2018 at 12:54:19PM -0800, Keith Smiley wrote:
> Hey everyone,
> 
> I was wondering if anyone had a working gmail configuration with offlineimap
> that correctly supports undeleting messages. In my configuration[0] I
> delete/archive by moving messages to the appropriate mailboxes.

You don't have to move messages to another mailboxes when deleting message.
Just mark then as deleted (by pressing 'd') will be fine. If that 'delete'
gets populated to the center Gmail server by offlineimap, the deleted message
will be moved to /Trash automatically. That said, you don't have to do this
binding

macro index,pager d "+keithbsmiley-gmail.com/trash" 
"Delete message"

Using the default delete operation will allow you to undelete messages
normally.

> Just using
> standard `u` command with these results in the message being marked
> correctly in the index, but then on the next offlineimap refresh, it's
> removed since it still exists in the trash.
> 
> I expected to be able to solve this with something like this:
> 
> ```
> macro index u "+.../INBOX"
> ```
> 
> But this results in duplicates of the message in the index, and the message
> still gets wiped on the next sync.
> 
> Any advice / examples would be appreciated!
> 
> 
> 0: 
> https://github.com/keith/dotfiles/blob/master/mutt/accounts/gmail.account#L9-L11
> 
> --
> Keith Smiley
> 

-- 
Yubin Ruan <http://fastdrivers.org>


Re: mutt manual: i have bad startings into learning mutt

2018-02-07 Thread Yubin Ruan
On Wed, Feb 07, 2018 at 10:37:14PM +0100, kalle wrote:
> hello,
> 
> In the manual v.1.9.2, chapter "2.1 Index" it says
> 
> "The index is the screen that you usually see first when you start Mutt. It
> gives an overview over your emails in the currently opened mailbox."
> 
> The problem is: there are no mails to see, because there is no mailbox of
> mine open and I don't know how to do this.
 
Have you set up the default mailbox, like this:

set mbox=+INBOX

It would be better to attach your .muttrc so that others can see what is going
wrong with your mutt configuration.
 
> It is the third time already that I try to learn mutt but having no mails to
> start with, not knowing what is meant by a 'mailbox' and how to administrate
> it, even when reading in the newbie manual not getting to a point.
> 
> I usually use thunderbird and thus already have some experience with e-mail,
> but what I got from trying to learn mutt is just depressing for me.

--
Yubin


view complete message (including headers)

2018-02-05 Thread Yubin Ruan
Hi,

In Mutt, how can I view the complete email (including all headers) without
using 'e' to (potentially) modify that email (which cause it to be deleted?)

--
Yubin


Re: save attachment content as if they are in pager

2018-02-02 Thread Yubin Ruan
On Fri, Feb 02, 2018 at 06:15:38PM +1100, Cameron Simpson wrote:
> On 02Feb2018 11:55, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> > On Thu, Feb 01, 2018 at 07:32:29PM -0800, Barton Janes wrote:
> > > The trailing = is usually caused by the text encoding of "quoted 
> > > Printable"
> > > 
> > > https://en.wikipedia.org/wiki/Quoted-printable
> > 
> > Are there any ways to save the decoded message rather than the encoded one?
> > 
> > To make it more general, is it possible to save the content generated by 
> > some
> > auto_view commands, without having to split the email and type those 
> > commands
> > separately in command line?
> 
> Well, you can set pipe_decode=yes and then pipe to a save command:
> 
>  | cat >saved_message.txt
> 
> Pipe_decode is normally "no", so that piping a message goes in the raw form
> to whatever command is receiving it. But setting it to "yes" gets you what
> would show in the pager. I think. Need to experiment.

This work as expected. Thanks.
 
> Personally I'm surprised that the Content-Transfer-Encoding isn't decoded
> for saving things; it is there purely to get the original content through
> the mail system and should be decoded. I need to do some testing.

There is a Content-Transfer-Encoding in the text/plain part, but it does not
seem to work as you described. Probably mutt have skipped that:

--=_Part_3237106_526482122.1517522433475
Content-Type: text/plain;charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: text-body

LinkedIn Highlights

Should I tell coworkers my salary?

264 people are talking about this

https://www.linkedin.com/comm/search/results/content/?keywords=3DShould+I+t=
ell+coworkers+my+salary%3F=3DFED_EMAIL=3D506458=
=3DAQFSR-6AohV2qQ=3Deml-email_feed_ecosystem_digest_01-hero-1-null=
mail=3Deml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9=
d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=3Durn%3Ali%3Apage%3Ae=
mail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D

 =20
---

> Yubin, your sample messages seem to be from linkedin.com; is that the case?
> If so, I've any number of them in my own inbox I can try.

Yes it is from linkedin.com. I have forwarded you a copy.

--
Yubin


Re: save attachment content as if they are in pager

2018-02-01 Thread Yubin Ruan
On Thu, Feb 01, 2018 at 07:32:29PM -0800, Barton Janes wrote:
> The trailing = is usually caused by the text encoding of "quoted Printable"
> 
> https://en.wikipedia.org/wiki/Quoted-printable

Are there any ways to save the decoded message rather than the encoded one?

To make it more general, is it possible to save the content generated by some
auto_view commands, without having to split the email and type those commands
separately in command line?

--
Yubin


Re: attachments not shown

2018-02-01 Thread Yubin Ruan
On Fri, Feb 02, 2018 at 02:30:16PM +1100, Cameron Simpson wrote:
> On 02Feb2018 10:45, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> > Hi,
> > 
> > I got three attachments in a mail, as shown in the attachment view:
> > 
> >[multipart/alternative, 7bit, 97K]
> >[text/plain, quoted, utf-8, 9.2K]
> >[text/html, quoted, utf-8, 87K]
> 
> That's really 2 attachments. The text/plain and text/html parts are
> _enclosed by the multipart/alternative part, which exists to offer two or
> more choices which are meant to be equivalent.
> 
> > After using the editor to view the whole email, it seems to me that the
> > [multipart/alternative] part is an alias for both the [text/plain] and
> > [text/html] part, because from what I have seen, there is no actual content 
> > in
> > the [multipart/alternative] part.
> 
> Yes, it is just an enclosure. In fact it is likely that the message itself
> is the multipart/alternative part, containing a text/plain and a text/html
> within it. But you can nest multipart sections if you need to.
> 
> [...]
> > the problem is, even though there are three attachments, only one is shown. 
> > I
> > already have a
> > 
> >auto_view text/html
> > 
> > set in my .muttrc, yet the [text/html] is not shown (I can view the
> > [text/html] attachment in the attachment view, though ). AFAIK, mutt will 
> > try
> > to display all attachments automatically as long as it can be autoviewed. Is
> > there any configuration options I miss here?
> 
> Ah, no.
> 
> What you've got looks like this, structurally:
> 
>  multipart/alternative
>text/plain
>  some plain text ...
>text/htmnl
>  some HTML text ...
> 
> The main text/ area is the "message" part. When mutt displays a message from
> a multipart/alternative section it chooses _one_ of the alternatives offers,
> and transcribes that to a plain text appearance using the rules from your
> mailcap settings (which may just be the system defaults).
> 
> A message with "attachments" comes with the type "multipart/mixed",
> indicating that it contains a mixture of parts, almost always a "message"
> part with the text and other parts being the zttachments, such as zip files.
> A mail message with attachments usually looks like this, structurally:
> 
>  multipart/mixed
>multipart/alternative
>  text/plain
>some plain text ...
>  text/htmnl
>some HTML text ...
>image/jpeg
>  a JPEG image, suitably encoded
>application/pdf
>  a PDF file
> 
> and so forth.
> 
> So what you have is a plain text message with no "attachments". The mutt
> "attachement" menu shows you all the parts, but more conventional mail
> readers withn't present the text area as an "attachment".
> 
> Regarding your beleif that you're getting the text/plain presented, this may
> well be so. Your setting:
> 
>  auto_view text/html
> 
> is documented here:
> 
>  http://www.mutt.org/doc/manual/#auto-view
> 
> It says that you know how to present text/html as plain text for viewing in
> the "pager" mutt view. It will look up a mailcap entry for "text/plain"
> which has the "copiousoutput" option. If you or your system doesn't have
> such an entry the "auto_view" setting is probably ignored. So mutt may be
> choosing the text/plain alternative because of this.
> 
> There is a system mailcap file and you can also have a personal
> $HOME/.mailcap file. Mine has this:
> 
>  text/html; exec 2>&1 && env DISPLAY= unhtml %s; copiousoutput
> 
> and "unhtml" is a script of mine which currently calls "lynx -stdin -dump",
> and used to run "w3m -dump -T text/html". So you could use:
> 
>  text/html; w3m -dump -T text/html; copiousoutput
> 
> to tell mutt how to present HTML as plain text.
> 
> Mutt needs such things because the pager presents plain text.

Thanks for your explanation about [multipart/alternative] and
[multipart/mixed]. I check several mails and they all seems to work in the way
you described.

--
Yubin


Re: save attachment content as if they are in pager

2018-02-01 Thread Yubin Ruan
On Fri, Feb 02, 2018 at 02:06:35PM +1100, Cameron Simpson wrote:
> On 02Feb2018 10:25, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> > I try to save a multipart/alternative attachment to file but all the content
> > seems to be messed up. When view in a pager, it look good:
> > 
> > 
> > LinkedIn Highlights
> > 
> > Should I tell coworkers my salary?
> > 
> > 264 people are talking about this
> > 
> > https://www.linkedin.com/comm/search/results/content/?keywords=Should+I+tell+coworkers+my+salary%3F=FED_EMAIL=506458=AQFSR-6AohV2qQ=eml-email_feed_ecosystem_digest_01-hero-1-null=eml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=urn%3Ali%3Apage%3Aemail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D
> > -
> > 
> > However, when saved to a file, it become:
> > (which is the same as in editor when you press 'e' to edit the email)
> > 
> > 
> > LinkedIn Highlights
> > 
> > Should I tell coworkers my salary?
> > 
> > 264 people are talking about this
> > 
> > https://www.linkedin.com/comm/search/results/content/?keywords=3DShould+I+t=
> > ell+coworkers+my+salary%3F=3DFED_EMAIL=3D506458=
> > =3DAQFSR-6AohV2qQ=3Deml-email_feed_ecosystem_digest_01-hero-1-null=
> > mail=3Deml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9=
> > d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=3Durn%3Ali%3Apage%3Ae=
> > mail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D
> > 
> > =20
> > ---
> > 
> > I know the tailing = at the end is to enable the pager to prettify thing. 
> > But
> > can we save directly from the pager?
> 
> I don't think this is anything to do with locales.
> 
> I'm presuming you're talking about saving something from the attachment
> menu?  And not about saving a message complete.
> 
> What you show above is interesting.
> 
> It looks to me like the second version, the folded lines ending in "=", is
> quoted-printable, which encoded most ASCII range text as itself, with escape
> sequences for various bytes not in the common lower range and of course for
> the escape character "=" itself. Its purpose it to get text through various
> systems undamaged while keeping it visually fairly readable.
> 
> Normally, that would be the attachment's Content-Transfer-Encoding, which I
> would expect to be decoded on save, because the attachment is no longer
> enclosed in a mail message structure.
> 
> Apparently not the case.
> 
> Can you describe _exactly_ what procedure your went through to save this
> message, from the index view (list of message titels/authors only) through
> to saving the file? So that we can reproduce what you've done and understand
> it?

Procedure:
  1. enter the attachment view using 'v'
  2. go the attachment you want to save, 
  3. press 's', which will prompt you for a file name to save the file with

FYI: those tailing = are not generated by Mutt. I am using Gmail, and through
Gmail's web interface I can confirm that the original mail already have those
tailing = .

--
Yubin


attachments not shown

2018-02-01 Thread Yubin Ruan
Hi,

I got three attachments in a mail, as shown in the attachment view:

[multipart/alternative, 7bit, 97K]
[text/plain, quoted, utf-8, 9.2K]
[text/html, quoted, utf-8, 87K]

After using the editor to view the whole email, it seems to me that the
[multipart/alternative] part is an alias for both the [text/plain] and
[text/html] part, because from what I have seen, there is no actual content in
the [multipart/alternative] part. Instead there are just some pointers:

MIME-Version: 1.0
Content-Type: multipart/alternative; 
boundary="=_Part_3237106_526482122.1517522433475"
To: =?UTF-8?B?6Ziu57695b2s?= 
Date: Thu, 1 Feb 2018 22:00:33 + (UTC)
X-LinkedIn-Class: CED
X-LinkedIn-Template: email_feed_ecosystem_digest_01
X-LinkedIn-fbl: 
m2-aszwv6yn2cyx11t27w2a5c2iw6ykfaqm3z4r4y5utivh7zm3r8pfdnpmndytd6fy0d1g032mbv6i8vhn8tppibujje9ixay0t8s8xc
X-LinkedIn-Id: 6mvow3-jd475j9d-y4
List-Unsubscribe: 

Feedback-ID: email_feed_ecosystem_digest_01:linkedin
Require-Recipient-Valid-Since: ablacktsh...@gmail.com; Sat, 14 Feb 2015 
07:45:15 +

the [text/plain] part looks like:

--=_Part_3237106_526482122.1517522433475
Content-Type: text/plain;charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: text-body

LinkedIn Highlights

Should I tell coworkers my salary?

264 people are talking about this

https://www.linkedin.com/comm/search/results/content/?keywords=3DShould+I+t=
ell+coworkers+my+salary%3F=3DFED_EMAIL=3D506458=
=3DAQFSR-6AohV2qQ=3Deml-email_feed_ecosystem_digest_01-hero-1-null=
mail=3Deml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9=
d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=3Durn%3Ali%3Apage%3Ae=
mail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D

 =20

...more content here...

and the [text/html]:

--=_Part_3237106_526482122.1517522433475
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: html-body

http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3=
.org/1999/xhtml" lang=3D"en" xml:lang=3D"en">

save attachment content as if they are in pager

2018-02-01 Thread Yubin Ruan
Hi,

I try to save a multipart/alternative attachment to file but all the content
seems to be messed up. When view in a pager, it look good:


LinkedIn Highlights
  
Should I tell coworkers my salary?

264 people are talking about this

https://www.linkedin.com/comm/search/results/content/?keywords=Should+I+tell+coworkers+my+salary%3F=FED_EMAIL=506458=AQFSR-6AohV2qQ=eml-email_feed_ecosystem_digest_01-hero-1-null=eml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=urn%3Ali%3Apage%3Aemail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D
-

However, when saved to a file, it become:
(which is the same as in editor when you press 'e' to edit the email)


LinkedIn Highlights

Should I tell coworkers my salary?

264 people are talking about this

https://www.linkedin.com/comm/search/results/content/?keywords=3DShould+I+t=
ell+coworkers+my+salary%3F=3DFED_EMAIL=3D506458=
=3DAQFSR-6AohV2qQ=3Deml-email_feed_ecosystem_digest_01-hero-1-null=
mail=3Deml-email_feed_ecosystem_digest_01-hero-1-null-null-6mvow3%7Ejd475j9=
d%7Ey4-null-neptune%2Fsearch%2Eresults%2Econtent=3Durn%3Ali%3Apage%3Ae=
mail_email_feed_ecosystem_digest_01%3BrxyHuw3NTWi4n8fHNW81ig%3D%3D

 =20
---

I know the tailing = at the end is to enable the pager to prettify thing. But
can we save directly from the pager?

--
Yubin


Re: hide identical mails within the same thread

2018-01-22 Thread Yubin Ruan
On Mon, Jan 22, 2018 at 11:33:16AM -0500, Ben Boeckel wrote:
> On Mon, Jan 22, 2018 at 15:32:50 +, Grant Edwards wrote:
> > Why not just delete the duplicate e-mails?
> > 
> > That would seem to be a more efficient way of "always hiding them".
> 
> The problem arises when using notmuch to find emails across all
> mailboxes and create a new mailbox with the results. This mailbox is
> read-only.

No, the resulting mailbox can be made to be writable: if you use the
mutt-notmuch script, just change the  below to
:

macro index  \
  "unset wait_keymutt-notmuch 
--prompt search~/.cache/mutt_results" \
  "search mail (using notmuch)"
macro index  \
  "unset wait_keymutt-notmuch 
thread~/.cache/mutt_resultsset
 wait_key" \
  "search and reconstruct owning thread (using notmuch)"

--
Yubin


hide identical mails within the same thread

2018-01-20 Thread Yubin Ruan
Is there any configuration for mutt that can hide identical mails within the
same thread? I indexed all the mails and sometime I re-construct the whole
thread from one specific mail. However because some identical mails (with the
same Message-ID, I guess) scatter in several mailbox, within the same thread I
see lots of =>, which indicate identical mails.

Thanks,
Yubin


Re: maildir-utils vs notmuch

2018-01-20 Thread Yubin Ruan
On Fri, Jan 19, 2018 at 11:03:18AM +0100, Till Smejkal wrote:
> Hi,
> 
> I am using notmuch to index my mails for years now and I am very happy with 
> its
> performance and functionality.
> 
> On Fri, 19 Jan 2018, Bastian wrote:
> > I really love and depend on mu's feature to track mail adresses of all 
> > indexed mails. I use 
> > 
> >   set query_command="mu cfind --format mutt-ab %s"
> > 
> > as an address book replacement for mutt.
> 
> Recent versions of notmuch have 'notmuch address'. This can be used to query 
> for
> addresses in all indexed mails. Another possibility is to directly use the 
> notmuch
> library to run queries on the indexed mails and write your own script. That's 
> what I
> do, since I don't really like the output of 'notmuch address'. If you want, I 
> can
> share the code with you.

Can you make your code public? I would love to give it a try.

Yubin


Re: find matched message in all mailboxes and put them into a separate mailbox

2018-01-20 Thread Yubin Ruan
On Thu, Jan 18, 2018 at 09:12:36AM -0500, Ben Boeckel wrote:
> On Thu, Jan 18, 2018 at 17:29:38 +0800, Yubin Ruan wrote:
> > I know one can hit / or l (i.e., limit) and then apply a search pattern to
> > search for messages in the current mailbox. But can we apply this to 
> > multiple
> > mailboxes? I would like to search for matched messages in all mailboxes and
> > then put them into a separate mailbox. For example, I have 10 mailboxes and
> > now I want to search in these 10 mailboxes for messages that have me in the
> > "To: " field and then put them into a separate mailbox.
> 
> I use notmuch for this (using Maildir):
> 
> https://notmuchmail.org/

Thanks Ben and all others in this thread,

I have taken a look at notmuch and it work well. 

> with these bindings:
> 
> macro index \Cn "\
>  set my_wait_key = \$wait_key\
>  unset wait_key\
> notmuch-mutt --prompt search\
> ~/.cache/notmuch/mutt/results\
>  set wait_key = \$my_wait_key\
>  unset my_wait_key\
> " "search mail (using notmuch)"
> macro index  "\
>  set my_wait_key = \$wait_key\
>  unset wait_key\
> notmuch-mutt thread\
> ~/.cache/notmuch/mutt/results\
>  set wait_key = \$my_wait_key\
>  unset my_wait_key\
> " "search and reconstruct owning thread (using notmuch)"
> 
> Notmuch reindexing is triggered by offlineimap, but whatever fetches
> email for you should also be able to trigger a reindex.

Ben, I believe this is from a script from Stefano Zacchiroli at

https://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/

right? That works well, except for the bug below.

[added Stefano Zacchiroli to the Cc: ...]

Hi Stefano,

how about the patch below? I believe it is safer to escape special character
such as whitespace when passing filename through bash pipe (e.g., Gmail has
the "Sent Mail" folder)

--- /tmp/mutt-notmuch-old   2018-01-21 17:52:11.946415454 +0800
+++ /tmp/mutt-notmuch-new   2018-01-21 17:40:12.926430126 +0800
@@ -35,6 +35,7 @@
 
 empty_maildir($maildir);
 system("notmuch search --output=files $query"
+  . " | sed -e \'s/ / /\' "
. " | xargs --no-run-if-empty ln -s -t $maildir/cur/");
 }

Another thing I find sorry is that modifications in the search results listing
do not carry over (i.e., modifications in ~/.cache/mutt_result do not carry
over to the original mail, even though mails in ~/.cache/mutt_results/ are
symlinked to their origins). I can change  to
, but it doesn't work. I don't know what a modification should
be for the Maildir format, so hopefully anyone can help here...

Yubin



Re: find matched message in all mailboxes and put them into a separate mailbox

2018-01-18 Thread Yubin Ruan
On Thu, Jan 18, 2018 at 12:27:35PM +0100, Ulrich Lauther wrote:
> On Thu, Jan 18, 2018 at 05:29:38PM +0800, Yubin Ruan wrote:
> > Hi,
> > 
> > I know one can hit / or l (i.e., limit) and then apply a search pattern to
> > search for messages in the current mailbox. But can we apply this to 
> > multiple
> > mailboxes? I would like to search for matched messages in all mailboxes and
> > then put them into a separate mailbox. For example, I have 10 mailboxes and
> > now I want to search in these 10 mailboxes for messages that have me in the
> > "To: " field and then put them into a separate mailbox.
> > 
> > Yubin
> 
> Take a look at grepm http://www.barsnick.net/sw/grepm.html.
> 
> grepm puts the matching messages into a temporay mailbox under /tmp.

Thanks Ulrich,

but I am using the Maildir format while grepmail can only handle mbox format.

Yubin


Re: find matched message in all mailboxes and put them into a separate mailbox

2018-01-18 Thread Yubin Ruan
On Thu, Jan 18, 2018 at 05:29:38PM +0800, Yubin Ruan wrote:
> Hi,
> 
> I know one can hit / or l (i.e., limit) and then apply a search pattern to
> search for messages in the current mailbox. But can we apply this to multiple
> mailboxes? I would like to search for matched messages in all mailboxes and
> then put them into a separate mailbox. For example, I have 10 mailboxes and
> now I want to search in these 10 mailboxes for messages that have me in the
> "To: " field and then put them into a separate mailbox.

Oh, I am using Maildir. So maybe some standalone script will help?

Yubin


find matched message in all mailboxes and put them into a separate mailbox

2018-01-18 Thread Yubin Ruan
Hi,

I know one can hit / or l (i.e., limit) and then apply a search pattern to
search for messages in the current mailbox. But can we apply this to multiple
mailboxes? I would like to search for matched messages in all mailboxes and
then put them into a separate mailbox. For example, I have 10 mailboxes and
now I want to search in these 10 mailboxes for messages that have me in the
"To: " field and then put them into a separate mailbox.

Yubin


Re: set Bcc when To: is not myself

2017-12-26 Thread Yubin Ruan
On Mon, Dec 18, 2017 at 02:16:22PM +0800, Yubin Ruan wrote:
> How can I set the Bcc: to myself when To: is not myself?
> 
> I try something like this but it does not work:
> send-hook "!~t ablacktsh...@gmail.com" 'my_hdr Bcc: Yubin Ruan 
> <ablacktsh...@gmail.com>'
> 
> Then I try this and it work when I try to send a fresh email:
> 
> send-hook "~t ablacktshirt" 'my_hdr Bcc:'
> send-hook . 'my_hdr Bcc: Yubin Ruan <ablacktsh...@gmail.com>'
> 
> however when I reply to somebody, it does not work. Frustrating! ;-(

Ah I still cannot figure out why these hook only work at sometime. Maybe I
just misunderstand the meaning of each hook.

Anyway, I found a configuration option that can solve my problem neatly:

set metoo=yes

Attribute goes to this SO thread:
https://stackoverflow.com/questions/12924804/mutt-reply-hook-cant-set-cc

Yubin


Re: reference the folder name in a folder-hook push command

2017-12-26 Thread Yubin Ruan
On Tue, Dec 26, 2017 at 04:23:50PM +0100, Arkadiusz Drabczyk wrote:
> On Tue, Dec 26, 2017 at 06:36:20AM +0800, Yubin Ruan wrote:
> > Hi,
> > 
> > I have a folder hook like this:
> > 
> > folder-hook =somembox 'push "!touch /tmp/\1-touched\n"'
> > 
> > where I would like to create a file "/tmp/somebox-touched" when I select and
> > enter a mailbox. As you can see, \1 here should represent the name of the 
> > mbox
> > (as in many Regex). Is there a way to do this so that I do not have to write
> > rules for all the mbox one by one?
> 
> Like that:
> 
> folder-hook . 'set my_oldrecord=$record; set record=^; set my_folder=$record; 
> set record=$my_oldrecord'
> folder-hook . 'push "!touch /tmp/${my_folder}-touched\n"'

Thanks! I didn't know that ^ represent the current folder name. A greate trick
;-)

Yubin


reference the folder name in a folder-hook push command

2017-12-25 Thread Yubin Ruan
Hi,

I have a folder hook like this:

folder-hook =somembox 'push "!touch /tmp/\1-touched\n"'

where I would like to create a file "/tmp/somebox-touched" when I select and
enter a mailbox. As you can see, \1 here should represent the name of the mbox
(as in many Regex). Is there a way to do this so that I do not have to write
rules for all the mbox one by one?

(actually I just want to pass as argument the name of a mbox to some external
shell command)


Regards,
Yubin


Re: set Bcc when To: is not myself

2017-12-18 Thread Yubin Ruan
On Mon, Dec 18, 2017 at 07:34:36AM +, David Woodfall wrote:
> > How can I set the Bcc: to myself when To: is not myself?
> > 
> > I try something like this but it does not work:
> >send-hook "!~t ablacktsh...@gmail.com" 'my_hdr Bcc: Yubin Ruan 
> > <ablacktsh...@gmail.com>'
> > 
> > Then I try this and it work when I try to send a fresh email:
> > 
> >send-hook "~t ablacktshirt" 'my_hdr Bcc:'
> >send-hook . 'my_hdr Bcc: Yubin Ruan <ablacktsh...@gmail.com>'
> > 
> > however when I reply to somebody, it does not work. Frustrating! ;-(
> > 
> >Yubin
> 
> I read in an old post that changing/setting headers doesn't work with
> send-hook.

Is this a bug or something?

Yubin


Re: why :command does not work

2017-12-18 Thread Yubin Ruan
On Mon, Dec 18, 2017 at 12:46:59PM +0100, Jörg Sommer wrote:
> Yubin Ruan hat am Mon 18. Dec, 18:58 (+0800) geschrieben:
> > On Mon, Dec 18, 2017 at 11:29:28AM +0100, Rainer Sokoll wrote:
> > > 
> > > 
> > > > Am 18.12.2017 um 08:09 schrieb Yubin Ruan <ablacktsh...@gmail.com>:
> > > > 
> > > > Why :command fails to execute the `command'. Doesn't mutt work like vim?
> > > 
> > > : lets you invoke muttrc commands. You are looking for !.
> > 
> > I mean, when at index, doing :toggle-new does not work (error unknown
> > command).
> 
> Is ":exec toggle-new" what you are looking for?

Yes. Many thanks! Are there any other options other than :exec? I mean, any
other options after a : , such as :look-for-some-command ...

Yubin


Re: why :command does not work

2017-12-18 Thread Yubin Ruan
On Mon, Dec 18, 2017 at 11:29:28AM +0100, Rainer Sokoll wrote:
> 
> 
> > Am 18.12.2017 um 08:09 schrieb Yubin Ruan <ablacktsh...@gmail.com>:
> > 
> > Why :command fails to execute the `command'. Doesn't mutt work like vim?
> 
> : lets you invoke muttrc commands. You are looking for !.

I mean, when at index, doing :toggle-new does not work (error unknown
command).

Yubin


why :command does not work

2017-12-17 Thread Yubin Ruan
Why :command fails to execute the `command'. Doesn't mutt work like vim?

Yubin


set Bcc when To: is not myself

2017-12-17 Thread Yubin Ruan
How can I set the Bcc: to myself when To: is not myself?

I try something like this but it does not work:
send-hook "!~t ablacktsh...@gmail.com" 'my_hdr Bcc: Yubin Ruan 
<ablacktsh...@gmail.com>'

Then I try this and it work when I try to send a fresh email:

send-hook "~t ablacktshirt" 'my_hdr Bcc:'
    send-hook . 'my_hdr Bcc: Yubin Ruan <ablacktsh...@gmail.com>'

however when I reply to somebody, it does not work. Frustrating! ;-(

Yubin


Re: collapsed threads that have unread/new mails inside

2017-09-17 Thread Yubin Ruan
On Sun, Sep 17, 2017 at 11:29:41PM -0400, Patrick Shanahan wrote:
> * Yubin Ruan <ablacktsh...@gmail.com> [09-17-17 21:53]:
> > On Sun, Sep 17, 2017 at 12:22:20AM +1000, Erik Christiansen wrote:
> > > On 17.09.17 04:19, Yubin Ruan wrote:
> > > > Hi,
> > > > How to identify collapsed threads that have unread/new mails inside?
> > > > I want to assign some color to those that so that it can be 
> > > > distinguished, but
> > > > currently I know no expression to express a "collapsed thread that has
> > > > unread/new mails inside".
> > > 
> > > The 'n' immediately after the message number indicates new mail in a
> > > collapsed thread. If colour is needed too, then a regex detecting that
> > > will probably be required.
> > > 
> > > However, I have for a long time settled for:
> > > 
> > > set collapse_unread=no
> > > 
> > > in .muttrc, keeping such threads uncollapsed. It saves both time and
> > > labour, since it's not necessary to manually uncollapse the thread to
> > > see what is unread in there.
> > 
> > Is is possible to collapse all unread threads by default at the time of
> > starting up?
> 
> did you bother to try?  you have been given the command and you have the
> fine manual.

collapse_unread is not for that purpose and will not collapse all unread
threads by default at the time of starting up.

But now I know I can use a folder-hook.

Yubin


Re: sidebar_sort unknow variable

2017-09-17 Thread Yubin Ruan
On Mon, Sep 18, 2017 at 04:50:02PM +0800, Yubin Ruan wrote:
> Hi,
> why do I get a "sidebar_sort: xxx unknow variable" in a most recent
> self-compiled version? I want to list mailboxes in my own self-defined order
> so I set sidebar_sort=no.

I think I must have mixed the old/new version. Now that I remove some
/etc/Muttxxx of the old mutt(1.5.x) the error is gone.

But I noticed another error when I tried to set:

bind pager,index - collapse-thread
bind pager,index _ collapse-all

At starting up it reports:
"collapse-thread: no such function in the mapxxx"
"collapse-all: no such function in the mapxxx"

But I can still use V ...

Below is how I compile mutt:

./configure --prefix=/usr/local \
--sysconfdir=/etc   \
--with-docdir=/usr/share/doc/mutt-1.9.0 \
--enable-external-dotlock   \
--enable-pop\
--enable-imap   \
--enable-hcache \
--enable-sidebar\
--with-ssl --enable-smtp
make
test -s doc/manual.txt || mv -v doc/manual.txt{.shipped,}
make -C doc manual.pdf
sudo make install
sudo install -v -m644 doc/manual.pdf /usr/share/doc/mutt-1.9.0

Yubin


sidebar_sort unknow variable

2017-09-17 Thread Yubin Ruan
Hi,
why do I get a "sidebar_sort: xxx unknow variable" in a most recent
self-compiled version? I want to list mailboxes in my own self-defined order
so I set sidebar_sort=no.

Yubin


Re: collapsed threads that have unread/new mails inside

2017-09-17 Thread Yubin Ruan
On Sun, Sep 17, 2017 at 12:22:20AM +1000, Erik Christiansen wrote:
> On 17.09.17 04:19, Yubin Ruan wrote:
> > Hi,
> > How to identify collapsed threads that have unread/new mails inside?
> > I want to assign some color to those that so that it can be distinguished, 
> > but
> > currently I know no expression to express a "collapsed thread that has
> > unread/new mails inside".
> 
> The 'n' immediately after the message number indicates new mail in a
> collapsed thread. If colour is needed too, then a regex detecting that
> will probably be required.
> 
> However, I have for a long time settled for:
> 
> set collapse_unread=no
> 
> in .muttrc, keeping such threads uncollapsed. It saves both time and
> labour, since it's not necessary to manually uncollapse the thread to
> see what is unread in there.

Is is possible to collapse all unread threads by default at the time of
starting up?

Yubin


collapsed threads that have unread/new mails inside

2017-09-16 Thread Yubin Ruan
Hi,
How to identify collapsed threads that have unread/new mails inside?
I want to assign some color to those that so that it can be distinguished, but
currently I know no expression to express a "collapsed thread that has
unread/new mails inside".

Thanks,
Yubin


Re: tls_socket_read problem

2017-09-15 Thread Yubin Ruan
On Fri, Sep 15, 2017 at 09:30:14AM -0700, Kevin J. McCarthy wrote:
> On Fri, Sep 15, 2017 at 06:12:01PM +0800, Yubin Ruan wrote:
> > I am currently backing mutt with a sock5 proxy (using proxychain). But when 
> > I
> > leave my computer for a while, not touch anything, there would be error:
> > tls_socket_read (The TLS connection was non-properly terminated.)
> > 
> > and I have to pick up the connection again.
> > 
> > So, is there any option for long/permenant connection?
> 
> You could try decreasing $imap_keepalive.
 
That works pretty well. Thanks ;-)
But, still, mutt will hang for a while after some time of non-activity. I
guess that is because it is not multi-threaded and it have to stop the whole
program when checking for doing direct connection to the server? Is there any
way to rescue, perhaps making it multi-threaded?

Thanks,
Yubin


tls_socket_read problem

2017-09-14 Thread Yubin Ruan
Hi,
I have some problem when using mutt with a sock5 proxy.

I am currently backing mutt with a sock5 proxy (using proxychain). But when I
leave my computer for a while, not touch anything, there would be error:
tls_socket_read (The TLS connection was non-properly terminated.)

and I have to pick up the connection again.

So, is there any option for long/permenant connection?

Thanks,
Yubin


Re: Collapsing folders in the side-bar

2017-08-01 Thread Yubin Ruan
2017-07-23 3:41 GMT+08:00 Tim Chase :
> With the sidebar visible, is there a way to expand/collapse folders
> under their common parents?  In most of my other MUAs (Thunderbird,
> Claws, KMail, Evolution, :shudder: Outlook, etc), I have a
> folder-tree much like the sidebar:
>
>   INBOX
>   -Personal
>   |  |
>   |  - Family
>   |  |
>   |  - Friends
>   |
>   - Work
>  |
>  - Customers
>  |  |
>  |  - Dunder Mifflin
>  |  |
>  |  - Stark Industries
>  |
>  - Database
>
> and I have the option to expand/collapse, say, my "Customers" folder
> like so:
>
>   INBOX
>   -Personal
>   |  |
>   |  - Family
>   |  |
>   |  - Friends
>   |
>   - Work
>  |
>  + Customers
>  |
>  - Database
>
> Is this feasible in Mutt+sidebar?

According to my previous email, Kevin seems to be working on a sidebar
feature. Hopefully he might help you and make that a new feature.

Yubin


how to point Mutt to a VPN connection

2017-08-01 Thread Yubin Ruan
Hi,

I am wondering whether it is possible to point Mutt to connect to a
VPN client that is listening at a local port whenever I want to have
direct imap access to my mail server. Currently I configure Mutt to
connect to the Gmail server using gmail directly with imap. But as
gmail is kind of blocked in my company so connection is slow. I have
to use a VPN. I have setup a VPN client locally. What is left to do is
to point Mutt to use that VPN client as a network interface for
connection so that things can speed up.

Any idea?

Yubin


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-12 Thread Yubin Ruan
On Sun, Jun 11, 2017 at 12:23:28PM +0200, Georg Faerber wrote:
> On 17-06-12 02:05:41, Yubin Ruan wrote:
> > There is only problem I found when testing Postfix + mutt: I uses
> > Postfix for smtp and mutt deals with imap for me. But mutt will freeze
> > when the network is off. Therefore, you can not do anything at that
> > time, let alone sending email.
> > 
> > Any solution to that?
> 
> Use offlineimap, as discussed multiple times on this list.

offlineimap is not stable, I would say. It cannot handle non-latin characters
properly. And if your mailboxes are huge, it seems to go into a infinite
loop...

/Yubin


Mutt freezes when network is off [was: sendmail in background?]

2017-06-11 Thread Yubin Ruan
On Sun, Jun 11, 2017 at 08:14:31AM +0100, Chris Green wrote:
> On Sun, Jun 11, 2017 at 07:33:18AM +1000, Ben McGinnes wrote:
> > On Fri, Jun 09, 2017 at 04:43:46PM +0100, Chris Green wrote:
> > > On Fri, Jun 09, 2017 at 11:50:01PM +1000, Ben McGinnes wrote:
> > >> 
> > >> I do the same thing, except the Postfix instance on the laptop is
> > >> configured to relay through the Postfix instance on the MX server.
> > >> Basically because the current connection and IP aren't in my name
> > >> and I can't be certain that all receiving MX servers will accept
> > >> mail from it directly.  Then I just need to make sure that the
> > >> relaying is authenticated appropriately and it's all fine.
> > >> 
> > > Yes, of course, my Postfix sends E-Mail off to my hosting company's
> > > 'smart host' for much the same reason.
> > 
> > I mentioned it probably more because that's a relatively recent change
> > for me.  Up until early last year I was also running my mail server in
> > my house (not the rest of the domain, just the MX).  So even with a
> > second Postfix instance on the laptop it was still configured to
> > connect directly, the SMTP IP was the same.  Even after I moved the MX
> > out of the country, I still got away with the original configuration
> > while the old link was still active, but that changed at the end of
> > last year.
> > 
> > Fortunately configuring Postfix is simple; either as easy or easier
> > than configuring Mutt.
> > 
> Friendly and helpful support from the Postix mailing list too.

Thanks my friend. Postfix works pretty well :-)

There is only problem I found when testing Postfix + mutt: I uses Postfix for
smtp and mutt deals with imap for me. But mutt will freeze when the network
is off. Therefore, you can not do anything at that time, let alone sending
email.

Any solution to that?

/Yubin


Re: sendmail in background?

2017-06-10 Thread Yubin Ruan
> > my .muttrc contains this:
> > 
> > #set sendmail="/usr/sbin/sendmail -oem -ob"
> > set sendmail_wait=-1
> 
> How do you configure your /usr/bin/sendmain? It seems like that without
> `sendmail' that sendmail_wait does not take effect and I still get delays when
> sending mails.

One awkward thing is, with the configuration

set sendmail="/usr/sbin/sendmail -oem -ob"
set sendmail_wait=-1

things work pretty well, but I don't know how this magic happen, because I
never configure my /usr/sbin/sendmail and it know my SMTP address and
password...?

/Yubin


Re: sendmail in background?

2017-06-10 Thread Yubin Ruan
On Fri, Jun 09, 2017 at 09:35:19AM -0400, Fred Smith wrote:
> On Sat, Jun 10, 2017 at 04:42:42AM +0800, Yubin Ruan wrote:
> > Hi mutt users,
> > 
> > Hmm...do any of you have any solution for sending emails in background
> > without hanging up your mutt? I am getting annoyed by the delay coming with
> > mutt's default smtp. I would like to have a sendmail script that would queue
> > up my all my emails from mutt and send it at proper time and if it fails, it
> > will notify me with a failure status or failure messages. 
> > 
> > Currently I have a msmtp set up, with its .msmtprc like this:
> > 
> > account default 
> > host smtp.gmail.com
> > from 
> > auth on
> > port 587
> > user 
> > password 
> > protocol smtp
> > logfile ~/.msmtp.log
> > tls on
> > tls_starttls on
> > tls_nocertcheck
> > 
> > and my .muttrc like this:
> > 
> > set sendmail="/usr/bin/msmtp"
> > # don't wait for msmtp to complete. Let it run at background
> > set sendmail_wait=-1
> > 
> > But there some problems with this solution:
> > 
> > 1. the "sendmail_wait=-1" doesn't seems work?
> > 2. when I cutt off my network connection, mutt cannot sendmail anymore.
> > It just hang up there infinitely and I have to Ctrl-C... 
> > 
> > Any suggestion?
> 
> my .muttrc contains this:
> 
> #set sendmail="/usr/sbin/sendmail -oem -ob"
> set sendmail_wait=-1

How do you configure your /usr/bin/sendmain? It seems like that without
`sendmail' that sendmail_wait does not take effect and I still get delays when
sending mails.

/Yubin
 
> While I am now using a full-time connection (cable modem) years ago
> I was on a dialup system, and I don't think I've changed those settings
> since then, and it all just magically worked.
> 
> I certainly don't get long delays when sending mail from mutt. It
> seems to just queue them up, though sending a mail from mutt also seems
> to trigger sendmail to connect and send, mutt doesn't make me wait
> while it does that.


sendmail in background?

2017-06-09 Thread Yubin Ruan
Hi mutt users,

Hmm...do any of you have any solution for sending emails in background
without hanging up your mutt? I am getting annoyed by the delay coming with
mutt's default smtp. I would like to have a sendmail script that would queue
up my all my emails from mutt and send it at proper time and if it fails, it
will notify me with a failure status or failure messages. 

Currently I have a msmtp set up, with its .msmtprc like this:

account default 
host smtp.gmail.com
from 
auth on
port 587
user 
password 
protocol smtp
logfile ~/.msmtp.log
tls on
tls_starttls on
tls_nocertcheck

and my .muttrc like this:

set sendmail="/usr/bin/msmtp"
# don't wait for msmtp to complete. Let it run at background
set sendmail_wait=-1

But there some problems with this solution:

1. the "sendmail_wait=-1" doesn't seems work?
2. when I cutt off my network connection, mutt cannot sendmail anymore.
It just hang up there infinitely and I have to Ctrl-C... 

Any suggestion?

--
Yubin


View email in external editor

2017-05-21 Thread Yubin Ruan
How to view email in external editor such as VIM?

IIRC, the first time I try mutt, which is about one or two year ago, I can
view emails using external editor(such as vim) rather than mutt's builtin
pager so that I can do some copy-paste easily. However, after switching and
trying other email clients I forget the hotkey/command for that, and my
current configuration clearly overwrite that hotkey. Can anyone give me a
hint?

--
Yubin


Re: Can mutt prefetch mail

2017-05-16 Thread Yubin Ruan
On Tue, May 16, 2017 at 02:51:50PM +0800, Feng Liu wrote:
> This bothers me too. I'd rather use Fastmail instead since I suffered
> from this problem. Or just change the Gmail UI to English. This made me
> feel Gmail is not as good as it suppose to be.
 
If you wish I can share my .offlineimaprc with you:

[general]
accounts = Gmail
# this is used for folder name decode/encode.
pythonfile = ~/.offlineimap.py

[Account Gmail]
localrepository = Gmail-Local
remoterepository = Gmail-Remote

[Repository Gmail-Local]
type = Maildir
localfolders = ~/Mail/Gmail
nametrans = lambda foldername: 
foldername.decode('utf-8').encode('imap4-utf-7')

[Repository Gmail-Remote]
type = Gmail
remoteuser = <youracco...@gmail.com>
remotepass = 
ssl=true
# if you cannot find this file, install `OpenSSL'
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
maxconnections = 5
nametrans = lambda foldername: 
foldername.decode('imap4-utf-7').encode('utf-8')

This works find for Gmail. The .offlineimap.py, which handles the
decoding/encoding stuff, can be found at:
https://gist.github.com/gauteh/5402888

By the way, can Fastmail advoid this problem? Doesn't it use imap?

--
Yubin
 
> 在 2017年05月16日 16:14, Yubin Ruan 写道:
> > On Sun, May 14, 2017 at 09:33:46AM +1000, Cameron Simpson wrote:
> >> On 13May2017 17:32, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> >>> I am wondering whether it is possible to tell mutt to prefetch mails 
> >>> folder by
> >>> folder so that I can read mails more quickly without waiting for the 
> >>> "Fetching
> >>> mails..." every time.
> >>>
> >>> I have set up mutt's cache, so it helps a little, but it is still slow 
> >>> because I
> >>> have to fetch the mails before mutt can cache them.
> >>>
> >>> I know there is something like `fetchmail', but, setting up it is tricky,
> >>> especially with a IMAP server (or, do you have good references?)
> >> The other common solution for IMAP mail accounts is offlineimap, which will
> >> mirror IMAP accounts to local storage.
> >>
> >> Because mutt is single threaded, all "prefetch" arrangements tend to store
> >> the mail locally. This is several advantages:
> >>
> >>  - you don't need to configure mutt to access a remote mailbox
> >>
> >>  - if you're offline all your mail is still there (as of the last update)
> >>
> >>  - access is _very_ fast, because it is local file access
> >>
> >>  - if you run a local mail system, you can reply to email even when 
> >> offline;
> >> it will queue locally on your machine until there is network access.
> >>I find this great for train trips. This also means you don't need mutt 
> >> to
> >> know SMTP settings; just deliver locally via the "sendmail" command.
> >>
> >> The advantage of offlineimap is that (by default) it mirrors your IMAP
> >> account, keeping a local set of mail folders matching upstream. This means:
> >>
> >>  - you can still access you imap account (eg through a phone or other 
> >> device)
> >>
> >>  - changes you make locally via mutt, such as deletions of moving messages
> >> ormarking them read etc, are pushed upstream to your IMAP account for
> >> you
> >>
> >> Offlineimap _is_ a little tricky to set up, but once running you can let it
> >> look after the mirroring in the background.
> > Yes offlineimap _is_ very tricky to setup. It cannot handle non-ascii 
> > characters
> > correctly. I have several folders on the Gamil server whose name is in 
> > Chinese.
> > I setup a `nametrans' in the .offlineimaprc:
> >
> > nametrans = lambda foldername: 
> > foldername.decode('imap4-utf-7').encode('utf-8')
> >
> > it works great in the first download, but will throw some encoding/decoding 
> > errors
> > in the sync afterwards:
> >
> > 'ascii' codec can't decode byte 0xe9 in position 8: ordinal not in 
> > range(128)
> >
> > I don't know why a software would only support ascii in the 21st century...
> >
> > --
> > Yubin
> 
> 




Re: Can mutt prefetch mail

2017-05-15 Thread Yubin Ruan
On Tue, May 16, 2017 at 12:42:32PM +1000, Cameron Simpson wrote:
> On 16May2017 16:14, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> >On Sun, May 14, 2017 at 09:33:46AM +1000, Cameron Simpson wrote:
> >>The other common solution for IMAP mail accounts is offlineimap, which will
> >>mirror IMAP accounts to local storage.
> [...]
> >Yes offlineimap _is_ very tricky to setup. It cannot handle non-ascii
> >characters correctly. I have several folders on the Gamil server whose name 
> >is in Chinese.
> >I setup a `nametrans' in the .offlineimaprc:
> >   nametrans = lambda foldername: 
> > foldername.decode('imap4-utf-7').encode('utf-8')
> 
> You also have a reverse name trans, yes? Both are needed. And one should
> take care that they really are the reverse of each other.

Hmm...turns out that I have too many accounts set up so that I forget one of the
reverse namestrans.

> 
> >it works great in the first download, but will throw some encoding/decoding 
> >errors
> >in the sync afterwards:
> >   'ascii' codec can't decode byte 0xe9 in position 8: ordinal not in 
> > range(128)
> >
> >I don't know why a software would only support ascii in the 21st century...
> 
> The offlineimap authors are definitely not pure Western
> can-get-by-with-ASCII people, so I expect they're aware of this shortcoming.
> 
> Is imap4-utf-7 a known encoding? My local Python 3 says:
> 
>  % python3 -c 'print(repr(b"foo".decode("imap4-utf-7")))'
>  Traceback (most recent call last):
>File "", line 1, in 
>LookupError: unknown encoding: imap4-utf-7
> 
> It is possible that your exception above comes from another part of the
> code; what is the stack trace? It would also be useful to hack things to
> print the repr of the undecodable string: do you know it is a mailbox name?
> 
> IIRC offlineimap uses python 2, which is a bit vague in distinguishing
> strings and bytes.

Here is the encode/decode python script I use currently:
https://gist.github.com/gauteh/5402888

--
Yubin


Re: Can mutt prefetch mail

2017-05-15 Thread Yubin Ruan
On Sun, May 14, 2017 at 09:33:46AM +1000, Cameron Simpson wrote:
> On 13May2017 17:32, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> >I am wondering whether it is possible to tell mutt to prefetch mails folder 
> >by
> >folder so that I can read mails more quickly without waiting for the 
> >"Fetching
> >mails..." every time.
> >
> >I have set up mutt's cache, so it helps a little, but it is still slow 
> >because I
> >have to fetch the mails before mutt can cache them.
> >
> >I know there is something like `fetchmail', but, setting up it is tricky,
> >especially with a IMAP server (or, do you have good references?)
> 
> The other common solution for IMAP mail accounts is offlineimap, which will
> mirror IMAP accounts to local storage.
> 
> Because mutt is single threaded, all "prefetch" arrangements tend to store
> the mail locally. This is several advantages:
> 
>  - you don't need to configure mutt to access a remote mailbox
> 
>  - if you're offline all your mail is still there (as of the last update)
> 
>  - access is _very_ fast, because it is local file access
> 
>  - if you run a local mail system, you can reply to email even when offline;
> it will queue locally on your machine until there is network access.
>I find this great for train trips. This also means you don't need mutt to
> know SMTP settings; just deliver locally via the "sendmail" command.
> 
> The advantage of offlineimap is that (by default) it mirrors your IMAP
> account, keeping a local set of mail folders matching upstream. This means:
> 
>  - you can still access you imap account (eg through a phone or other device)
> 
>  - changes you make locally via mutt, such as deletions of moving messages
> ormarking them read etc, are pushed upstream to your IMAP account for
> you
> 
> Offlineimap _is_ a little tricky to set up, but once running you can let it
> look after the mirroring in the background.

Yes offlineimap _is_ very tricky to setup. It cannot handle non-ascii characters
correctly. I have several folders on the Gamil server whose name is in Chinese.
I setup a `nametrans' in the .offlineimaprc:

nametrans = lambda foldername: 
foldername.decode('imap4-utf-7').encode('utf-8')

it works great in the first download, but will throw some encoding/decoding 
errors
in the sync afterwards:

'ascii' codec can't decode byte 0xe9 in position 8: ordinal not in 
range(128)

I don't know why a software would only support ascii in the 21st century...

--
Yubin


Can mutt prefetch mail

2017-05-12 Thread Yubin Ruan
Hi,

I am wondering whether it is possible to tell mutt to prefetch mails folder by
folder so that I can read mails more quickly without waiting for the "Fetching
mails..." every time.

I have set up mutt's cache, so it helps a little, but it is still slow because I
have to fetch the mails before mutt can cache them.

I know there is something like `fetchmail', but, setting up it is tricky,
especially with a IMAP server (or, do you have good references?)

---
Yubin


Re: customize folder order in sidebar

2017-05-07 Thread Yubin Ruan
On Sun, May 07, 2017 at 09:47:16AM -0700, Kevin J. McCarthy wrote:
> On Mon, May 08, 2017 at 06:17:58AM +0800, Yubin Ruan wrote:
> > I was wondering whether it would be possible to customize the folder order 
> > in
> > mutt's sidebar. I have subscribed to some mailing lists and have mails from
> > each of them automatically put into a seperate folders. But there are some
> > mailing lists that I found more important and will check more frequently. 
> > Therefore, I would like to re-arrange them to the top of the sidebar so that
> > I can see whether there are new mails in those mailing lists.
> 
> If you set $sidebar_sort_method=unsorted (the default), it uses the
> order listed in the 'mailboxes' commands.

Thanks. That is exactly what I want (and mutt is pretty smart in handling
this...)

---
Yubin


Re: Scroll-off option for mutt

2017-05-07 Thread Yubin Ruan
On Sun, May 07, 2017 at 09:40:46AM -0700, Kevin J. McCarthy wrote:
> On Mon, May 08, 2017 at 05:49:40AM +0800, Yubin Ruan wrote:
> > Is it possible to do this for the sidebar in mutt? Are there anything like
> > $sidebar_scroll and $sidebar_context?
> 
> Not currently.  It's a good suggestion though.  I'll look into it.

Please let me know if there are anything new :)

---
Yubin


customize folder order in sidebar

2017-05-07 Thread Yubin Ruan
Hi,
I was wondering whether it would be possible to customize the folder order in
mutt's sidebar. I have subscribed to some mailing lists and have mails from
each of them automatically put into a seperate folders. But there are some
mailing lists that I found more important and will check more frequently. 
Therefore, I would like to re-arrange them to the top of the sidebar so that
I can see whether there are new mails in those mailing lists.

---
Yubin


Re: Scroll-off option for mutt

2017-05-07 Thread Yubin Ruan
On Mon, May 08, 2017 at 05:44:13AM +0800, Yubin Ruan wrote:
> On Sat, May 06, 2017 at 08:12:41PM -0700, Kevin J. McCarthy wrote:
> > On Sun, May 07, 2017 at 05:43:00PM +0800, Yubin Ruan wrote:
> > > On Sat, May 06, 2017 at 09:50:50AM -0700, Kevin J. McCarthy wrote:
> > > > On Sun, May 07, 2017 at 03:36:41AM +0800, Yubin Ruan wrote:
> > > > > Is there a scroll-off option for mutt? In vim, you can use
> > > > > set scrolloff = 7
> > > > > to make the editor scroll rather than changing pages when you get to 
> > > > > the end of
> > > > > the current page, so that you can see things continuously. But for 
> > > > > mutt's pager,
> > > > > it seems not possible to do so. Anyone know any alternative methods?
> > > > 
> > > >  and  can scroll line by line.  $pager_context
> > > > can give you some overlap when scrolling page by page.
> > > 
> > > Hmm...I mean the index (where all the emails are listed), not pager. I 
> > > can make
> > > the pager scroll. But I cannot make the index do so. Sorry for the misuse 
> > > of
> > > terminology.
> > 
> > Sorry about my misunderstanding.  As Erik mentioned, there is
> > $menu_scroll, but may want to also try setting $menu_context=7.  With
> > both of them set, I hope that may be close to what you are looking for.
> 
> Thanks. $menu_scroll and $menu_context is exactly what I want.

Is it possible to do this for the sidebar in mutt? Are there anything like
$sidebar_scroll and $sidebar_context?

---
Yubin


Re: Scroll-off option for mutt

2017-05-07 Thread Yubin Ruan
On Sat, May 06, 2017 at 08:12:41PM -0700, Kevin J. McCarthy wrote:
> On Sun, May 07, 2017 at 05:43:00PM +0800, Yubin Ruan wrote:
> > On Sat, May 06, 2017 at 09:50:50AM -0700, Kevin J. McCarthy wrote:
> > > On Sun, May 07, 2017 at 03:36:41AM +0800, Yubin Ruan wrote:
> > > > Is there a scroll-off option for mutt? In vim, you can use
> > > > set scrolloff = 7
> > > > to make the editor scroll rather than changing pages when you get to 
> > > > the end of
> > > > the current page, so that you can see things continuously. But for 
> > > > mutt's pager,
> > > > it seems not possible to do so. Anyone know any alternative methods?
> > > 
> > >  and  can scroll line by line.  $pager_context
> > > can give you some overlap when scrolling page by page.
> > 
> > Hmm...I mean the index (where all the emails are listed), not pager. I can 
> > make
> > the pager scroll. But I cannot make the index do so. Sorry for the misuse of
> > terminology.
> 
> Sorry about my misunderstanding.  As Erik mentioned, there is
> $menu_scroll, but may want to also try setting $menu_context=7.  With
> both of them set, I hope that may be close to what you are looking for.

Thanks. $menu_scroll and $menu_context is exactly what I want.

---
Yubin


Re: Scroll-off option for mutt

2017-05-06 Thread Yubin Ruan
On Sat, May 06, 2017 at 09:50:50AM -0700, Kevin J. McCarthy wrote:
> On Sun, May 07, 2017 at 03:36:41AM +0800, Yubin Ruan wrote:
> > Is there a scroll-off option for mutt? In vim, you can use
> > set scrolloff = 7
> > to make the editor scroll rather than changing pages when you get to the 
> > end of
> > the current page, so that you can see things continuously. But for mutt's 
> > pager,
> > it seems not possible to do so. Anyone know any alternative methods?
> 
>  and  can scroll line by line.  $pager_context
> can give you some overlap when scrolling page by page.

Hmm...I mean the index (where all the emails are listed), not pager. I can make
the pager scroll. But I cannot make the index do so. Sorry for the misuse of
terminology.

---
Yubin


Scroll-off option for mutt

2017-05-06 Thread Yubin Ruan
Hi,
Is there a scroll-off option for mutt? In vim, you can use
set scrolloff = 7
to make the editor scroll rather than changing pages when you get to the end of
the current page, so that you can see things continuously. But for mutt's pager,
it seems not possible to do so. Anyone know any alternative methods?

Thanks,
Yubin


Re: what is the command of group-reply

2017-05-06 Thread Yubin Ruan
On Fri, May 05, 2017 at 09:13:36PM -0700, Will Yardley wrote:
> On Sat, May 06, 2017 at 07:49:49PM +0800, Yubin Ruan wrote:
> > 
> > Can anyone tell me what is the command of group-reply?
> > Whenever replying a email with multiple `Cc' and recipents, I usually want 
> > to
> > reply to all of them. This can be achieved by "Reply-to-all" in some mail
> > clients. In Mutt, that is a single `g' in the pager.
> > 
> > But as I have binded 'g'  to another command, I have to bind the group-reply
> > command to another key. How can I achieve that?
> 
> You can bind it to whatever key you want if you're not going to use the
> default binding.
> 
> In hindsight, I wish I had rebound less stuff and just learned to use
> Mutt's bindings when I first started. But as someone who had used Pine
> for a while, I bound 'g' to cycle between mailboxes, and I use 'R' for
> group reply. You could use capital G or whatever other binding is
> convenient for you.
> 
> e.g.,
> bind pager R group-reply
> bind index R group-reply

group-reply is exactly what I want. Thanks!

Regards,
Yubin


what is the command of group-reply

2017-05-05 Thread Yubin Ruan
Hi,

Can anyone tell me what is the command of group-reply?
Whenever replying a email with multiple `Cc' and recipents, I usually want to
reply to all of them. This can be achieved by "Reply-to-all" in some mail
clients. In Mutt, that is a single `g' in the pager.

But as I have binded 'g'  to another command, I have to bind the group-reply
command to another key. How can I achieve that?

Thanks,
Yubin


Re: need some help about organize message in mutt

2016-08-03 Thread Yubin Ruan
On Thu, Aug 04, 2016 at 10:38:49AM +1000, c...@zip.com.au wrote:
> On 04Aug2016 07:52, Yubin Ruan <ablacktsh...@gmail.com> wrote:
> >Fortunately, after a few googling and combining all those info I
> >have gathered,
> >I find something like this:
> >
> >push 
> >'~cmutt-us...@mutt.org;simaps://ablacktsh...@imap.gmail.com/mutt-usersy'
>
> I would be inclined to replace the ";" with "" and the
> "s" with "". Just to make it all clear, and to avoid
> damage by any macro definition you might make. I tend to either
> spell it all out with  or (for very short macros) to be
> entirely keystrokes (I have a couple of macros for the "message"
> view that are just bound to "q" and the same thing in the index view
> i.e. "quit the message view and do what would happen in the index
> view".
>
> >I put this in my .muttrc, and every time I open mutt, it would automatically
> >move all the messages which are `To: mutt-users@mutt.org` or `Cc:
> >mutt-users@mutt.org` to the mutt-users folder. Although it does it remotely,
> >which would slow thing down when the network connection is not so good,
>
> You might be surprised. If all the work is being done by the imap
> server and the messages are not being pulled down to mutt and pushed
> back up things should be pretty fast even on a poor connection.

That trick did work, but there still exists some problems when I put more than
one `push` command in my .muttrc:
push 
'~cmutt-us...@mutt.org;simaps://ablacktsh...@imap.gmail.com/mutt-usersy'
push 
'~cmutt-...@mutt.org;simaps://ablacktsh...@imap.gmail.com/mutt-devy'
push '~f'
...
(just as an example)
It seem like that the `push` command would not block when the preceding one is
not finished, which result in that those tagged message would NOT be saved to
the appropriate folder. That means, for example, those mails that
belong to `mutt-users`
folder would now be saved to the `mutt-dev` folder, which is probably because
the second `push` take effect before the first one can finish and the first
 never get a chance to take effect.

any idea?

regards,
Ruan

On Thu, Aug 4, 2016 at 8:38 AM,  <c...@zip.com.au> wrote:
> On 04Aug2016 07:52, Yubin Ruan <ablacktsh...@gmail.com> wrote:
>>
>> Fortunately, after a few googling and combining all those info I have
>> gathered,
>> I find something like this:
>>
>> push
>> '~cmutt-us...@mutt.org;simaps://ablacktsh...@imap.gmail.com/mutt-usersy'
>
>
> I would be inclined to replace the ";" with "" and the "s" with
> "". Just to make it all clear, and to avoid damage by any
> macro definition you might make. I tend to either spell it all out with
>  or (for very short macros) to be entirely keystrokes (I have a couple
> of macros for the "message" view that are just bound to "q" and the same
> thing in the index view i.e. "quit the message view and do what would happen
> in the index view".
>
>> I put this in my .muttrc, and every time I open mutt, it would
>> automatically
>> move all the messages which are `To: mutt-users@mutt.org` or `Cc:
>> mutt-users@mutt.org` to the mutt-users folder. Although it does it
>> remotely,
>> which would slow thing down when the network connection is not so good,
>
>
> You might be surprised. If all the work is being done by the imap server and
> the messages are not being pulled down to mutt and pushed back up things
> should be pretty fast even on a poor connection.
>
>> I pretty
>> satisfied with this. Although something like procmail of offline-mail
>> would make
>> thing faster, that would make it much complicated for now, so I would
>> rather
>> settle down.
>
>
> Indeed. Get comfortable before making your life even more complex.
>
> Cheers,
> Cameron Simpson <c...@zip.com.au>


Re: need some help about organize message in mutt

2016-08-03 Thread Yubin Ruan
On Wed, Aug 03, 2016 at 03:03:17PM +1000, c...@zip.com.au wrote:
> On 02Aug2016 08:05, Yubin Ruan <ablacktsh...@gmail.com> wrote:

> >>If you want to be more precise, you can use a modifier such as:
> >>
> >> ~C mutt-users@mutt.org
> >>
> >>to match messages with that in the To or CC headers.
> >
> >I have tried that, but when I press that ~ key, mutt give me some "key is not
> >bound. Press ? for help" message.(when I say I press the ~ key, I mean I 
> >press
> >~ , which would give you a ~ when you do normal typing, otherwise it's
> >just a ` )
> 
> Ah. The string above is a pattern expression. It is only meaningful
> at the prompt for  or  or searching. So what I
> should have asked you to type was:
> 
>  T~C mutt-users@mutt.org
> 
> so that the "T" () opens the prompt requesting a
> pattern, and only _then_ do you type the pattern "~C
> mutt-users@mutt.org".
> 
> You might also want to experiment with "l" (), which
> restricts your view of the mailbox to just the messages matching a
> pattern. This will give you an easy way to experiment with patterns,
> and is also a handy way to locate particular messages in a large
> mailbox. Use the pattern "." to undo a "limit": that is a regexp for
> "any character", and effectively matches every message.

I have to say that `T~C mutt-users@mutt.org` have make my life a lot easier.
Thanks!

> 
> >That's weird. I have no idea why, but I guess maybe that's because of
> >my configuration setting, part of which I copy directly from other's blog:
> >
> >   set index_format='%-20.20L %4C [%Z] %{%b %d} %-15.15F (%?l?%4l&%4c?) %s'
> >   color index green  default ~N # new
> >   color index red default ~D# deleted
> >   color index brightmagenta default ~T  # tagged
> >   color index brightyellow default ~F   # flagged
> >   set pager_index_lines=10
> >   bind index,pager \Ck  sidebar-prev  #previous folder in sidebar
> >   bind index,pager \Cj  sidebar-next  #next folder in sidebar
> >   bind index,pager \CO  sidebar-open  #open selected folder in sidebar
> >   macro index  b'toggle 
> > sidebar_visible'
> >   macro index  \cb  'toggle 
> > sidebar_visible'
> >   bind index   ddisplay-message
> >   bind index   gg   first-entry
> >   bind index   Glast-entry
> >   bind index   hnoop
> >   bind index   lnoop
> >
> >that's all of my conf that are related to index view. Anything wrong ?
> 
> There's nothing wrong there, but I would feel unhappy about the "d"
> macro above. Normally "d" is bound to , so if you
> every open someone else's mutt, or open your own but bypassing the
> configuration above (which sometimes one wants to do), then "d" can
> easily lead to accidental deletion of messages.
> 
> Normally  will display a message, and i would advocate
> removing your "d" macro and just using . Safer all around.

yes, I think you are right. I'm kind of mixing all those stuff now...
 
> >>>   Can anyone tell me,
> >>>   ** How can I have that Thunderbird message filtering in mutt?(i.e., 
> >>> moving
> >>>   some messages from inbox to other mailbox according to the `To` field 
> >>> or `Cc`
> >>>   field)
> 
> The simplest way to do that would be as you imagined:
> 
>  - tag the messages you want to move, for example by typing:
> 
>  T~C mutt-users@mutt.org
> 
>  - move ("save" in mutt parlance) these messages to another folder.
> 
> The key "s" is bound to . Normally that operates on
> the current message. What you want is to operate on all the tagged
> messages. This is done by prefixing the command with ";" which is
> bound to . You can do this with many operations (copy,
> delete, etc). So type:
> 
>  ;s
> 
> meaning . This will prompt you for a folder name
> for the messages.
> 
> >
> >If there's some common practice I would really appreciate to hear some. 
> >Figuring
> >it out myself is kind of hard.
> 
> The practice varies very widely.
> 
> Many people use mutt to connect directly to IMAP servers such as GMail.
> 
> Alternatively, you arrange to collect your email from such servers
> (or your ISP's POP service, etc) and store it locally. Then use mutt
> to browse the local folders. Note here that mutt tends not to do the
> collecting, though it has pop and imap services and you _can_
> collect with mutt.
> 
> Of course, you can use mutt to connect 

Re: need some help about organize message in mutt

2016-08-01 Thread Yubin Ruan
really appreciate your help.

> If you want to be more precise, you can use a modifier such as:
> 
>  ~C mutt-users@mutt.org
> 
> to match messages with that in the To or CC headers.

I have tried that, but when I press that ~ key, mutt give me some "key is not
bound. Press ? for help" message.(when I say I press the ~ key, I mean I press
~ , which would give you a ~ when you do normal typing, otherwise it's
just a ` ) That's weird. I have no idea why, but I guess maybe that's because of
my configuration setting, part of which I copy directly from other's blog:

set index_format='%-20.20L %4C [%Z] %{%b %d} %-15.15F (%?l?%4l&%4c?) %s'
color index green  default ~N # new
color index red default ~D# deleted
color index brightmagenta default ~T  # tagged
color index brightyellow default ~F   # flagged
set pager_index_lines=10
bind index,pager \Ck  sidebar-prev  #previous folder in sidebar
bind index,pager \Cj  sidebar-next  #next folder in sidebar
bind index,pager \CO  sidebar-open  #open selected folder in sidebar
macro index  b'toggle 
sidebar_visible'
macro index  \cb  'toggle 
sidebar_visible'
bind index   ddisplay-message
bind index   gg   first-entry
bind index   Glast-entry
bind index   hnoop
bind index   lnoop
 
that's all of my conf that are related to index view. Anything wrong ?

> >   Can anyone tell me,
> >   ** How can I have that Thunderbird message filtering in mutt?(i.e., moving
> >   some messages from inbox to other mailbox according to the `To` field or 
> > `Cc`
> >   field)
> >   ** Is those ~ in mutt's manual(~e, ~T, ~B, etc.) stand for the 
> >   key?(I guess so because I have tried both `~T` and `T`, and only 
> > `T`
> >   have some effect.) If that is, seriously, why can't the author just place
> >   something like  or  in the manual? and what does the =, % 
> > prefix mean?
> 
> No, the "~" is a literal tilde character. It does _not_ mean
> . The ~T, ~B etc operators are "pattern modifiers" for use in
> expressions which match messages.  So:
> 
>  ~f c...@zip.com.au
>
> would match any message from me ("c...@zip.com.au" in the From:
> header). They are case insensitive: "~t" and "~T" do different
> things;> 

~f doesn't work either, because the ~ is not bound(as described above)

> Normal practice for mutt users is to file messages with a separate
> program as they are collected. This works best with local storage:
> we collect our email from the server with POP or IMAP and store in
> local folders on our computers.  We can walk you through setting up
> such an arrangement if you decide you want to go this way.

If there's some common practice I would really appreciate to hear some. Figuring
it out myself is kind of hard.

> If you're using GMail and wanting to keep your messages there I
> would recommend setting up filter rules in GMail itself: it is
> capable of autofiling new messages for you. The rules are a little
> crude, but they cover the common cases.

Does gmail really have that filter-move functionality? I have searched through
nearly all of gmail's setting, but all I can find is something that only let
you filter the inbox and get a clean view. It can't move the messages that have
been filtered out to other mailbox.
Or do I miss something?
 
> who is actually wearing a black t-shirt today
black t-shirt is cool, I like it and wear it every day :-)

regards,
Ruan



need some help about organize message in mutt

2016-08-01 Thread Yubin Ruan
I think I must be a newbie in mutt-user community. So, hi all.
I need some help here. I want to know how to organize all the message in 
gmail
inbox. I used to the Thunderbird email client. Frankly it's a pretty nice email
client, with a cool feature call `message-filter`. It can move some messages to
some mailbox according to the pattern you give it. For example, it can move all
the messages whose `To` field in header contains `mutt-users@mutt.org` to a
mailbox/folder call `mutt-user`. This can even automatically happed when I start
Thunderbird. This help me keep my inbox clean when I have subscribed to a lot of
mailing lists.  But when my emails get overflow and my network connection get 
bad,
Thunderbird would crash. Yes, it suck. That's the reason why I switch to using 
Mutt.

I know mutt can do pretty much the same things. But I don't know how to
exactly configure it. I try the instruction on the manual but thing just
doesn't work.
For example, in the index mode, I press `T`, and then
`some-header-string`, trying to tagged all the message that are sent to
`mutt-users@mutt.org`. But that doesn't work. So bad. I try some others, can't
make it yet.
Can anyone tell me, 
** How can I have that Thunderbird message filtering in mutt?(i.e., moving
some messages from inbox to other mailbox according to the `To` field or 
`Cc`
field)
** Is those ~ in mutt's manual(~e, ~T, ~B, etc.) stand for the 
key?(I guess so because I have tried both `~T` and `T`, and only 
`T`
have some effect.) If that is, seriously, why can't the author just place
something like  or  in the manual? and what does the =, % prefix 
mean?

Thanks,
Ruan