Re: scoring top posters

2015-07-30 Thread Matthias Apitz
El día Wednesday, July 29, 2015 a las 03:52:01PM -0400, Fred Smith escribió:

> On Wed, Jul 29, 2015 at 02:38:30PM -0500, David Champion wrote:
> > Simplest idea I have is to add a procmail (or whatever) rule to detect 
> > top-posting,
> > then insert a yes or no header into the message:
> > 
> > X-Top-Posted: yes
> > 
> > Then it's trivial to score it in mutt.
> 
> and just to satisfy my curiosity, how would such a procmail rule look/work?

A top posting we see, when in the body of the mail before a line like
this:

On 29 Jul 2015, Matthias Apitz wrote:

are some other text lines. Of course we need here a good regular
expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:'
is highly configurable and language dependent.

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/  ☎ +49-176-38902045
No! Nein! ¡No! Όχι! -- Ευχαριστούμε!


Re: Reading encrypted mail remotely

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

I do exactly that.  I maintain a tmux session on my server.  I ssh to the
server, attach the ssh session which contains mutt and everything on my
server.  The tmux session makes me a user local to the server where
everything is.  Tmux and screen are quite similar, try it.
-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://linuxcounter.net


Re: Use of vcalendar with mutt

2015-07-30 Thread Mark H. Wood
On Thu, Jul 30, 2015 at 07:36:04AM +1000, Brian Salter-Duke wrote:
> On Thu, Jul 23, 2015 at 09:32:29AM +1000, Brian Salter-Duke wrote:
> > 
> > Le 22/07/2015 à 20:31, Brian Salter-Duke a écrit :
> > > It does have a lot od email addresses in it. If you email me, I will send 
> > > you a
> > > copy , but I do not think I can put it to the list.
> > You can edit it directly from Mutt (with the 'e' key) before sending it
> > to this list. It would be better this way.
> 
> I will try to attach it. Thanks for all your help.

I think you succeeded.  Here I received your message containing a text/plain
bodypart (above) and a message/rfc822 bodypart.  The latter contained
a text/calendar bodypart which rendered just fine using vcal.pl, a
nice VCALENDAR decoder script by Wayne Morrison.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: Digital signature


Re: Reading encrypted mail remotely

2015-07-30 Thread Kevin J. McCarthy
Ian Zimmerman wrote:
> Is there any hook or crook by which I could read encrypted mail with
> mutt without my private key being installed on the host where mutt runs?
> Some agent forwarding magic, pretty please?  I really, really don't want
> to put my key on my mail server.  And no, please don't suggest IMAP :-(

I haven't done anything more than search, but there is a thread about
this here:
  http://www.gossamer-threads.com/lists/gnupg/users/68713

Looks like they are referring to a new OpenSSH 6.7 feature combined
with a new GPG 2.1 feature.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
http://www.8t8.us/configs/gpg-key-transition-statement.txt


signature.asc
Description: PGP signature


Re: Reading encrypted mail remotely

2015-07-30 Thread Ian Zimmerman
On 2015-07-30 06:50 -0700, Kevin J. McCarthy wrote:

> I haven't done anything more than search, but there is a thread about
> this here:
>   http://www.gossamer-threads.com/lists/gnupg/users/68713
> 
> Looks like they are referring to a new OpenSSH 6.7 feature combined
> with a new GPG 2.1 feature.

You get a virtual beer for understanding the question ;-)

Right, I had not googled.  Me bad.  I felt mutt users were the perfect
pool of knowledge about this.  Thanks for pointing me in the right
direction at least, Kevin!

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



Re: scoring top posters

2015-07-30 Thread David Champion
Hi Mattias -

* On 30 Jul 2015, Matthias Apitz wrote: 
> 
> are some other text lines. Of course we need here a good regular
> expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:'
> is highly configurable and language dependent.

That's why I wouldn't do it with anything regular-expression-based, like
mutt.  Here's an example procmail rule which I haven't tested.

toppostlines=`awk '/^>/ {exit;} /^ *$/ {next;} /^[^ ]*:/ {next;} {total += 1;} 
END {print total}'`
:0 f
| formail -i "X-Top-Post-Lines: $toppostlines"

This tells how many non-blank lines occur between the header and quoted
text, without regard to what's in those lines.  Two or three is probably
not top-posty.  You could go further and count unquoted lines AFTER the
first quoted line.  Then mutt can score on X-Top-Post-Lines.  

This doesn't help with any encoded mail -- you'd need a smarter filter
for that.  Smart decoding and inability to run filters on your mail
service are the main reasons you would want to do it inside mutt, but
that seems very challenging at best (and impossible at worst).

Making this more general is left as an exercise.  But I wouldn't
recommend it really.  I find personally that downscoring top-posters is
a pretty poor way to judge content.  If it works for you, great, but you
must not exchange email with very many normal people. :)

