From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#26102: movemail can't connect mail server Date: Fri, 17 Mar 2017 00:23:47 -0700 Organization: UCLA Computer Science Department Message-ID: <20325304-0669-cc90-1bf4-d063ac69fb1c@cs.ucla.edu> References: <76a96737-f780-00a2-9fd4-70c0e95f0101@cs.ucla.edu> <8360ja1ldi.fsf@gnu.org> <834lyu1jws.fsf@gnu.org> <83wpbpz19x.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------07311B7A11C8C25159C3054D" X-Trace: blaine.gmane.org 1489735520 3412 195.159.176.226 (17 Mar 2017 07:25:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2017 07:25:20 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: hengaini2055@qq.com, 26102-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 17 08:25:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1comG6-0007yd-9p for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2017 08:25:10 +0100 Original-Received: from localhost ([::1]:47508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1comGC-0004wk-9M for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2017 03:25:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1comG2-0004tE-6I for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 03:25:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1comFy-0006eo-PR for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 03:25:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1comFy-0006ej-L8 for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 03:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1comFy-0004Ih-Ff for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 03:25:02 -0400 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Mar 2017 07:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 26102 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Mail-Followup-To: 26102@debbugs.gnu.org, eggert@cs.ucla.edu, hengaini2055@qq.com Original-Received: via spool by 26102-done@debbugs.gnu.org id=D26102.148973544516457 (code D ref 26102); Fri, 17 Mar 2017 07:25:02 +0000 Original-Received: (at 26102-done) by debbugs.gnu.org; 17 Mar 2017 07:24:05 +0000 Original-Received: from localhost ([127.0.0.1]:59543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1comF2-0004HM-U1 for submit@debbugs.gnu.org; Fri, 17 Mar 2017 03:24:05 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1comEz-0004Gq-Kk for 26102-done@debbugs.gnu.org; Fri, 17 Mar 2017 03:24:03 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9C5F916006D; Fri, 17 Mar 2017 00:23:54 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id e5A7M_saSqtg; Fri, 17 Mar 2017 00:23:50 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E1FEE160071; Fri, 17 Mar 2017 00:23:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6lWs2wJPEiAY; Fri, 17 Mar 2017 00:23:50 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AEDF316006D; Fri, 17 Mar 2017 00:23:50 -0700 (PDT) In-Reply-To: <83wpbpz19x.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130663 Archived-At: This is a multi-part message in MIME format. --------------07311B7A11C8C25159C3054D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Eli Zaretskii wrote: > Both patches, as proposed, are too drastic. I could agree to the > second one, provided that the default is changed to build and install > our movemail -- this will let distributors decide whether to install > it or not, while keeping backward compatibility. (The NEWS part of > your patch should then be changed accordingly.) OK, I installed the second patch with modifications along the lines that = you=20 suggested, updated the documentation accordingly, and am closing this bug= =20 report. The patch that I installed is attached. As the default Emacs configuration still has a significant security hole,= this=20 patch changes 'configure' to warn about the problem if present. Although = many=20 distributors and/or installers will no doubt ignore the warning, at least= we can=20 later say in our defense that 'configure' warned them. --------------07311B7A11C8C25159C3054D Content-Type: text/x-diff; name="0001-Emacs-movemail-is-now-a-configure-time-option.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Emacs-movemail-is-now-a-configure-time-option.patch" =46rom e82b72bdd72f0b3ab3f5bc67840cbd65e98ef443 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 16 Mar 2017 23:50:37 -0700 Subject: [PATCH] Emacs 'movemail' is now a configure-time option The new configure option --with-mailutils lets the builder say that Emacs should assume that GNU Mailutils is installed, instead of continuing to build and install its own limited and insecure substitute for 'movemail'. * INSTALL, etc/NEWS, etc/PROBLEMS: Mention --with-mailutils. * configure.ac: Add --with-mailutils option. (with_mailutils): New variable. Do not bother configuring 'movemail' when not building it. Warn about issues relating to --with-mailutils. * doc/emacs/rmail.texi (Movemail): Mention --with-mailutils. (Movemail, Remote Mailboxes): Document port numbers in POP and IMAP URLs. * lib-src/Makefile.in (with_mailutils): New macro. (UTILITIES): Use it. --- INSTALL | 22 +++++-- configure.ac | 177 ++++++++++++++++++++++++++++++---------------= ------ doc/emacs/rmail.texi | 82 ++++++++++++------------ etc/NEWS | 6 ++ etc/PROBLEMS | 1 + lib-src/Makefile.in | 6 +- 6 files changed, 175 insertions(+), 119 deletions(-) diff --git a/INSTALL b/INSTALL index 10b1756..a99f107 100644 --- a/INSTALL +++ b/INSTALL @@ -259,12 +259,23 @@ inconvenient for Emacs when running as daemon or ru= nning via a remote ssh connection. In order to completely prevent the use of D-Bus, config= ure Emacs with the options '--without-dbus --without-gconf --without-gsettin= gs'. =20 +To read email via a network protocol like IMAP or POP, you can +configure Emacs with the option '--with-mailutils', so that it always +uses the GNU Mailutils 'movemail' program to retrieve mail. Otherwise +the Emacs build procedure builds and installs an auxiliary 'movemail' +program, a limited and insecure substitute that Emacs can use when +Mailutils is not installed; when this happens, there are several +configure options such as --without-pop that provide fine-grained +control over Emacs 'movemail' construction. + The Emacs mail reader RMAIL is configured to be able to read mail from a POP3 server by default. Versions of the POP protocol older than -POP3 are not supported. For Kerberos-authenticated POP add -'--with-kerberos', for Hesiod support add '--with-hesiod'. While POP3 -is always enabled, whether Emacs actually uses POP is controlled by -individual users--see the Rmail chapter of the Emacs manual. +POP3 are not supported. While POP3 support is typically enabled, +whether Emacs actually uses POP3 is controlled by individual users; +see the Rmail chapter of the Emacs manual. Unless you configure +--with-mailutils, it is a good idea to configure --without-pop so that +users are less likely to inadvertently read email via insecure +channels. =20 For image support you may have to download, build, and install the appropriate image support libraries for image types other than XBM and @@ -538,7 +549,8 @@ information on this. Emacs info files. =20 8) If your system uses lock files to interlock access to mailer inbox fi= les, -then you might need to make the movemail program setuid or setgid +and if you did not configure --with-mailutils, then you might need to +make the Emacs-specific 'movemail' program setuid or setgid in order to enable it to write the lock files. We believe this is safe. =20 9) You are done! You can remove executables and object files from diff --git a/configure.ac b/configure.ac index 4d9ba96..47d0e5c 100644 --- a/configure.ac +++ b/configure.ac @@ -240,6 +240,18 @@ AC_DEFUN m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=3D$with_features])dnl ])dnl =20 +# FIXME: The default options '--without-mailutils --with-pop' result +# in a movemail implementation that supports only unencrypted POP3 +# connections. Encrypted connections should be the default. + +OPTION_DEFAULT_OFF([mailutils], + [rely on GNU Mailutils being installed; this makes the options + --without-pop through --with-mailhost irrelevant)]) +if test "$with_mailutils" =3D no; then + with_mailutils=3D +fi +AC_SUBST([with_mailutils]) + OPTION_DEFAULT_ON([pop],[don't support POP mail retrieval with movemail]= ) if test "$with_pop" =3D yes; then AC_DEFINE(MAIL_USE_POP) @@ -3789,87 +3801,91 @@ AC_DEFUN AC_SUBST(LIBXML2_LIBS) AC_SUBST(LIBXML2_CFLAGS) =20 -# Check for mail-locking functions in a "mail" library. Probably this s= hould -# have the same check as for liblockfile below. -AC_CHECK_LIB(mail, maillock, have_mail=3Dyes, have_mail=3Dno) -if test $have_mail =3D yes; then - LIBS_MAIL=3D-lmail - AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the 'mail' library= (-lmail).]) - - OLD_LIBS=3D$LIBS - LIBS=3D"$LIBS_MAIL $LIBS" - AC_CHECK_FUNCS(touchlock) - LIBS=3D$OLD_LIBS -else - LIBS_MAIL=3D -fi -dnl Debian, at least: -AC_CHECK_LIB(lockfile, maillock, have_lockfile=3Dyes, have_lockfile=3Dno= ) -if test $have_lockfile =3D yes; then - LIBS_MAIL=3D-llockfile - AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the 'lockfile= ' library (-llockfile).]) -else -# If we have the shared liblockfile, assume we must use it for mail -# locking (e.g. Debian). If we couldn't link against liblockfile -# (no liblockfile.a installed), ensure that we don't need to. - dnl This works for files generally, not just executables. - dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf? - AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no, - /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH) - if test $ac_cv_prog_liblockfile =3D yes; then - AC_MSG_ERROR([Shared liblockfile found but can't link against it. +BLESSMAIL_TARGET=3D +LIBS_MAIL=3D +if test ! "$with_mailutils"; then + # Check for mail-locking functions in a "mail" library. Probably this= should + # have the same check as for liblockfile below. + AC_CHECK_LIB([mail], [maillock], [have_mail=3Dyes], [have_mail=3Dno]) + if test $have_mail =3D yes; then + LIBS_MAIL=3D-lmail + AC_DEFINE([HAVE_LIBMAIL], [1], + [Define to 1 if you have the 'mail' library (-lmail).]) + + OLD_LIBS=3D$LIBS + LIBS=3D"$LIBS_MAIL $LIBS" + AC_CHECK_FUNCS([touchlock]) + LIBS=3D$OLD_LIBS + fi + dnl Debian, at least: + AC_CHECK_LIB([lockfile], [maillock], [have_lockfile=3Dyes], [have_lock= file=3Dno]) + if test $have_lockfile =3D yes; then + LIBS_MAIL=3D-llockfile + AC_DEFINE([HAVE_LIBLOCKFILE], [1], + [Define to 1 if you have the 'lockfile' library (-llockfile).]) + else + # If we have the shared liblockfile, assume we must use it for mail + # locking (e.g. Debian). If we couldn't link against liblockfile + # (no liblockfile.a installed), ensure that we don't need to. + dnl This works for files generally, not just executables. + dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf?= + AC_CHECK_PROG([liblockfile], [liblockfile.so], [yes], [no], + [/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH]) + if test "$ac_cv_prog_liblockfile" =3D yes; then + AC_MSG_ERROR([Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a 'development' package to install containing liblockfile.]= ) + fi fi -fi -AC_CHECK_HEADERS_ONCE(maillock.h) -AC_SUBST(LIBS_MAIL) + AC_CHECK_HEADERS([maillock.h]) =20 -## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) = to -## interlock access to the mail spool. The alternative is a lock file n= amed -## /usr/spool/mail/$USER.lock. -mail_lock=3Dno -case "$opsys" in - aix4-2) mail_lock=3D"lockf" ;; - - gnu|freebsd|dragonfly|netbsd|openbsd|darwin) mail_lock=3D"flock" ;; - - ## On GNU/Linux systems, both methods are used by various mail program= s. - ## I assume most people are using newer mailers that have heard of flo= ck. - ## Change this if you need to. - ## Debian contains a patch which says: "On Debian/GNU/Linux systems, - ## configure gets the right answers, and that means *NOT* using flock.= - ## Using flock is guaranteed to be the wrong thing. See Debian Policy - ## for details." and then uses '#ifdef DEBIAN'. Unfortunately the - ## Debian maintainer hasn't provided a clean fix for Emacs. - ## movemail.c will use 'maillock' when MAILDIR, HAVE_LIBMAIL and - ## HAVE_MAILLOCK_H are defined, so the following appears to be the - ## correct logic. -- fx - ## We must check for HAVE_LIBLOCKFILE too, as movemail does. - ## liblockfile is a Free Software replacement for libmail, used on - ## Debian systems and elsewhere. -rfr. - gnu-*) - mail_lock=3D"flock" - if test $have_mail =3D yes || test $have_lockfile =3D yes; then - test $ac_cv_header_maillock_h =3D yes && mail_lock=3Dno - fi - ;; + ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf= ) to + ## interlock access to the mail spool. The alternative is a lock file= named + ## /usr/spool/mail/$USER.lock. + mail_lock=3Dno + case $opsys in + aix4-2) mail_lock=3D"lockf" ;; + + gnu|freebsd|dragonfly|netbsd|openbsd|darwin) mail_lock=3D"flock" ;; + + ## On GNU/Linux systems, both methods are used by various mail progr= ams. + ## I assume most people are using newer mailers that have heard of f= lock. + ## Change this if you need to. + ## Debian contains a patch which says: "On Debian/GNU/Linux systems,= + ## configure gets the right answers, and that means *NOT* using floc= k. + ## Using flock is guaranteed to be the wrong thing. See Debian Polic= y + ## for details." and then uses '#ifdef DEBIAN'. Unfortunately the + ## Debian maintainer hasn't provided a clean fix for Emacs. + ## movemail.c will use 'maillock' when MAILDIR, HAVE_LIBMAIL and + ## HAVE_MAILLOCK_H are defined, so the following appears to be the + ## correct logic. -- fx + ## We must check for HAVE_LIBLOCKFILE too, as movemail does. + ## liblockfile is a Free Software replacement for libmail, used on + ## Debian systems and elsewhere. -rfr. + gnu-*) + mail_lock=3D"flock" + if test $have_mail =3D yes || test $have_lockfile =3D yes; then + test $ac_cv_header_maillock_h =3D yes && mail_lock=3Dno + fi ;; =20 - mingw32) - mail_lock=3D"none-needed" ;; -esac + mingw32) + mail_lock=3D"none-needed" ;; + esac =20 -BLESSMAIL_TARGET=3D -case "$mail_lock" in - flock) AC_DEFINE(MAIL_USE_FLOCK, 1, [Define if the mailer uses flock t= o interlock the mail spool.]) ;; + case $mail_lock in + flock) AC_DEFINE([MAIL_USE_FLOCK], [1], + [Define if the mailer uses flock to interlock the mail spool.]);; =20 - lockf) AC_DEFINE(MAIL_USE_LOCKF, 1, [Define if the mailer uses lockf t= o interlock the mail spool.]) ;; + lockf) AC_DEFINE([MAIL_USE_LOCKF], [1], + [Define if the mailer uses lockf to interlock the mail spool.]);; =20 - none-needed) ;; + none-needed) ;; =20 - *) BLESSMAIL_TARGET=3D"need-blessmail" ;; -esac -AC_SUBST(BLESSMAIL_TARGET) + *) BLESSMAIL_TARGET=3D"need-blessmail" ;; + esac +fi +AC_SUBST([BLESSMAIL_TARGET]) +AC_SUBST([LIBS_MAIL]) =20 OLD_LIBS=3D$LIBS LIBS=3D"$LIB_PTHREAD $LIB_MATH $LIBS" @@ -5469,4 +5485,21 @@ AC_DEFUN =20 AC_OUTPUT =20 +if test ! "$with_mailutils"; then + emacs_use_mailutils=3D"use '$0 --with-mailutils'" + case `(movemail --version) 2>/dev/null` in + *Mailutils*) ;; + *) emacs_use_mailutils=3D"install GNU Mailutils + and $emacs_use_mailutils";; + esac + if test "$with_pop" =3D yes; then + AC_MSG_WARN([This configuration installs a 'movemail' program +that retrieves POP3 email via only insecure channels. +To fix this you can $emacs_use_mailutils.]) + else + AC_MSG_NOTICE([This configuration installs a 'movemail' program that= cannot +retrieve POP3 email. You might want to $emacs_use_mailutils.]) + fi +fi + test "$MAKE" =3D make || AC_MSG_NOTICE([Now you can run '$MAKE'.]) diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index d463982..b64ec22 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1380,15 +1380,17 @@ Movemail your Rmail file (@pxref{Rmail Inbox}). When loaded for the first time, Rmail attempts to locate the @code{movemail} program and determine its version. There are two versions of the @code{movemail} program: the -native one, shipped with GNU Emacs (the Emacs version) and the one -included in GNU mailutils (the mailutils version, -@pxref{movemail,,,mailutils,GNU mailutils}). They support the same +GNU Mailutils version (@pxref{movemail,,,mailutils,GNU mailutils}), +and an Emacs-specific version that is built and installed unless Emacs +was configured using the @option{--with-mailutils} option. +The two @command{mailtool} versions support the same command line syntax and the same basic subset of options. However, the Mailutils version offers additional features. =20 - The Emacs version of @code{movemail} is able to retrieve mail from -the usual Unix mailbox formats and from remote mailboxes using the -POP3 protocol. + The Emacs version of @command{movemail} can retrieve mail from the +usual Unix mailbox formats. Although it can also use the POP3 +protocol, this is not recommended because it does not support POP3 via +encrypted TLS channels. =20 The Mailutils version is able to handle a wide set of mailbox formats, such as plain Unix mailboxes, @code{maildir} and @code{MH} @@ -1401,7 +1403,7 @@ Movemail @acronym{URL} is: =20 @smallexample -@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name} +@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name}[:@v= ar{port}] @end smallexample =20 @noindent @@ -1422,6 +1424,9 @@ Movemail @item host-or-file-name Hostname of the remote server for remote mailboxes or file name of a local mailbox. + +@item port +Optional port number, if not the default for that protocal. @end table =20 @noindent @@ -1429,19 +1434,20 @@ Movemail =20 @table @code @item mbox -Usual Unix mailbox format. In this case, neither @var{user} nor -@var{pass} are used, and @var{host-or-file-name} denotes the file name -of the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. +Usual Unix mailbox format. In this case, @var{user}, @var{pass} and +@var{port} are not used, and @var{host-or-file-name} denotes the file +name of the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. =20 @item mh -A local mailbox in the @acronym{MH} format. @var{user} and -@var{pass} are not used. @var{host-or-file-name} denotes the name of -@acronym{MH} folder, e.g., @code{mh://Mail/inbox}. +A local mailbox in the @acronym{MH} format. @var{user}, @var{pass} +and @var{port} are not used. @var{host-or-file-name} denotes the name +of @acronym{MH} folder, e.g., @code{mh://Mail/inbox}. =20 @item maildir -A local mailbox in the @acronym{maildir} format. @var{user} and -@var{pass} are not used, and @var{host-or-file-name} denotes the name of= -@code{maildir} mailbox, e.g., @code{maildir://mail/inbox}. +A local mailbox in the @acronym{maildir} format. @var{user}, +@var{pass} and @var{port} are not used, and @var{host-or-file-name} +denotes the name of @code{maildir} mailbox, e.g., +@code{maildir://mail/inbox}. =20 @item file Any local mailbox format. Its actual format is detected automatically @@ -1451,15 +1457,15 @@ Movemail A remote mailbox to be accessed via POP3 protocol. @var{user} specifies the remote user name to use, @var{pass} may be used to specify the user password, @var{host-or-file-name} is the name or IP -address of the remote mail server to connect to; e.g., -@code{pop://smith:guessme@@remote.server.net}. +address of the remote mail server to connect to, and @var{port} is the +port number; e.g., @code{pop://smith:guessme@@remote.server.net:995}. =20 @item imap A remote mailbox to be accessed via IMAP4 protocol. @var{user} specifies the remote user name to use, @var{pass} may be used to specify the user password, @var{host-or-file-name} is the name or IP -address of the remote mail server to connect to; -e.g., @code{imap://smith:guessme@@remote.server.net}. +address of the remote mail server to connect to, and @var{port} is the +port number; e.g., @code{imap://smith:guessme@@remote.server.net:993}. @end table =20 Alternatively, you can specify the file name of the mailbox to use. @@ -1483,44 +1489,40 @@ Remote Mailboxes @pindex movemail =20 Some sites use a method called POP for accessing users' inbox data -instead of storing the data in inbox files. By default, the @code{Emacs= -movemail} can work with POP (unless the Emacs @code{configure} script -was run with the option @samp{--without-pop}). - -Similarly, the Mailutils @code{movemail} by default supports POP, unless= -it was configured with the @samp{--disable-pop} option. - -Both versions of @code{movemail} only work with POP3, not with older -versions of POP. +instead of storing the data in inbox files. The Mailutils +@command{movemail} by default supports POP with TLS encryption. +Although the @command{Emacs movemail} supports unencrypted POP, this +is not recommended due to the lack of encryption. Both versions of +@command{movemail} work only with POP3, not with older versions of +POP. =20 @cindex @env{MAILHOST} environment variable @cindex POP mailboxes - No matter which flavor of @code{movemail} you use, you can specify + You can specify a POP inbox by using a POP @dfn{URL} (@pxref{Movemail}). A POP @acronym{URL} is of the form -@samp{pop://@var{username}@@@var{hostname}}, where -@var{hostname} is the host name or IP address of the remote mail +@samp{pop://@var{username}@@@var{hostname}:@var{port}}, where +@var{hostname} and @var{port} are the host name (or IP address) +and port number of the remote mail server and @var{username} is the user name on that server. Additionally, you may specify the password in the mailbox @acronym{URL}:= -@samp{pop://@var{username}:@var{password}@@@var{hostname}}. In this +@samp{pop://@var{username}:@var{password}@@@var{hostname}:@var{port}}. = In this case, @var{password} takes preference over the one set by @code{rmail-remote-password} (see below). This is especially useful if you have several remote mailboxes with different passwords. =20 For backward compatibility, Rmail also supports an alternative way of specifying remote POP mailboxes. Specifying an inbox name in the form -@samp{po:@var{username}:@var{hostname}} is equivalent to -@samp{pop://@var{username}@@@var{hostname}}. If you omit the +@samp{po:@var{username}:@var{hostname}:@var{port}} is equivalent to +@samp{pop://@var{username}@@@var{hostname}:@var{port}}. If you omit the= @var{:hostname} part, the @env{MAILHOST} environment variable specifies the machine on which to look for the POP server. =20 -@c FIXME mention --with-hesiod "support Hesiod to get the POP server hos= t"? - @cindex IMAP mailboxes Another method for accessing remote mailboxes is IMAP@. This method i= s supported only by the Mailutils @code{movemail}. To specify an IMAP mailbox in the inbox list, use the following mailbox @acronym{URL}: -@samp{imap://@var{username}[:@var{password}]@@@var{hostname}}. The +@samp{imap://@var{username}[:@var{password}]@@@var{hostname}:@var{port}}= =2E The @var{password} part is optional, as described above. =20 @vindex rmail-remote-password @@ -1550,9 +1552,7 @@ Remote Mailboxes =20 @cindex Kerberos POP authentication The @code{movemail} program installed at your site may support -Kerberos authentication (the Emacs @code{movemail} does so if Emacs was -configured with the option @code{--with-kerberos} or -@code{--with-kerberos5}). If it is supported, it is used by default +Kerberos authentication. If it is supported, it is used by default whenever you attempt to retrieve POP mail when @code{rmail-remote-password} and @code{rmail-remote-password-required} are unset. diff --git a/etc/NEWS b/etc/NEWS index 88ae7cf..f047aa8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -37,6 +37,12 @@ Use 'configure --with-gnutls=3Dno' to build even when = GnuTLS is missing. ** GnuTLS version 2.12.2 or later is now required, instead of merely version 2.6.6 or later. =20 +** The new option 'configure --with-mailutils' causes Emacs to rely on +GNU Mailutils 'movemail' to retrieve email. By default, the Emacs +build procedure continues to build and install a limited and insecure +'movemail' substitute. Although --with-mailutils is recommended, it +is not yet the default due to backward-compatibility concerns. + ** The new option 'configure --enable-gcc-warnings=3Dwarn-only' causes GCC to issue warnings without stopping the build. This behavior is now the default in developer builds. As before, use diff --git a/etc/PROBLEMS b/etc/PROBLEMS index b892320..eddae12 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -323,6 +323,7 @@ or set the variable 'cannot-suspend' to a non-nil val= ue. =20 *** movemail compiled with POP support can't connect to the POP server. =20 +This problem can occur if you do not configure --with-mailutils. Make sure that the 'pop' entry in /etc/services, or in the services NIS map if your machine uses NIS, has the same port number as the entry on the POP server. A common error is for the POP server to be diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index d0aa9cc..b2cd66c 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -100,6 +100,9 @@ bindir=3D # --libexecdir option to '../configure'. libexecdir=3D@libexecdir@ =20 +# Nonempty if Emacs can assume Mailutils is installed. +with_mailutils=3D@with_mailutils@ + # Directory for local state files for all programs. localstatedir=3D@localstatedir@ =20 @@ -160,7 +163,8 @@ INSTALLABLES =3D =20 # Things that Emacs runs internally, or during the build process, # which should not be installed in bindir. -UTILITIES =3D profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ +UTILITIES =3D profile${EXEEXT} hexl${EXEEXT} \ + $(if $(with_mailutils), , movemail${EXEEXT}) \ $(and $(use_gamedir), update-game-score${EXEEXT}) =20 DONT_INSTALL=3D make-docfile${EXEEXT} --=20 2.9.3 --------------07311B7A11C8C25159C3054D--