From unknown Wed Jun 18 23:16:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#66602 <66602@debbugs.gnu.org> To: bug#66602 <66602@debbugs.gnu.org> Subject: Status: 29.1; smtpmail-send-it fails to authenticate using auth-sources Reply-To: bug#66602 <66602@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:16:47 +0000 retitle 66602 29.1; smtpmail-send-it fails to authenticate using auth-sourc= es reassign 66602 emacs submitter 66602 Jens =C3=96stlund severity 66602 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 02:29:45 2023 Received: (at submit) by debbugs.gnu.org; 18 Oct 2023 06:29:45 +0000 Received: from localhost ([127.0.0.1]:33063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt03r-0005x6-2S for submit@debbugs.gnu.org; Wed, 18 Oct 2023 02:29:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qszse-0005fu-FN for submit@debbugs.gnu.org; Wed, 18 Oct 2023 02:18:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qszs5-0002qg-SC for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 02:17:36 -0400 Received: from out-207.mta1.migadu.com ([2001:41d0:203:375::cf]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qszs1-0006pm-VS for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 02:17:33 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iensu.me; s=key1; t=1697609839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/K0FLdRszGU7U6MXtoMifLU5mze9p3CEYCnMYW8pdc=; b=wb3CEXNEJmO/mxybPYow6+nmLXMGjvMk1Q2QdfZMd/6g6G/QRRLr0379iC9IC74x0ViwtE gpJm3m/xspSmRtdjObxlmXaCNYpkayCbHT0WN5HW31rGHUkDS2nlfpVrn7ragj0HPmYQT5 TEC7mgpC+KeoSXUl43OnTmFc3XTTIWc= From: =?utf-8?Q?Jens_=C3=96stlund?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: 29.1; smtpmail-send-it fails to authenticate using auth-sources Message-Id: Date: Wed, 18 Oct 2023 08:17:07 +0200 To: bug-gnu-emacs@gnu.org X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::cf; envelope-from=jens@iensu.me; helo=out-207.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 18 Oct 2023 02:29:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) When sending an email with 'smtpmail-send-it' the function = 'smtpmail-try-auth-methods' fails to find the matching entry. Using = 'edebug' I've found that the reason is this piece of code where the = 'port' is converted to a string (smtpmail.el.gz:533-536): '(setq port (if port (format "%s" port) "smtp"))' When the 'port' is later passed to 'auth-source-search' on line 541 it = fails to find any matching entries since ':port' is matched as a number, = not a string. If I remove the above piece of code, so that 'port' is = never turned into a string, sending the email works as expected. Maybe = the best solution is to make 'auth-source-search' match both numeric and = string values, at least for the ':port' argument. SMTP session trace: '220 mailrelay6 ESMTP 250-mailrelay6 250-PIPELINING 250-CHUNKING 250-SIZE 104857600 250-AUTH LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250 8BITMIME MAIL FROM: SIZE=3D322 550 5.7.1 [M1] Authentication required = (431ff6c7-6d37-11ee-accc-23968f462fbe) QUIT 221 2.0.0 Bye Process smtpmail connection broken by remote peer=E2=80=99 Best regards, Jens =C3=96stlund In GNU Emacs 29.1 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.5 (Build 22G74)) Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.5 Configured using: 'configure --prefix=3D/nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1 --disable-build-details --with-modules --disable-ns-self-contained --with-ns --with-native-compilation --with-tree-sitter' Configured features: ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP ZLIB Important settings: value of $EMACSLOADPATH: = /nix/store/2bsnl0w6hlgwj1h73m0nvzsf1awldxk7-emacs-packages-deps/share/emac= s/site-lisp: value of $EMACSNATIVELOADPATH: = /nix/store/2bsnl0w6hlgwj1h73m0nvzsf1awldxk7-emacs-packages-deps/share/emac= s/native-lisp: locale-coding-system: utf-8-unix Major mode: mu4e:main Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t editorconfig-mode: t pdf-occur-global-minor-mode: t mu4e-search-minor-mode: t mu4e-update-minor-mode: t mu4e-context-minor-mode: t mu4e-modeline-mode: t erc-track-mode: t erc-ring-mode: t erc-netsplit-mode: t erc-menu-mode: t erc-match-mode: t erc-list-mode: t erc-autojoin-mode: t erc-autoaway-mode: t erc-hl-nicks-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-keep-place-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-scrolltobottom-mode: t erc-networks-mode: t global-auto-revert-mode: t savehist-mode: t vertico-mode: t corfu-history-mode: t corfu-echo-mode: t global-corfu-mode: t corfu-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t which-key-mode: t windmove-mode: t yas-global-mode: t yas-minor-mode: t marginalia-mode: t delete-selection-mode: t age-encryption-mode: t shell-dirtrack-mode: t recentf-mode: t pixel-scroll-mode: t direnv-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t overwrite-mode: overwrite-mode-binary Load-path shadows: = /nix/store/n07y9g419wxwbklyzwfh818rw86spk9k-emacs-packages-deps/share/emac= s/site-lisp/site-start hides = /nix/store/2bsnl0w6hlgwj1h73m0nvzsf1awldxk7-emacs-packages-deps/share/emac= s/site-lisp/site-start = /nix/store/n07y9g419wxwbklyzwfh818rw86spk9k-emacs-packages-deps/share/emac= s/site-lisp/site-start hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/site-li= sp/site-start /Users/iensu/.emacs.d/elpa/transient-20230919.2146/transient hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/29.1/li= sp/transient = /nix/store/n07y9g419wxwbklyzwfh818rw86spk9k-emacs-packages-deps/share/emac= s/site-lisp/elpa/xref-1.6.3/xref hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/29.1/li= sp/progmodes/xref = /nix/store/n07y9g419wxwbklyzwfh818rw86spk9k-emacs-packages-deps/share/emac= s/site-lisp/elpa/project-0.10.0/project hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/29.1/li= sp/progmodes/project /Users/iensu/.emacs.d/elpa/seq-2.24/seq hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/29.1/li= sp/emacs-lisp/seq = /nix/store/n07y9g419wxwbklyzwfh818rw86spk9k-emacs-packages-deps/share/emac= s/site-lisp/elpa/let-alist-1.0.6/let-alist hides = /nix/store/42jvqrs42gs59rvmcf996d5x5jrmda8v-emacs-29.1/share/emacs/29.1/li= sp/emacs-lisp/let-alist Features: (shadow emacsbug edebug debug backtrace magit-extras treemacs-magit magit-bookmark magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff git-commit log-edit pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm expand-region subword-mode-expansions text-mode-expansions cc-mode-expansions the-org-mode-expansions js-mode-expansions html-mode-expansions css-mode-expansions er-basic-expansions expand-region-core expand-region-custom reveal network-stream mailalias flyspell-popup flyspell ispell tabify man sort gnus-cite smiley shr-color mm-archive mail-extr textsec uni-scripts idna-mapping uni-confusable textsec-check qp epa-file conf-mode cl-print so-long view misearch multi-isearch dabbrev cape vc-git vc-dispatcher shortdoc mu4e-speedbar mu4e-contrib eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util mu4e-icalendar gnus-icalendar org-capture icalendar diary-lib diary-loaddefs help-fns radix-tree tramp-cmds cursor-sensor rainbow-delimiters editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch hideshow display-line-numbers cap-words superword subword hl-todo cus-start checkdoc lisp-mnt flymake-proc flymake highlight-indentation yaml-ts-mode wat-mode wat-mode-macro wat-mode-font-lock typescript-ts-mode toml-ts-mode terraform-mode hcl-mode separedit calc-misc markdown-toc smartparens-markdown markdown-mode edit-indirect json-ts-mode add-node-modules-path smartparens-javascript js go-ts-mode fish-mode dockerfile-ts-mode csharp-mode c-ts-common cc-langs sh-script executable emmet-mode cl css-mode treesit smie smartparens-html sgml-mode facemenu eww url-queue mm-url pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc pdf-tools pdf-view jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif socks nsm elpher mu4e mu4e-org mu4e-notification notifications mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file svg xml dom flow-fill mu4e-contacts mu4e-update mu4e-folders mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars mu4e-helpers mu4e-config mu4e-window message sendmail yank-media puny rfc822 mml mml-sec epa derived epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader mu4e-obsolete erc-track erc-ring erc-netsplit erc-menu erc-match erc-list erc-pcomplete erc-join erc-autoaway erc-hl-nicks erc-button erc-fill erc-stamp erc-goodies erc erc-backend erc-networks erc-common erc-compat erc-loaddefs org-tree-slide org-timer org-clock org-superstar ox-gfm ox-texinfo ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox ob-calc calc-store calc-trail calc-ext calc calc-loaddefs calc-macs ob-C smartparens-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-shell org-protocol ob-js org-tempo tempo org-indent ob-restclient restclient denote-org-dblock embark-org org-element org-persist xdg org-id org-refile avl-tree generator smartparens-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat org-macs denote vc-use-package autorevert prettier-js flymake-eslint orderless savehist vertico corfu-history corfu-echo corfu treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-tags imenu treemacs-interface treemacs-persistence treemacs-filewatch-mode filenotify treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture inline hl-line treemacs-logging treemacs-customization treemacs-macros desktop frameset modus-vivendi-tinted-theme modus-themes all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons which-key windmove speedbar ezimage dframe dumb-jump popup xref yasnippet wgrep-deadgrep wgrep grep deadgrep spinner dired dired-loaddefs server pinentry pretty-hydra s hydra lv embark-consult consult embark ffap marginalia compat compat-29 visual-fill-column emojify apropos tar-mode arc-mode archive-mode ht synosaurus ido multi-vterm project vterm bookmark face-remap compile text-property-search color term disp-table ehelp find-func vterm-module term/xterm xterm xterm-color smartparens-config smartparens-text smartparens loadhist edmacro iedit iedit-lib mc-hide-unmatched-lines-mode mc-mark-more thingatpt mc-cycle-cursors multiple-cursors-core advice rect kmacro delsel age tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-osc ansi-color parse-time iso8601 time-date format-spec rfc6068 recentf tree-widget finder-inf pixel-scroll cua-base ring comp comp-cstr warnings rx direnv diff-mode dash exec-path-from-shell cl-extra help-mode cus-edit pp cus-load icons wid-edit use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core add-node-modules-path-autoloads age-autoloads all-the-icons-autoloads cape-autoloads corfu-autoloads deadgrep-autoloads denote-autoloads direnv-autoloads dumb-jump-autoloads editorconfig-autoloads elpher-autoloads embark-consult-autoloads consult-autoloads embark-autoloads emmet-mode-autoloads emojify-autoloads erc-hl-nicks-autoloads exec-path-from-shell-autoloads expand-region-autoloads fish-mode-autoloads flymake-eslint-autoloads flymake-shellcheck-autoloads flyspell-popup-autoloads forge-autoloads closql-autoloads emacsql-autoloads ghub-autoloads highlight-indentation-autoloads hl-todo-autoloads iedit-autoloads lsp-ui-autoloads lsp-mode-autoloads f-autoloads marginalia-autoloads markdown-toc-autoloads markdown-mode-autoloads modus-themes-autoloads multiple-cursors-autoloads nix-mode-autoloads ob-restclient-autoloads orderless-autoloads org-superstar-autoloads org-tree-slide-autoloads ox-gfm-autoloads pinentry-autoloads popup-autoloads prettier-js-autoloads pretty-hydra-autoloads rainbow-delimiters-autoloads rainbow-mode-autoloads restclient-autoloads rjsx-mode-autoloads js2-mode-autoloads rust-mode-autoloads scss-mode-autoloads separedit-autoloads edit-indirect-autoloads smartparens-autoloads spinner-autoloads synosaurus-autoloads terraform-mode-autoloads hcl-mode-autoloads treemacs-magit-autoloads magit-autoloads pcase magit-section-autoloads git-commit-autoloads transient-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads s-autoloads dash-autoloads treepy-autoloads vc-use-package-autoloads vertico-autoloads visual-fill-column-autoloads wat-mode-autoloads web-mode-autoloads which-key-autoloads with-editor-autoloads compat-autoloads seq-autoloads xterm-color-autoloads yaml-autoloads yasnippet-autoloads info mu4e-autoloads multi-vterm-autoloads pdf-tools-autoloads project-autoloads tablist-autoloads vterm-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1102029 801206) (symbols 48 65201 353) (strings 32 316422 42434) (string-bytes 1 10559472) (vectors 16 158095) (vector-slots 8 5148769 650640) (floats 8 1326 2766) (intervals 56 21611 11722) (buffers 984 58)) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 07:55:51 2023 Received: (at 66602) by debbugs.gnu.org; 18 Oct 2023 11:55:51 +0000 Received: from localhost ([127.0.0.1]:33386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt59T-0005FK-5v for submit@debbugs.gnu.org; Wed, 18 Oct 2023 07:55:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt59Q-0005F2-OG for 66602@debbugs.gnu.org; Wed, 18 Oct 2023 07:55:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt58u-0001d4-WD; Wed, 18 Oct 2023 07:55:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SZmtIrneGDHuT7yefipzvpt8XDZgAaP2xHXSC8iV6GQ=; b=REB/StIJiKzD5rnADrBO 09KDbgDwq5mJursaUKeJS4JXTf6tdIqrV3VdrK9Sh7kCeGUQJVLvJA6u0CMrxvcMoS8hMh3mVGWou 8HgotAWsZxzAAlSmFVoKnRcgwvKg8HbhbQA2zS2sNkSBEMkmvZTrPq7DKtT4RqAzLym1M97ZWb2Tf YgUTxHXEIeki/+pHWxJDCNdCIkzJsExJAYvJG5BZVm6HtcDJ1WqwGwySpr+6A/6gYX/Pm3SmnxZ7p NTb2XG2X5acK6+hXAA8W9/tERtAPKXvCbVehRDhI7VEJ80sm025Bhktplg/3Dgf0UsrECnlTLj3Bz xHqi8tAQLzbpdw==; Date: Wed, 18 Oct 2023 14:55:06 +0300 Message-Id: <838r80no11.fsf@gnu.org> From: Eli Zaretskii To: Jens =?utf-8?Q?=C3=96stlund?= In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#66602: 29.1; smtpmail-send-it fails to authenticate using auth-sources References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66602 Cc: 66602@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 18 Oct 2023 08:17:07 +0200 > From: Jens Östlund via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > When sending an email with 'smtpmail-send-it' the function 'smtpmail-try-auth-methods' fails to find the matching entry. Using 'edebug' I've found that the reason is this piece of code where the 'port' is converted to a string (smtpmail.el.gz:533-536): > > '(setq port > (if port > (format "%s" port) > "smtp"))' > > When the 'port' is later passed to 'auth-source-search' on line 541 it fails to find any matching entries since ':port' is matched as a number, not a string. If I remove the above piece of code, so that 'port' is never turned into a string, sending the email works as expected. Maybe the best solution is to make 'auth-source-search' match both numeric and string values, at least for the ':port' argument. > > SMTP session trace: > > '220 mailrelay6 ESMTP > 250-mailrelay6 > 250-PIPELINING > 250-CHUNKING > 250-SIZE 104857600 > 250-AUTH LOGIN PLAIN > 250-ENHANCEDSTATUSCODES > 250 8BITMIME > MAIL FROM: SIZE=322 > 550 5.7.1 [M1] Authentication required (431ff6c7-6d37-11ee-accc-23968f462fbe) > QUIT > 221 2.0.0 Bye > > Process smtpmail connection broken by remote peer’ Thanks. I guess I'm missing something, because I use smtpmail with authentication and a specific port all the time without any trouble. So maybe show the entry from your ~/.authinfo? Also, can you point me to the place where you see that port is matched as a number? See also bug#55199, where a similar problem was fixed, and the fix should be in Emacs 29.1. Maybe you have a stale auth-sources.elc? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 09:16:42 2023 Received: (at 66602-done) by debbugs.gnu.org; 18 Oct 2023 13:16:42 +0000 Received: from localhost ([127.0.0.1]:33451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt6Pi-0007z5-DM for submit@debbugs.gnu.org; Wed, 18 Oct 2023 09:16:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt6Pf-0007yr-Hl for 66602-done@debbugs.gnu.org; Wed, 18 Oct 2023 09:16:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt6P9-0001Sg-IN; Wed, 18 Oct 2023 09:16:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MOZcYP1/ODXDWfyDAUUqypnlz6RtaAc0Y0OHApZHwNY=; b=Nd4GIYBd30OtVwslNvgH bZqYy/ScXiQcOK1cnHL8Q+kjZ6vbV+HxOx24DsUSXI0YIn9NYYuOQgwaVXPTtd0reqjGFzb16G3T2 NpFqVuu5wPGSpZCGF4iMMghOmsO0jMrOwktnupXroMjQ+tWLOWBalyANElhCV+5KyYNuXABhPrmuC rOLsTcLouO9jhRTPvOq5lbSiT3JGxiLCZDEhyRMO+lVh9MXe4KOvOJ93sRGt6v7Wp6DLKPyQaiHKA s6AkB45Y4meknp0d2TSrV1FAHvnGx8RfnQ/r8XmNuA6OpCDWxYO77Rn68wPLTqodO74vn1N8HkLbo wKj7EKPxTRFDAA==; Date: Wed, 18 Oct 2023 16:15:54 +0300 Message-Id: <835y34nkad.fsf@gnu.org> From: Eli Zaretskii To: Jens =?utf-8?Q?=C3=96stlund?= In-Reply-To: (message from Jens =?utf-8?Q?=C3=96stlund?= on Wed, 18 Oct 2023 14:51:27 +0200) Subject: Re: bug#66602: 29.1; smtpmail-send-it fails to authenticate using auth-sources References: <838r80no11.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66602-done Cc: 66602-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Jens Östlund > Cc: 66602@debbugs.gnu.org > Date: Wed, 18 Oct 2023 14:51:27 +0200 > > > Eli Zaretskii writes: > > > I guess I'm missing something, because I use smtpmail with > > authentication and a specific port all the time without any trouble. > > So maybe show the entry from your ~/.authinfo? > > > > Also, can you point me to the place where you see that port is matched > > as a number? See also bug#55199, where a similar problem was fixed, > > and the fix should be in Emacs 29.1. Maybe you have a stale > > auth-sources.elc? > > Indeed seem to have been a stale auth-sources.elc file. I recompiled the file and now everything works as expected. Thank you for your quick response, and sorry for taking up your time! Thanks, I'm therefore closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 09:27:00 2023 Received: (at 66602) by debbugs.gnu.org; 18 Oct 2023 13:27:00 +0000 Received: from localhost ([127.0.0.1]:33461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt6Zf-0008J0-IJ for submit@debbugs.gnu.org; Wed, 18 Oct 2023 09:27:00 -0400 Received: from out-196.mta0.migadu.com ([2001:41d0:1004:224b::c4]:55286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt63G-0007Js-0n for 66602@debbugs.gnu.org; Wed, 18 Oct 2023 08:53:34 -0400 References: <838r80no11.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iensu.me; s=key1; t=1697633581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=64PRw+dPDc0CeMOJmTnkbhedMXC5AqxzuytT9QFDWaI=; b=TIUXDAzVvOQqfA5AQ1gFvdwGo31AHNOdR2uLcFhEetMPQzft+H153G/lHdeDAuJNevye5G ajfUofOfnH4ZJNZ0wLS4RekbOFAZb1GdzOcvsSfg8tMVuyQwTizRRRiu7I9POZ5xkiTq2W q46APrY2ivPZiRmFAHV9YULtTvLeyLM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jens =?utf-8?Q?=C3=96stlund?= To: Eli Zaretskii Subject: Re: bug#66602: 29.1; smtpmail-send-it fails to authenticate using auth-sources Date: Wed, 18 Oct 2023 14:51:27 +0200 In-reply-to: <838r80no11.fsf@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66602 X-Mailman-Approved-At: Wed, 18 Oct 2023 09:26:58 -0400 Cc: 66602@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Date: Wed, 18 Oct 2023 08:17:07 +0200 >> From: Jens =C3=96stlund via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> When sending an email with 'smtpmail-send-it' the function 'smtpmail-try= -auth-methods' fails to find the matching entry. Using 'edebug' I've found = that the reason is this piece of code where the 'port' is converted to a st= ring (smtpmail.el.gz:533-536): >> >> '(setq port >> (if port >> (format "%s" port) >> "smtp"))' >> >> When the 'port' is later passed to 'auth-source-search' on line 541 it f= ails to find any matching entries since ':port' is matched as a number, not= a string. If I remove the above piece of code, so that 'port' is never tur= ned into a string, sending the email works as expected. Maybe the best solu= tion is to make 'auth-source-search' match both numeric and string values, = at least for the ':port' argument. >> >> SMTP session trace: >> >> '220 mailrelay6 ESMTP >> 250-mailrelay6 >> 250-PIPELINING >> 250-CHUNKING >> 250-SIZE 104857600 >> 250-AUTH LOGIN PLAIN >> 250-ENHANCEDSTATUSCODES >> 250 8BITMIME >> MAIL FROM: SIZE=3D322 >> 550 5.7.1 [M1] Authentication required (431ff6c7-6d37-11ee-accc-23968f46= 2fbe) >> QUIT >> 221 2.0.0 Bye >> >> Process smtpmail connection broken by remote peer=E2=80=99 > > Thanks. > > I guess I'm missing something, because I use smtpmail with > authentication and a specific port all the time without any trouble. > So maybe show the entry from your ~/.authinfo? > > Also, can you point me to the place where you see that port is matched > as a number? See also bug#55199, where a similar problem was fixed, > and the fix should be in Emacs 29.1. Maybe you have a stale > auth-sources.elc? Indeed seem to have been a stale auth-sources.elc file. I recompiled the fi= le and now everything works as expected. Thank you for your quick response,= and sorry for taking up your time! Cheers, Jens From unknown Wed Jun 18 23:16:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 Nov 2023 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator