imap: fixed buggy names in generated URLs

For some reason the ImapUser variable gets emptied every one mailbox that gets
parsed. This produces the generated URLs to be not consistent among them,
generating, for example, "imaps://host.com/FolderA" and then
"imaps://user@host.com/FolderB". I haven't find the root cause of the problem,
but this at least fixes the issue temporarely
  sidebar: added initial sorting support

The initial sorting support sorts the mailboxes by hierarchy/path. This is a
nice feature to have when a user, like me, uses mutt to check its imaps
accounts.

The sorting method is still fixed, but it could be extended using a new user
preference
Update mh.c

Fix for issue 22: Warnings when building
(fix for Warning A only)
01-progress-bar.patch for Gentoo

http://article.gmane.org/gmane.mail.mutt.devel/18743

Adds a "progress" color item that draws a vertical progress bar in the
last line.
Don't consider TopBuffy as someone special, sort it as all the rest
Signed-off-by: Rodrigo Javier Tobar Carrizo <rtobar@csrg.inf.utfsm.cl>
docs: add link to notmuch mutttips

Signed-off-by: Karel Zak <kzak@redhat.com>
explicitly call mutt_refresh() prior to endwin() to force a screen redraw.

[4903e80356d3] removed the call, but some environments (screen+xterm under
SuSE11/12) don't properly flush without it prior to the endwin() call
fix potential buffer overflow in off-by-one bounds checking error

closes #3635
increase string size by one byte to accomodate the terminating null character in fscanf() since the maximum field width does not include it

closes #3636

hat tip: Will Fiveash
use of sscanf() had undefined behavior, replace with simple parsing instead

see #3636
use mkdtemp() to create temporary directory rather than mktemp() followed by mkdir()

closes #3637
build-sys: rename to mutt-kz to get proper make distchek result

Signed-off-by: Karel Zak <kzak@redhat.com>
Fix build without libidn
build-sys: add strndup.c strnlen.c

Reported-by: ladimir.Marek@oracle.com
Signed-off-by: Karel Zak <kzak@redhat.com>
Revert "Fix build without libidn"

This reverts commit 2bafd5984164930412b5037f61fe4f2c1ffd5fc8.
fix various compiler warnings; most were due to unchecked return values from system calls.
use gethostname() to determine the system host name

use getaddrinfo() to look up canonical DNS name, and fall back to hinting from /etc/resolv.conf

see #3298
Backed out changeset 1142ed8974fa
backout c1371176ea45
Don't exit pager if quit=ask is answered "no".

This patch addresses ticket 2788.

Currently if you quit ('Q') from inside the pager, with quit=ask-yes
or quit=ask-no, and you respond "no", mutt leaves you back in the index
menu.

This patch changes it so that mutt does not exit the pager.