From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.bugs Subject: bug#16946: 24.3; Rmail behaviour with a username containing "@" Date: Sun, 06 Dec 2020 23:50:32 +0000 Message-ID: <87k0tufq9j.fsf@robertthorpeconsulting.com> References: <87siqwcazb.fsf@robertthorpeconsulting.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 16946@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 07 01:01:27 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1km3y1-0003bD-I5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Dec 2020 01:01:25 +0100 Original-Received: from localhost ([::1]:33182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km3y0-0001PA-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 19:01:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km3ox-0001Hp-CJ for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 18:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1km3ox-00035e-3N for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 18:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1km3ow-00050g-0h for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 18:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Thorpe Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Dec 2020 23:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16946 X-GNU-PR-Package: emacs Original-Received: via spool by 16946-submit@debbugs.gnu.org id=B16946.160729866919195 (code B ref 16946); Sun, 06 Dec 2020 23:52:01 +0000 Original-Received: (at 16946) by debbugs.gnu.org; 6 Dec 2020 23:51:09 +0000 Original-Received: from localhost ([127.0.0.1]:51755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1km3o5-0004zX-BW for submit@debbugs.gnu.org; Sun, 06 Dec 2020 18:51:09 -0500 Original-Received: from outbound-smtp26.blacknight.com ([81.17.249.194]:51119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1km3o3-0004z2-1x for 16946@debbugs.gnu.org; Sun, 06 Dec 2020 18:51:09 -0500 Original-Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp26.blacknight.com (Postfix) with ESMTPS id 9DC05CABAD for <16946@debbugs.gnu.org>; Sun, 6 Dec 2020 23:51:00 +0000 (GMT) Original-Received: (qmail 419 invoked from network); 6 Dec 2020 23:51:00 -0000 Original-Received: from unknown (HELO rt-inspiron-3480) (rt@robertthorpeconsulting.com@[109.76.74.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 6 Dec 2020 23:51:00 -0000 In-Reply-To: <87czznca5p.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 06 Dec 2020 14:54:26 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195194 Archived-At: Lars Ingebrigtsen writes: > Robert Thorpe writes: > >> I think it's caused by movemail from GNU Mailutils though. Mailutils >> can't deal with two "@" symbols (one in the username and another for the >> server). I can replicate this by using movemail on the command line >> without any Emacs involvement. I think this is a bug in mailutils. >> Would you agree? If so I'll report it. > > I'm not quite sure. As you point out: I think that the GNU Mailutils manual should at least mention that it's necessary. Ideally though, there should be another options format which splits up the information in a more sensible way. One where the server, username, port and password are all passed in separate options rather than one big one. I will send a message to bug-mailutils@gnu.org. >> I'm not sure that it would be possible for the Mailutils maintainers to >> fix it without changing the options format for the command. On the >> other hand I think the options format really should be changed. >> >> The kludge to fix this is to use "%40" in the email address instead of >> "@". That's what I've been using. > > So perhaps we should just fix Emacs to allow %40, and document that. > You said: > >> To solve this for myself I've edited the function >> rmail-insert-inbox-text just after this bit: >> ;; At this point, TOFILE contains the name to read: >> ;; Either the alternate name (if we renamed) >> ;; or the actual inbox (if not renaming). >> >> I've put in some code to substitute %40 for @ in tofile. That fixes the >> problem for me, but it's not a real fix. > > Could you submit a patch for that, so that we could see what that'd look > like? I forgot to tell you about that part of it. I don't need my work-around anymore. I think it's been fixed in mailutils. I don't see any fix in rmail-insert-inbox-text. The problem was the treatment of the %40. It appears in the filename "tofile" that's passed in Rmail. In the past, movemail decoded it to @ and created a file with @ in the name. That confused Rmail which didn't do that with it's tofile. So, I added (setq tofile (url-unhex-string tofile)) just before Rmail opens the file. Now though, movemail keeps the URL encoding in the filename, it keeps the %40 and doesn't change it to @. That solved that problem. But, you still have to put in %40 when setting the username, and the Rmail manual doesn't mention that. Perhaps it should, I can write a patch for that if you want. BR, Robert Thorpe