From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15014 invoked from network); 21 Apr 2021 15:22:36 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 21 Apr 2021 15:22:36 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZEgR-005T4P-4W for ml@inbox.vuxu.org; Wed, 21 Apr 2021 10:22:31 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1lZEgQ-009D7R-He for ml@inbox.vuxu.org; Wed, 21 Apr 2021 10:22:30 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZEgO-009D7J-8M for ding@lists.math.uh.edu; Wed, 21 Apr 2021 10:22:28 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZEgK-0052uB-Ch for ding@lists.math.uh.edu; Wed, 21 Apr 2021 10:22:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=z47vM8N7dUlug4c8uZpCHRLqGwt9F2uX0o2Xik8l5dU=; b=h3cqpUXfswiLStfeIVhifoeO+i DHMD1DfXk2DhmJoSikZjPYVtwpGT4nb7n53BmkAqyF+AXLYaykEtizyR1hdAAbgqXDu0EgM/+hICq V9O2nZiTlitATbVAI7UoW/lmpucYyLtp8G7g5nBVo1LZL5zuMFGrX6p91t8FJI6+534k=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZEgB-0004bu-9m for ding@gnus.org; Wed, 21 Apr 2021 17:22:20 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lZEgA-0008Ri-2M for ding@gnus.org; Wed, 21 Apr 2021 17:22:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Wayne Harris Subject: Re: v5.13: on cancel and supersedes dependency on message-make-sender Date: Wed, 21 Apr 2021 12:21:58 -0300 Message-ID: <86im4fy86h.fsf@example.com> References: <86fszp442l.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Cancel-Lock: sha1:FpFgkOw4yXpqitxSxMAXH5wU2HY= List-ID: Precedence: bulk Wayne Harris writes: > I can't currently cancel or supersede articles because > > message-make-sender > > always tells Gnus I don't own the article. > > (defun message-make-sender () > "Return the \"real\" user address. > This function tries to ignore all user modifications, and > give as trustworthy answer as possible." > (concat (user-login-name) "@" (system-name))) Forgive me. This is not the code I saw in my own GNU Emacs. The correct code I see is: --8<---------------cut here---------------start------------->8--- (defun message-is-yours-p () "Non-nil means current article is yours. If you have added `cancel-messages' to `message-shoot-gnksa-feet', all articles are yours except those that have Cancel-Lock header not belonging to you. Instead of shooting GNKSA feet, you should modify `message-alternative-emails' to match all of yours addresses." ;; Canlock-logic as suggested by Per Abrahamsen ;; ;; ;; IF article has cancel-lock THEN ;; IF we can verify it THEN ;; issue cancel ;; ELSE ;; error: cancellock: article is not yours ;; ELSE ;; Use old rules, comparing sender... (save-excursion (save-restriction (message-narrow-to-head-1) (if (and (message-fetch-field "Cancel-Lock") (message-gnksa-enable-p 'canlock-verify)) (if (null (canlock-verify)) t (error "Failed to verify Cancel-lock: This article is not yours")) (let (sender from) (or (message-gnksa-enable-p 'cancel-messages) (and (setq sender (message-fetch-field "sender")) (string-equal (downcase sender) (downcase (message-make-sender)))) ;; Email address in From field equals to our address (and (setq from (message-fetch-field "from")) (string-equal (downcase (car (mail-header-parse-address from))) (downcase (car (mail-header-parse-address (message-make-from)))))) ;; Email address in From field matches ;; 'message-alternative-emails' regexp or function. (and from message-alternative-emails (cond ((functionp message-alternative-emails) (funcall message-alternative-emails (mail-header-parse-address from))) (t (string-match message-alternative-emails (car (mail-header-parse-address from)))))))))))) --8<---------------cut here---------------end--------------->8--- Despite it offering a nice strategy, it doesn't seem to work work for me. So, as a temporary fix, I disabled it in message-supersede. I will eventually look into it and see what might be happening. --8<---------------cut here---------------start------------->8--- (defun message-supersede () "Start composing a message to supersede the current message. This is done simply by taking the old article and adding a Supersedes header line with the old Message-ID." (interactive) (let ((cur (current-buffer))) ;; Check whether the user owns the article that is to be superseded. (unless t ;(message-is-yours-p) (error "This article is not yours")) ;; Get a normal message buffer. (message-pop-to-buffer (message-buffer-name "supersede")) (insert-buffer-substring cur) (mime-to-mml) (message-narrow-to-head-1) ;; Remove unwanted headers. (when message-ignored-supersedes-headers (message-remove-header message-ignored-supersedes-headers t)) (goto-char (point-min)) (if (not (re-search-forward "^Message-ID: " nil t)) (error "No Message-ID in this article") (replace-match "Supersedes: " t t)) (goto-char (point-max)) (insert mail-header-separator) (widen) (forward-line 1))) --8<---------------cut here---------------end--------------->8---