test email

2015-05-02 Thread acefael
please ignore. i'm just testing it works.  


Re: [Mutt] #3752: default user_agent to no

2015-05-02 Thread Mutt
#3752: default user_agent to no
-+--
  Reporter:  ilf |  Owner:  mutt-dev
  Type:  defect  | Status:  new
  Priority:  major   |  Milestone:
 Component:  mutt|Version:
Resolution:  |   Keywords:
-+--

Comment (by ilf):

 I gave two reasons:

 1. It's a possible vector for attack and fingerprinting. You are agreeing
 on the attack part.

 2. It's not an internet standard. This one you ignored.

 I also didn't claim that this is a definite solution against finding out
 the MUA. But it's definitely a bug step in that direction.

-- 
Ticket URL: 
Mutt 
The Mutt mail user agent



http://dev.mutt.org/trac/ticket/3638

2015-05-02 Thread acefael
hi,

what do you think about the attached patch for
fixing one of the issues mentioned in ticket
http://dev.mutt.org/trac/ticket/3638

this one is about main.c:75

thanks for the consideration,
acefael
changeset:   6446:e189a50e14b9
tag: tip
user:acefael 
date:Fri May 01 21:41:23 2015 +0200
summary: main.c:75: warning: string length '558' is greater than the length 
'509' ISO C90 compilers are required to support (see #3638)

diff -r 755a18da99bc -r e189a50e14b9 main.c
--- a/main.cSat Apr 25 19:00:13 2015 -0700
+++ b/main.cFri May 01 21:41:23 2015 +0200
@@ -72,18 +72,18 @@
 Mutt is free software, and you are welcome to redistribute it\n\
 under certain conditions; type `mutt -vv' for details.\n");
 
-static const char *Copyright = N_("\
-Copyright (C) 1996-2007 Michael R. Elkins \n\
-Copyright (C) 1996-2002 Brandon Long \n\
-Copyright (C) 1997-2008 Thomas Roessler \n\
-Copyright (C) 1998-2005 Werner Koch \n\
-Copyright (C) 1999-2009 Brendan Cully \n\
-Copyright (C) 1999-2002 Tommi Komulainen \n\
-Copyright (C) 2000-2002 Edmund Grimley Evans \n\
-Copyright (C) 2006-2009 Rocco Rutte \n\
-\n\
-Many others not mentioned here contributed code, fixes,\n\
-and suggestions.\n");
+static const char *Copyright[11] = {
+"Copyright (C) 1996-2007 Michael R. Elkins " ,
+"Copyright (C) 1996-2002 Brandon Long " ,
+"Copyright (C) 1997-2008 Thomas Roessler " ,
+"Copyright (C) 1998-2005 Werner Koch " ,
+"Copyright (C) 1999-2009 Brendan Cully " ,
+"Copyright (C) 1999-2002 Tommi Komulainen " ,
+"Copyright (C) 2000-2002 Edmund Grimley Evans " ,
+"Copyright (C) 2006-2009 Rocco Rutte " ,
+"" ,
+"Many others not mentioned here contributed code, fixes," ,
+"and suggestions." };
 
 static const char *Licence = N_("\
 This program is free software; you can redistribute it and/or modify\n\
@@ -749,7 +749,13 @@
   break;
 default:
   puts (mutt_make_version ());
-  puts (_(Copyright));
+  {
+int csize = sizeof(Copyright)/sizeof(Copyright[0]);
+int i;
+for( i = 0 ; i < csize ; ++i ) {
+  puts (_(Copyright[i]));
+}
+  }
   puts (_(Licence));
   puts (_(Obtaining));
   puts (_(ReachingUs));



http://dev.mutt.org/trac/ticket/3638

2015-05-02 Thread acefael
hi,

what do you think about the attached patch for
fixing one of the issues mentioned in ticket
http://dev.mutt.org/trac/ticket/3638

this one is about main.c:75

thanks for the consideration,
acefael

changeset:   6446:e189a50e14b9
tag: tip
user:acefael 
date:Fri May 01 21:41:23 2015 +0200
summary: main.c:75: warning: string length '558' is greater than the length 
'509' ISO C90 compilers are required to support (see #3638)

diff -r 755a18da99bc -r e189a50e14b9 main.c
--- a/main.cSat Apr 25 19:00:13 2015 -0700
+++ b/main.cFri May 01 21:41:23 2015 +0200
@@ -72,18 +72,18 @@
 Mutt is free software, and you are welcome to redistribute it\n\
 under certain conditions; type `mutt -vv' for details.\n");
 
-static const char *Copyright = N_("\
-Copyright (C) 1996-2007 Michael R. Elkins \n\
-Copyright (C) 1996-2002 Brandon Long \n\
-Copyright (C) 1997-2008 Thomas Roessler \n\
-Copyright (C) 1998-2005 Werner Koch \n\
-Copyright (C) 1999-2009 Brendan Cully \n\
-Copyright (C) 1999-2002 Tommi Komulainen \n\
-Copyright (C) 2000-2002 Edmund Grimley Evans \n\
-Copyright (C) 2006-2009 Rocco Rutte \n\
-\n\
-Many others not mentioned here contributed code, fixes,\n\
-and suggestions.\n");
+static const char *Copyright[11] = {
+"Copyright (C) 1996-2007 Michael R. Elkins " ,
+"Copyright (C) 1996-2002 Brandon Long " ,
+"Copyright (C) 1997-2008 Thomas Roessler " ,
+"Copyright (C) 1998-2005 Werner Koch " ,
+"Copyright (C) 1999-2009 Brendan Cully " ,
+"Copyright (C) 1999-2002 Tommi Komulainen " ,
+"Copyright (C) 2000-2002 Edmund Grimley Evans " ,
+"Copyright (C) 2006-2009 Rocco Rutte " ,
+"" ,
+"Many others not mentioned here contributed code, fixes," ,
+"and suggestions." };
 
 static const char *Licence = N_("\
 This program is free software; you can redistribute it and/or modify\n\
@@ -749,7 +749,13 @@
   break;
 default:
   puts (mutt_make_version ());
-  puts (_(Copyright));
+  {
+int csize = sizeof(Copyright)/sizeof(Copyright[0]);
+int i;
+for( i = 0 ; i < csize ; ++i ) {
+  puts (_(Copyright[i]));
+}
+  }
   puts (_(Licence));
   puts (_(Obtaining));
   puts (_(ReachingUs));



Re: [Mutt] #3753: dev.mutt.org: redirect http to https

2015-05-02 Thread Mutt
#3753: dev.mutt.org: redirect http to https
--+--
  Reporter:  ilf  |  Owner:  mutt-dev
  Type:  enhancement  | Status:  new
  Priority:  major|  Milestone:
 Component:  doc  |Version:
Resolution:   |   Keywords:
--+--

Comment (by ilf):

 Mozilla just announced their intent to phase out non-secure HTTP:
 https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http/

-- 
Ticket URL: 
Mutt 
The Mutt mail user agent



Re: Patches (fix hanging mutt, and call command on new mail)

2015-05-02 Thread Yoshiki Vazquez-Baeza
Hi Allen,

Thanks for sending this out, I've been using this since you sent it and
it is working as expected! This is awesome because I no longer have to
close my IMAP connections before closing my laptop!

Do let me know if you need some specific testing or if there's something
else I can help with!

Yoshiki.

On (Apr-28-15|21:06), egbert. wrote:
> Hi all,
> 
> > > There was an irritating glitch, which I have also seen mentioned a few 
> > > times 
> > > online. It is that if you have mutt open, pack up your laptop, and go 
> > > somewhere else, mutt is completely unresponsive and needs to be killed. I 
> > > tracked down what was causing this and to my satisfaction my fix works. 
> > > 
> > > Would you be interested in this patch? And, if the intended behaviour is 
> > > that it should hang like this, then perhaps my fix could be implemented 
> > > as a 
> > > config variable. (It’s basically just a simple timeout + retry mechanism 
> > > in 
> > > the socket_connect function).
> > 
> > Please go ahead and post your patch, either to this list, or perhaps to
> > a ticket.  It looks like http://dev.mutt.org/trac/ticket/3369 or
> > http://dev.mutt.org/trac/ticket/3491 might be related.
> > 
> > Most of the committers are quite busy right now, so it may take a while
> > to get a response.
> 
> Attached is my patch for the hanging socket problem.
> 
> I hope this fixes 3369 and 3491, which indeed sound very similar to the 
> problem I reported.
> 
> All comments welcome.
> 
> I used hg export against the tip of the default branch to produce the diff; 
> please let me know if you would rather have it another way.
> 
> > 
> > > Also, you’ve probably talked about this many times before, but is there a 
> > > reason not to implement a config option to call a command when there is 
> > > new 
> > > mail? 
> > 
> > Yoshiki Vazquez Baeza posted a patch for this a couple months ago, and
> > David Champion is incorporating it into a related patch set.
> > 
> 
> Yours, Allen

> # HG changeset patch
> # User misterfish 
> # Date 1430247531 -7200
> #  Tue Apr 28 20:58:51 2015 +0200
> # Node ID 65d3b99e229cefaec62e8205fec116a7c00fce72
> # Parent  755a18da99bc0a57bd6e462f5971eba7b9f61604
> Fix bug where mutt hangs indefinitely when, for example, you pack up your
> laptop and open it again somewhere else.
> 
> Introduce a timeout on sockets ("socket_timeout" in muttrc, default 5
> seconds) and a fixed number of retries for GNUTLS ("ssl_socket_num_tries" in
> muttrc, default is 2).
> 
> Hopefully fixes #3369 and #3491.
> 
> diff -r 755a18da99bc -r 65d3b99e229c globals.h
> --- a/globals.h   Sat Apr 25 19:00:13 2015 -0700
> +++ b/globals.h   Tue Apr 28 20:58:51 2015 +0200
> @@ -193,6 +193,8 @@
>  WHERE unsigned short Counter INITVAL (0);
>  
>  WHERE short ConnectTimeout;
> +WHERE short SocketTimeout;
> +WHERE short GNUTLSSocketNumTries;
>  WHERE short HistSize;
>  WHERE short MenuContext;
>  WHERE short PagerContext;
> diff -r 755a18da99bc -r 65d3b99e229c init.h
> --- a/init.h  Sat Apr 25 19:00:13 2015 -0700
> +++ b/init.h  Tue Apr 28 20:58:51 2015 +0200
> @@ -2888,6 +2888,14 @@
>** variable.
>*/
>  #endif /* USE_SMTP */
> +  { "socket_timeout", DT_NUM, R_NONE, UL &SocketTimeout, 5 },
> +  /*
> +  ** .pp
> +  ** Close inactive sockets after this many seconds. When set to zero or a
> +  ** negative value, mutt will wait indefinitely on sockets, but be warned
> +  ** that this can cause mutt to hang. If using GNUTLS, you must also set
> +  ** $$ssl_socket_num_tries to a non-zero value.
> +  */
>{ "sort",  DT_SORT, R_INDEX|R_RESORT, UL &Sort, SORT_DATE },
>/*
>** .pp
> @@ -3025,6 +3033,15 @@
>** for use in any Diffie-Hellman key exchange. A value of 0 will use
>** the default from the GNUTLS library.
>*/
> +  { "ssl_socket_num_tries", DT_NUM, R_NONE, UL &GNUTLSSocketNumTries, 2 },
> +  /*
> +  ** .pp
> +  ** When using GNUTLS, this can be used in conjunction with
> +  ** $$socket_timeout to cause the mailbox to close after the socket has
> +  ** timed out this many times. If set to zero or a negative number, the
> +  ** socket will wait for data indefinitely, but be aware that this can
> +  ** cause mutt to hang.
> +  */
>  # endif /* USE_SSL_GNUTLS */
>{ "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES },
>/*
> diff -r 755a18da99bc -r 65d3b99e229c mutt_socket.c
> --- a/mutt_socket.c   Sat Apr 25 19:00:13 2015 -0700
> +++ b/mutt_socket.c   Tue Apr 28 20:58:51 2015 +0200
> @@ -344,6 +344,7 @@
>  {
>int sa_size;
>int save_errno;
> +  struct timeval socket_timeout_tv = {0};
>  
>if (sa->sa_family == AF_INET)
>  sa_size = sizeof (struct sockaddr_in);
> @@ -364,6 +365,28 @@
>  
>save_errno = 0;
>  
> +  /* Set a timeout on the socket. 
> +   * Can be set to 0 for no timeout, but then, mutt can hang forever waiting
> +   * for data.
> +   * For OpenSSL this is enough to avoid hanging, but with GNUTLS,
> +   * ssl_socket_num_tries must also be set in

Re: http://dev.mutt.org/trac/ticket/3638

2015-05-02 Thread Eike Rathke
Hi acefael,

On Saturday, 2015-05-02 13:32:23 +0100, acefael wrote:

> what do you think about the attached patch

Why send the mail twice? Anyway..

> [...]
> +"Many others not mentioned here contributed code, fixes," ,
> +"and suggestions." };
>  
> -  puts (_(Copyright));
> +  {
> +int csize = sizeof(Copyright)/sizeof(Copyright[0]);
> +int i;
> +for( i = 0 ; i < csize ; ++i ) {
> +  puts (_(Copyright[i]));
> +}
> +  }

What you may not be aware of, the _() underscore function is a special
function for the gettext() translation process. AFAIK it does not work
with array elements this way (someone correct me if I'm wrong). My
suggestion is, as the actual copyright information and names are not to
be translated, hold them in an array like you introduced, but do not use
_() on the elements, and only for the final sentence "Many others..."
use a separate variable and use that in _().

  Eike

-- 
OpenPGP/GnuPG encrypted mail preferred in all private communication.
Key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
Use LibreOffice! https://www.libreoffice.org/


signature.asc
Description: PGP signature


Re: Patches (fix hanging mutt, and call command on new mail)

2015-05-02 Thread Santiago Torres
Hi everyone,

I've been testing your patch with my local build of Mutt (along w/
new_mail_command) and, so far, it seems pretty stable. I'm quite happy
with the fix.

Should I take a look at the code or anything of like that? How can I
help to move this forward?

Thanks,
-Santiago.

On Sat, May 02, 2015 at 01:20:25PM -0700, Yoshiki Vazquez-Baeza wrote:
> Hi Allen,
>
> Thanks for sending this out, I've been using this since you sent it and
> it is working as expected! This is awesome because I no longer have to
> close my IMAP connections before closing my laptop!
>
> Do let me know if you need some specific testing or if there's something
> else I can help with!
>
> Yoshiki.
>
> On (Apr-28-15|21:06), egbert. wrote:
> > Hi all,
> >
> > > > There was an irritating glitch, which I have also seen mentioned a few 
> > > > times
> > > > online. It is that if you have mutt open, pack up your laptop, and go
> > > > somewhere else, mutt is completely unresponsive and needs to be killed. 
> > > > I
> > > > tracked down what was causing this and to my satisfaction my fix works.
> > > >
> > > > Would you be interested in this patch? And, if the intended behaviour is
> > > > that it should hang like this, then perhaps my fix could be implemented 
> > > > as a
> > > > config variable. (It’s basically just a simple timeout + retry 
> > > > mechanism in
> > > > the socket_connect function).
> > >
> > > Please go ahead and post your patch, either to this list, or perhaps to
> > > a ticket.  It looks like http://dev.mutt.org/trac/ticket/3369 or
> > > http://dev.mutt.org/trac/ticket/3491 might be related.
> > >
> > > Most of the committers are quite busy right now, so it may take a while
> > > to get a response.
> >
> > Attached is my patch for the hanging socket problem.
> >
> > I hope this fixes 3369 and 3491, which indeed sound very similar to the
> > problem I reported.
> >
> > All comments welcome.
> >
> > I used hg export against the tip of the default branch to produce the diff;
> > please let me know if you would rather have it another way.
> >
> > >
> > > > Also, you’ve probably talked about this many times before, but is there 
> > > > a
> > > > reason not to implement a config option to call a command when there is 
> > > > new
> > > > mail?
> > >
> > > Yoshiki Vazquez Baeza posted a patch for this a couple months ago, and
> > > David Champion is incorporating it into a related patch set.
> > >
> >
> > Yours, Allen
>
> > # HG changeset patch
> > # User misterfish 
> > # Date 1430247531 -7200
> > #  Tue Apr 28 20:58:51 2015 +0200
> > # Node ID 65d3b99e229cefaec62e8205fec116a7c00fce72
> > # Parent  755a18da99bc0a57bd6e462f5971eba7b9f61604
> > Fix bug where mutt hangs indefinitely when, for example, you pack up your
> > laptop and open it again somewhere else.
> >
> > Introduce a timeout on sockets ("socket_timeout" in muttrc, default 5
> > seconds) and a fixed number of retries for GNUTLS ("ssl_socket_num_tries" in
> > muttrc, default is 2).
> >
> > Hopefully fixes #3369 and #3491.
> >
> > diff -r 755a18da99bc -r 65d3b99e229c globals.h
> > --- a/globals.h Sat Apr 25 19:00:13 2015 -0700
> > +++ b/globals.h Tue Apr 28 20:58:51 2015 +0200
> > @@ -193,6 +193,8 @@
> >  WHERE unsigned short Counter INITVAL (0);
> >
> >  WHERE short ConnectTimeout;
> > +WHERE short SocketTimeout;
> > +WHERE short GNUTLSSocketNumTries;
> >  WHERE short HistSize;
> >  WHERE short MenuContext;
> >  WHERE short PagerContext;
> > diff -r 755a18da99bc -r 65d3b99e229c init.h
> > --- a/init.hSat Apr 25 19:00:13 2015 -0700
> > +++ b/init.hTue Apr 28 20:58:51 2015 +0200
> > @@ -2888,6 +2888,14 @@
> >** variable.
> >*/
> >  #endif /* USE_SMTP */
> > +  { "socket_timeout", DT_NUM, R_NONE, UL &SocketTimeout, 5 },
> > +  /*
> > +  ** .pp
> > +  ** Close inactive sockets after this many seconds. When set to zero or a
> > +  ** negative value, mutt will wait indefinitely on sockets, but be warned
> > +  ** that this can cause mutt to hang. If using GNUTLS, you must also set
> > +  ** $$ssl_socket_num_tries to a non-zero value.
> > +  */
> >{ "sort",DT_SORT, R_INDEX|R_RESORT, UL &Sort, SORT_DATE 
> > },
> >/*
> >** .pp
> > @@ -3025,6 +3033,15 @@
> >** for use in any Diffie-Hellman key exchange. A value of 0 will use
> >** the default from the GNUTLS library.
> >*/
> > +  { "ssl_socket_num_tries", DT_NUM, R_NONE, UL &GNUTLSSocketNumTries, 2 },
> > +  /*
> > +  ** .pp
> > +  ** When using GNUTLS, this can be used in conjunction with
> > +  ** $$socket_timeout to cause the mailbox to close after the socket has
> > +  ** timed out this many times. If set to zero or a negative number, the
> > +  ** socket will wait for data indefinitely, but be aware that this can
> > +  ** cause mutt to hang.
> > +  */
> >  # endif /* USE_SSL_GNUTLS */
> >{ "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES },
> >/*
> > diff -r 755a18da99bc -r 65d3b99e229c mutt_socket.c
> > --- a/mutt_sock

[Mutt] #3754: /tmp/mutt.html not found

2015-05-02 Thread Mutt
#3754: /tmp/mutt.html not found
-+--
 Reporter:  jidanni  |  Owner:  mutt-dev
 Type:  defect   | Status:  new
 Priority:  trivial  |  Milestone:
Component:  browser  |Version:  1.5.23
 Keywords:   |
-+--
 Looking at
 {{{
  I 1 
 [multipa/alternativ, 7bitC?, >, 9.9K]
  I 2 ├─>
 [text/plain, quotedC?, utf-8>, 1.3K]
  I 3 └─>
 [text/html, quotedC?, utf-8>, 8.3K]
 }}}
 with the cursor on line 3, I hit "v",
 which calls $BROWSER file:///tmp/mutt.html
 which is not found by the browser.

-- 
Ticket URL: 
Mutt 
The Mutt mail user agent



Re: [Mutt] #3754: /tmp/mutt.html not found

2015-05-02 Thread Mutt
#3754: /tmp/mutt.html not found
--+--
  Reporter:  jidanni  |  Owner:  mutt-dev
  Type:  defect   | Status:  new
  Priority:  trivial  |  Milestone:
 Component:  browser  |Version:  1.5.23
Resolution:   |   Keywords:
--+--

Comment (by jidanni):

 Oops I meant I hit RET (ENTER), not v.

-- 
Ticket URL: 
Mutt 
The Mutt mail user agent