From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vladimir Nikishkin Newsgroups: gmane.emacs.help Subject: Can't send mail with smtpmail "any more". (Gmail and other providers) Date: Tue, 27 Oct 2020 12:49:24 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39557"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 27 05:50:20 2020 Return-path: Envelope-to: geh-help-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 1kXGw8-000ACg-2d for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 05:50:20 +0100 Original-Received: from localhost ([::1]:59632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXGw7-00015L-0K for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 00:50:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXGvV-00014r-OO for help-gnu-emacs@gnu.org; Tue, 27 Oct 2020 00:49:41 -0400 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:45652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXGvT-0005eX-4o for help-gnu-emacs@gnu.org; Tue, 27 Oct 2020 00:49:41 -0400 Original-Received: by mail-lf1-x129.google.com with SMTP id r127so579766lff.12 for ; Mon, 26 Oct 2020 21:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=n7t2vv5NCl1XSgVDO9StGEAMzkklpOyCPf5XXQj1yZk=; b=sLTLwEQ+OAFpnppttdTfckjRjEJ+DJ31noCm3ndO+hA9tnAO9Fe0aroxc6sL5p2hrb mgpCLwYuzDCuGvJyHnsOKw1s5nK737ploEaYL+v8ATG7nlaCXr+DN1vddQ92Z7XHAicf paXpYG1+4xZ38vM/pHCEbT0+M/CMTx1ZZIWOwj/PyVbYO8uj2yIqswMhxTuZC9JBCxuJ 4VfU86wKxxUpjJ3qqUEXo46xDNVLVejLZQ/JC/I96s62CXpjtO+duc3oTI3pzDBcJSxj 30Pqov3OQu2M2gcmmScLJi7cdt2kuYQlETeuKZGXfKjAmENjdjIhyq+v4TBxgl0ZGd1a k2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=n7t2vv5NCl1XSgVDO9StGEAMzkklpOyCPf5XXQj1yZk=; b=fzOdB38JkKHNVZY9JzknrmWAqOM+e7ziZbjfgQ459X0kph6ldAICWb5clHSP2UbZkz goBPpifSgcy8TV6tZr8l2p37Jg+lYqXz0CWu4nxuzE7cBfcpVwwMPcM7HWl5yCfGJ1RD zrn4r1FrT4pw4KGR8JqZMxgH0zJ29fX79BAnVSNceDmmZhgg7zAEEqamyKA0ycwyqq2r XKnd0jP7X2cXP7OmJD1+aTpSNxfn6x0/lJp3b6A3bR3sueCuoHCfNS49ZRHHourJ7ezt bPgSMtOzgO8efDGh65UPfjXdke5ynHofFgXRfL+ZHcV4n5ODqxPOvoC94jGK4y+IT9Ex bjUg== X-Gm-Message-State: AOAM531Fr8zNwehnJOzXL3TWd/Ghzt3KztSVDxvvLkssNtd6x8yCkz8p +0f2vDxP80hLoObSGutzWr4NbtQs+RtyQZlK6fxHuO284jA= X-Google-Smtp-Source: ABdhPJwT53VlvHcoU2Qot1A3ZBuuxmRbLUW922Xj4KcmLaY/5GI+b+rIWH1k1bf5oAmqiY+dPUVqWaK1SRAiMrblO8c= X-Received: by 2002:a19:bed7:: with SMTP id o206mr147509lff.360.1603774176784; Mon, 26 Oct 2020 21:49:36 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=lockywolf@gmail.com; helo=mail-lf1-x129.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124729 Archived-At: `Hello, everyone. I had a setup for sending mail with Emacs' smtpmail: ``` (setq send-mail-function 'smtpmail-send-it) (setq smtpmail-smtp-server "smtp.gmail.com") (setq smtpmail-default-smtp-server "smtp.gmail.com") (setq smtpmail-smtp-service 587) (setq smtpmail-stream-type 'starttls) (setq smtpmail-starttls-credentials '("smtp.gmail.com" 587)) (setq smtpmail-smtp-user "lockywolf") (setq smtpmail-auth-credentials '("smtp.gmail.com" 587)) (require 'starttls) (setq starttls-use-gnutls t) (setq smtpmail-debug-info t) (setq smtpmail-debug-verb t) (require 'smtpmail) ``` This used to work until today. Today, this setup stopped working for some reason. Initially I blamed it on GMail, but it seems that other providers don't work tool. The symptom is the following: I open message mode by M-x message-mail RET , type in the from: and to: as the same, my own, address, and send it with C-c C-c. The system displays the message: ``` Sending via mail... ``` and freezes. This freeze is "quitable" with C-g. If I set "toggle-debug-on-quit", the stack trace is the following: ``` Debugger entered--Lisp error: (quit) make-network-process(:name "smtpmail" :buffer # :host "smtp.gmail.com" :service 587) network-stream-open-starttls("smtpmail" # "smtp.gmail.com" 587 (:type starttls :return-list t :warn-unless-encrypted nil :capability-command "EHLO delllaptop.lockywolf.net\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function #f(compiled-function (capabilities) #) :client-certificate t :use-starttls-if-possible t)) open-network-stream("smtpmail" # "smtp.gmail.com" 587 :type starttls :return-list t :warn-unless-encrypted nil :capability-command "EHLO delllaptop.lockywolf.net\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function #f(compiled-function (capabilities) #) :client-certificate t :use-starttls-if-possible t) smtpmail-via-smtp(("") #) smtpmail-send-it() message-use-send-mail-function() message--default-send-mail-function() message-multi-smtp-send-mail() message--send-mail-maybe-partially() message-send-mail(nil) message-send-via-mail(nil) message-send(nil) message-send-and-exit(nil) funcall-interactively(message-send-and-exit nil) call-interactively(message-send-and-exit nil nil) command-execute(message-send-and-exit) ``` I have redacted out the email address. Connecting to the process with gdb and asking for a stack trace produces: ``` lockywolf@delllaptop:~$ gdb -p $(pgrep emacs) GNU gdb (GDB) 9.2 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-slackware-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 13559 [New LWP 13560] [New LWP 13561] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". --Type for more, q to quit, c to continue without paging--c 0x00007f268a51207e in pselect () from /lib64/libc.so.6 (gdb) thread apply all bt Thread 3 (Thread 0x7f268380f700 (LWP 13561)): #0 0x00007f268a50fe9f in poll () at /lib64/libc.so.6 #1 0x00007f268c4f4bce in () at /usr/lib64/libglib-2.0.so.0 #2 0x00007f268c4f4f33 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0 #3 0x00007f268c73b936 in () at /usr/lib64/libgio-2.0.so.0 #4 0x00007f268c51c61d in () at /usr/lib64/libglib-2.0.so.0 #5 0x00007f268a6e406b in start_thread () at /lib64/libpthread.so.0 #6 0x00007f268a51b72f in clone () at /lib64/libc.so.6 Thread 2 (Thread 0x7f2688975700 (LWP 13560)): #0 0x00007f268a50fe9f in poll () at /lib64/libc.so.6 #1 0x00007f268c4f4bce in () at /usr/lib64/libglib-2.0.so.0 #2 0x00007f268c4f4cef in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 #3 0x00007f268c4f4d41 in () at /usr/lib64/libglib-2.0.so.0 #4 0x00007f268c51c61d in () at /usr/lib64/libglib-2.0.so.0 #5 0x00007f268a6e406b in start_thread () at /lib64/libpthread.so.0 #6 0x00007f268a51b72f in clone () at /lib64/libc.so.6 --Type for more, q to quit, c to continue without paging--c Thread 1 (Thread 0x7f2689455640 (LWP 13559)): #0 0x00007f268a51207e in pselect () at /lib64/libc.so.6 #1 0x00000000005aef85 in () #2 0x00000000005af9d2 in () #3 0x0000000000572883 in () #4 0x00000000005a6bb8 in () #5 0x00000000005727d7 in () #6 0x00000000005a6bb8 in () #7 0x00000000005727d7 in () #8 0x00000000005a6bb8 in () #9 0x00000000005727d7 in () #10 0x00000000005a6bb8 in () #11 0x00000000005727d7 in () #12 0x00000000005a6bb8 in () #13 0x00000000005727d7 in () #14 0x00000000005a6bb8 in () #15 0x00000000005727d7 in () #16 0x00000000005a6bb8 in () #17 0x00000000005727d7 in () #18 0x00000000005a6bb8 in () #19 0x00000000005727d7 in () #20 0x00000000005a6bb8 in () #21 0x00000000005727d7 in () #22 0x00000000005a6bb8 in () #23 0x00000000005727d7 in () #24 0x00000000005a6bb8 in () #25 0x00000000005727d7 in () #26 0x00000000005a6bb8 in () #27 0x00000000005727d7 in () #28 0x000000000056f2e4 in () #29 0x0000000000572883 in () #30 0x0000000000570590 in () #31 0x0000000000572883 in () #32 0x00000000005a6bb8 in () #33 0x00000000005727d7 in () #34 0x000000000057292a in () #35 0x000000000050c45d in () #36 0x0000000000571bef in () #37 0x00000000004fd648 in () #38 0x0000000000571b53 in () #39 0x00000000004fd5d6 in () #40 0x0000000000500aef in () #41 0x0000000000500e0d in () #42 0x0000000000426642 in () #43 0x00007f268a428e5b in __libc_start_main () at /lib64/libc.so.6 #44 0x0000000000426dda in () (gdb) ``` Sometimes (unpredictably), the connection times out and produces the following message: ``` network-stream-open-starttls: make client process failed: Network is unreachable, :name, smtpmail, :buffer, *trace of SMTP session to smtp.gmail.com*, :host, smtp.gmail.com, :service, 587 ``` Trying to make an MWE, 1. I launched emacs -Q 2. M-x message-mail RET 3. Typed in :to and :from 4. M-x toggle-debug-on-quit RET 5. C-c C-c 6. smtp RET 7. smtp.gmail.com RET And received an identical freeze. After: 8. C-g (once) -> nothing happens (no stack trace) 9. C-g (second time) -> a message appears: `Port number to use when contacting smtp.gmail.com?` 10. 587 -> freeze 11. C-g -> `smtpmail-query-smtp-server: Couldn=E2=80=99t contact an SMTP s= erver` If I connect to emacs with gdb after step 7: ``` (gdb) thread apply all bt Thread 3 (Thread 0x7fa7558b2700 (LWP 9546)): #0 0x00007fa75858be9f in poll () at /lib64/libc.so.6 #1 0x00007fa75a570bce in () at /usr/lib64/libglib-2.0.so.0 #2 0x00007fa75a570f33 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0 #3 0x00007fa75a7b7936 in () at /usr/lib64/libgio-2.0.so.0 #4 0x00007fa75a59861d in () at /usr/lib64/libglib-2.0.so.0 #5 0x00007fa75876006b in start_thread () at /lib64/libpthread.so.0 #6 0x00007fa75859772f in clone () at /lib64/libc.so.6 Thread 2 (Thread 0x7fa7569f1700 (LWP 9545)): #0 0x00007fa75858be9f in poll () at /lib64/libc.so.6 #1 0x00007fa75a570bce in () at /usr/lib64/libglib-2.0.so.0 #2 0x00007fa75a570cef in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 #3 0x00007fa75a570d41 in () at /usr/lib64/libglib-2.0.so.0 #4 0x00007fa75a59861d in () at /usr/lib64/libglib-2.0.so.0 #5 0x00007fa75876006b in start_thread () at /lib64/libpthread.so.0 --Type for more, q to quit, c to continue without paging--c #6 0x00007fa75859772f in clone () at /lib64/libc.so.6 Thread 1 (Thread 0x7fa7574d1640 (LWP 9544)): #0 0x00007fa75858e07e in pselect () at /lib64/libc.so.6 #1 0x00000000005aef85 in () #2 0x00000000005af9d2 in () #3 0x0000000000572883 in () #4 0x00000000005a6bb8 in () #5 0x00000000005727d7 in () #6 0x00000000005a6bb8 in () #7 0x00000000005727d7 in () #8 0x00000000005a6bb8 in () #9 0x00000000005727d7 in () #10 0x00000000005a6bb8 in () #11 0x00000000005727d7 in () #12 0x00000000005a6bb8 in () #13 0x00000000005727d7 in () #14 0x00000000005a6bb8 in () #15 0x00000000005727d7 in () #16 0x00000000005a6bb8 in () #17 0x00000000005727d7 in () #18 0x00000000005a6bb8 in () #19 0x00000000005727d7 in () #20 0x00000000005a6bb8 in () #21 0x00000000005727d7 in () #22 0x00000000005a6bb8 in () #23 0x00000000005727d7 in () #24 0x00000000005a6bb8 in () #25 0x00000000005727d7 in () #26 0x00000000005a6bb8 in () #27 0x00000000005727d7 in () #28 0x000000000056f2e4 in () #29 0x0000000000572883 in () #30 0x0000000000570590 in () #31 0x0000000000572883 in () #32 0x00000000005a6bb8 in () #33 0x00000000005727d7 in () #34 0x000000000057292a in () #35 0x000000000050c45d in () #36 0x0000000000571bef in () #37 0x00000000004fd648 in () #38 0x0000000000571b53 in () #39 0x00000000004fd5d6 in () #40 0x0000000000500aef in () #41 0x0000000000500e0d in () #42 0x0000000000426642 in () #43 0x00007fa7584a4e5b in __libc_start_main () at /lib64/libc.so.6 #44 0x0000000000426dda in () (gdb) ``` (require 'starttls) doesn't seem to change anything, except give a warning about starttls being obsolete. System: Emacs 27.1 Kernel: 5.4.72 #1 SMP Sat Oct 17 14:26:06 CDT 2020 x86_64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel GNU/Linux glib2-2.66.2 glibc-2.30 gtk+3-3.24.23 What can I do else to make smtp work as yesterday, or at least debuggable? -- Yours sincerely, Vladimir Nikishkin (Sent from GMail web interface.)