-- 
David Champion • d...@bikeshed.us


Re: Use of vcalendar with mutt

2015-07-30 Thread Bernard Massot
Le 30/07/2015 à 07:36, Brian Salter-Duke a écrit :
> I will try to attach it. Thanks for all your help.
It worked fine for me. If didn't for you it means you missed something.
Here is my setup:

In ~/.muttrc:
auto_view text/calendar

In ~/.mailcap:
text/calendar; ~/.mutt/vcalendar-filter; copiousoutput

Did you forget to make vcalendar-filter executable?
Test it independently from Mutt. Save the text/calendar part in
/tmp/foo.ics and run:
~/.mutt/vcalendar-filter < /tmp/foo.ics
What does that return?

For the reference, here is how your mail looks with my setup:


Date: Mon, 20 Jul 2015 10:27:13 +1000
From: Karen Drakatos 
To: PharmacyHDRStudents
Cc: 
Subject: REMINDER: 2015 3MT competition this Friday

[-- Autoview using ~/.mutt/vcalendar-filter --]
Timezone: AUS Eastern Standard Time


Summary : REMINDER: 2015 3MT competition this Friday

Description : Dear all

  You’re invite to attend the 2015 Faculty Three Minute
  Thesis (3MT®) competition. Every researcher knows that
  one of the key elements to making an impact with your
  research is to convey its importance to the general
  public. But, could you explain your research is just three
  minutes? That is the unique challenge that awaits our fast-
  thinking graduate research students who have entered the
  3MT® competition! Please come along and show your support
  to our students who will provide engaging, inspirational
  and a concise three minute summary of their work. For
  catering purposes, please accept this calendar invitation.
  Date: Friday, 24th July 2015 Venue: Cossar Hall Mural
  Section Time: Please ensure you arrive and be seated no
  later than 12pm. The start time will be 12pm sharp.


Location: Cossar Hall
Dtstart : 2015-07-24 12:00
Dtend   : 2015-07-24 14:00

-- 
Bernard Massot


Re: scoring top posters

2015-07-30 Thread Heinz Diehl
On 30.07.2015, Matthias Apitz wrote: 

> A top posting we see, when in the body of the mail before a line like
> this:
> 
> On 29 Jul 2015, Matthias Apitz wrote:
> 
> are some other text lines. Of course we need here a good regular
> expression because the line 'On 29 Jul 2015, Matthias Apitz wrote:'
> is highly configurable and language dependent.

First: you can't do that using procmail alone. A perl, python, ruby or
whatever script will be needed. Simply pipe all incoming mail to your
script via procmail.

That said, I doubt such a script which *reliably* detects top-postings
can be done. As a starting point for your language problem: simply
check if the first line in the mail body ends with a colon (":").



Re: scoring top posters

2015-07-30 Thread Alarig Le Lay
On Thu Jul 30 22:24:03 2015, Heinz Diehl wrote:
> That said, I doubt such a script which *reliably* detects top-postings
> can be done. As a starting point for your language problem: simply
> check if the first line in the mail body ends with a colon (":").

It’s not so simple. The first line of the previous mail doesn’t end with
a colon and it wasn’t a top posting one.

-- 
alarig


signature.asc
Description: Digital signature


Re: scoring top posters

2015-07-30 Thread Dirk Griesbach
Am Do, 30. Jul 2015 um 22:24:03 +0200 schrieb Heinz Diehl:
> First: you can't do that using procmail alone. A perl, python, ruby or
> whatever script will be needed. Simply pipe all incoming mail to your
> script via procmail.

May I suggest t-prot[1] which works great as a display filter in mutt?
It also allows to detect such things for scripting purposes.

Dirk

[1] http://www.escape.de/~tolot/mutt/


Re: Use of vcalendar with mutt

2015-07-30 Thread Brian Salter-Duke
On Thu, Jul 30, 2015 at 10:14:39PM +0200, Bernard Massot wrote:
> Le 30/07/2015 à 07:36, Brian Salter-Duke a écrit :
> > I will try to attach it. Thanks for all your help.
> It worked fine for me. If didn't for you it means you missed something.
> Here is my setup:
> 
> In ~/.muttrc:
> auto_view text/calendar
> 
> In ~/.mailcap:
> text/calendar; ~/.mutt/vcalendar-filter; copiousoutput

I finally got there. One problem was that I had a text/* line in
mailcap. I had to put the text/calendar above it. 

Then my mailcap had this comment in it from way back - I forget where.

# Mutt can only edit attachments if they have a mailcap edit entry.
# (This would be a good thing to fix.)  However, a mailcap entry
# apparently must include the display function--it can't be defaulted.
# The combination "cat; copiousoutput" comes close to the default in
# that in invokes the default pager on the output of cat.  However,
# there is apparently no way to specify the default editor--a shell
# environment variable such as $VISUAL or $EDITOR is as close as we can
# get.
#

I had to follow it. The commented text/calendar line if I uncomment it
does not work, but the one below does. So I am there, but why? Any thoughts.

#text/calendar; /home/brian/.mutt/vcalendar-filter 
text/calendar; /home/brian/.mutt/vcalendar-filter; copiousoutput; edit=$VISUAL 
%s
 
A further question - where is the path set to find the mailcap file?

Thanks for your help.

Brian.

> Did you forget to make vcalendar-filter executable?
> Test it independently from Mutt. Save the text/calendar part in
> /tmp/foo.ics and run:
> ~/.mutt/vcalendar-filter < /tmp/foo.ics
> What does that return?
> 
> For the reference, here is how your mail looks with my setup:
> 
> 
> Date: Mon, 20 Jul 2015 10:27:13 +1000
> From: Karen Drakatos 
> To: PharmacyHDRStudents
> Cc: 
> Subject: REMINDER: 2015 3MT competition this Friday
> 
> [-- Autoview using ~/.mutt/vcalendar-filter --]
> Timezone: AUS Eastern Standard Time
> 
> 
> Summary : REMINDER: 2015 3MT competition this Friday
> 
> Description : Dear all
> 
>   You’re invite to attend the 2015 Faculty Three Minute
>   Thesis (3MT®) competition. Every researcher knows that
>   one of the key elements to making an impact with your
>   research is to convey its importance to the general
>   public. But, could you explain your research is just three
>   minutes? That is the unique challenge that awaits our fast-
>   thinking graduate research students who have entered the
>   3MT® competition! Please come along and show your support
>   to our students who will provide engaging, inspirational
>   and a concise three minute summary of their work. For
>   catering purposes, please accept this calendar invitation.
>   Date: Friday, 24th July 2015 Venue: Cossar Hall Mural
>   Section Time: Please ensure you arrive and be seated no
>   later than 12pm. The start time will be 12pm sharp.
> 
> 
> Location: Cossar Hall
> Dtstart : 2015-07-24 12:00
> Dtend   : 2015-07-24 14:00
> 
> -- 
> Bernard Massot

-- 
On two occasions I have been asked [by members of Parliament], "Pray, Mr. 
Babbage, if you put into the machine wrong figures, will the right answers 
come out?". I am not able rightly to comprehend the kind of confusion of 
ideas that could provoke such a question.
   -- Charles Babbage
Brian Salter-Duke (Brian Duke) Email: b_duke(AT)bigpond(DOT)net(DOT)au


Re: avoid multiple "deletion" of same mail?

2015-07-30 Thread Peter P.
Dear Michael, dear Cameron,

* Michael Tatge  [2015-07-22 14:17]:
> * On Wed, Jul 22, 2015 11:35AM -0400 Peter P. (peterpar...@fastmail.com) 
> muttered:
> > I have bound the 'd' key to move mails to a trash folder, and 'D' to
> > move an entire thread to a trash folder:
> > 
> >  folder-hook . 'macro index,pager d "=INBOX.Trash \r"
> >  folder-hook . 'macro index,pager D 
> > "=INBOX.Trash \r"
> 
> > This doesn't prevent me from accidentally moving these messages twice,
> > eg when the first mails in a thread are deleted using 'd' (and are
> > marked deleted accordingly) with a subsequent use of 'D' the entire
> > thread, including the messages that got deleted already, gets saved to
> > the trash folder again, causing duplicates.
> 
> You could use the trash folder patch included in most distros.
> Then you wouldn't need those macros.

I managed to change to the trash folder patch and have been using it
successfully for a week by now. Thank you for suggesting it Michael, and
thank you Cameron for your instructions on how to write a godd macro
that could indeed do without the above patch and which made me learn a
lot.

cheers, P


Re: amount of displayed characters of sender name in index view

2015-07-30 Thread Peter P.
* spaceman  [2015-07-29 13:57]:
> >is there a way to tell mutt to show me more of the sender name in index
> >view? Currently it seems to be 15 characters regardless of the
> >(x)terminal dimensions.
> 
> The following should set the field width to twenty: Original
> index_format = "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s"
> 
> Modified
> index_format = "%4C %Z %{%b %d} %-20.20L (%?l?%4l&%4c?) %s"
> 
> Don't ask me why you need both numbers, all I know is that it related to
> printf and right and left alignment.
> 
> May I suggest:
> man mutt
> man 3 printf
> 
> Regards,
> spaceman

spaceman, Jon, dear others,

thank you so much for this advice and please excuse me for not having
checked the manpage this time.

best, P