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: Re: Can't send mail with smtpmail "any more". (Gmail and other providers) Date: Sun, 1 Nov 2020 23:20:32 +0800 Message-ID: References: <83mu07em37.fsf@gnu.org> <20201101133443.3a81f3af@atmarama.ddns.net> 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="31510"; mail-complaints-to="usenet@ciao.gmane.io" To: Jean Louis , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 16:21:41 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 1kZFAr-00085a-65 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 16:21:41 +0100 Original-Received: from localhost ([::1]:44300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFAq-0001oA-7u for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 10:21:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZFA7-0001mu-Tx for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 10:20:55 -0500 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:43324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZFA2-0006YX-9M for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 10:20:55 -0500 Original-Received: by mail-lf1-x12e.google.com with SMTP id l28so14082520lfp.10 for ; Sun, 01 Nov 2020 07:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=aEAIinrCtzrCwvdsHUWSbZmeomW/Nq7c6hu3W3Fd6ak=; b=fhH7VuPWeN5K3cc+O9pXO5yMAk7EyiIrOfq2GU8C9AAEwJxA4OD+6BZM7+Hp4H0ZMw 0KGZdK0RtwyedQD7nMnCjulv3yxS9oNs8U/my73q0T/fi+6Wbsb6JvVDg/b6cc+zjou8 2lQWWZMqTOil2Nh3X5zOV0psy+KZm3ByTtOipRERZLInCLr1JGwSj928EiuOwKlDjfi6 i+USGOaG1a4Ms+ETcgMWkd/O/I4pGdj4duKMM+bz7JJ/pScWQSbUNZx1EL/EqyZS87L1 Cx5THVqI9lJro3N5M3S5dA87xJnDJk+kkwqNVEJdYTTK3BTao1MNRNYGFcy4WvPY33yf w3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=aEAIinrCtzrCwvdsHUWSbZmeomW/Nq7c6hu3W3Fd6ak=; b=L51cZhP/UekH5n6OoKr8ebpYMHgS6Z8JGToOBEIzAm0T+uLzf1vi9FZQA1lptQn/qE pK1LhaJ6ejKRHQbgK324ymSHqZUP8n7I7xukoGhxCiE7t9TBEZs4rq11m0p7f7BWnXNn xw7C3+kjU0nnAEo0KXEe2S2IvlBUt1SDUdOXh40YC6FKN13l/nLuc8ikqcDdAiOkI3K2 sr8XI3RHVicBFZWJKiAVT3QKvYLbzfdUEVY359NPfeJDIWTFl4+kB9a3BKwkubJq1Ih3 DuFc+sNLt4kruhfrlQLGAGPAqOdn7JpR/lLWLP9r3mCEZQqL6UcD1uwfkOrlO2mkNXjs 5A4Q== X-Gm-Message-State: AOAM532fuI/ZiXM79c3D67ndvUQ5JogByPgI9kvrte3Rg7FIB42sGseu TLU73m2c/EYTm03TyRi4qxfwgFuwwfRrhQjRx7A= X-Google-Smtp-Source: ABdhPJwOrNGwLBWNaPGkF2Cux2/k0FAsmNRhSTFFrGC/5+SBAmc87IPp3TsJShN9m63LaTokIdPS7ktiIgXgPKCldnk= X-Received: by 2002:a19:4b91:: with SMTP id y139mr3942726lfa.21.1604244047958; Sun, 01 Nov 2020 07:20:47 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=lockywolf@gmail.com; helo=mail-lf1-x12e.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, HTML_MESSAGE=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-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:124867 Archived-At: mu4e can handle maildirs. Notmuch can also handle maildirs. Moreover, you can use both on the same maildir that mutt already has, at the same time, and use any of those as a search engine for mutt. -- Yours sincerely, Vladimir Nikishkin (Sent with Google mail mobile.) Jean Louis =E4=BA=8E 2020=E5=B9=B411=E6=9C=881=E6=97=A5= =E5=91=A8=E6=97=A5 21:06=E5=86=99=E9=81=93=EF=BC=9A > * Sa=C5=A1a Jani=C5=A1ka [2020-11-01 15:35]: > > On Tue, 27 Oct 2020 17:15:56 +0200 > > Eli Zaretskii wrote: > > > > > smtpmail.el has a debug facility, whereby you can set a variable and > > > get a buffer with the details of the connection session. > > > > What about adding some regular logging facility to smtpmail.el? It is > > the main reason why I'm using msmtp instead? > > > > (This email is still sent by Claws until I decide which client to > > use: Gnus or mu4e.) > > M-x rmail is quite good client for email handling in Emacs. > > Then there is: > > M-x mh-rmail which may have many good power users' options > > For me, due to nature of my email handling and having over 50000 > Maildir directories inside of ~/Maildir and that none of Emacs clients > is handling Maildirs, I am using mutt email client. That is one of > most efficient for me. And I am launching it inside of Emacs and > editing files with Emacs by using emacsclient > > (defun mutt-emacs () > "Opens mutt in ansi-term buffer within GNU Emacs" > (interactive) > (let* ((default-directory (getenv "HOME"))) > (ansi-term "mutt"))) > > But my M-x becomes not usable when I am in ansi-term, I would like > that it is usable. > > I made this function to open up mutt in vterm and I still use it. But > that was workaround from time when ansi-term was not handling best > some terminal activities. Bugs have been polished and now ansi-term > works just fine. > > (defun mutt-vterm () > "Opens mutt in vterm buffer within GNU Emacs" > (interactive) > (let* ((default-directory (getenv "HOME")) > (buffer-exist (get-buffer "mutt")) > (vterm-kill-buffer-on-exit t) > (vterm-shell "mutt") > (last-key (last-key))) > (if buffer-exist > (if (and (not (symbolp last-key)) > (not (=3D last-key 8388717))) > (vterm "mutt") > (if (and (not (string-match (buffer-name (current-buffer)) > "mutt")) > (y-or-n-p "Buffer `mutt' exists, do you wish to > switch?")) > (switch-to-buffer "mutt"))) > (vterm "mutt")))) > > (global-set-key (kbd "s-m") 'mutt-you-name-it) > > For fetching emails I recommend using GNU mailtools and setting up > crontab to regularly fetch emails to local computer. > > For sending, I recommend using the MTA on the system if such exists on > your system, for example exim, courier MTA, OpenSMTPD, Postfix and > similar. Those are handling the queues well if you have good > connection to Internet. > > msmtp is excellent tool and handles queues of email even if connection > to Internet is sporadic. MTAs need to be configured to handled mail in > queues for longer time and for that reason some emails could be lost > or returned back. > > I am using those scripts for msmtp, like list queue and similar. So > the script below is at ~/bin/sendmail and my PATH is ~/bin as well so > Emacs will recognize it as sendmail and dispatch email without any > further settings to msmtp. That is very handy when using it with emacs > -Q when one needs to M-x report-emacs-bug > > ~/bin/sendmail follows below: > > #!/usr/bin/env bash > > QUEUEDIR=3D$HOME/.msmtpqueue > > # Set secure permissions on created directories and files > umask 077 > > # Change to queue directory (create it if necessary) > if [ ! -d "$QUEUEDIR" ]; then > mkdir -p "$QUEUEDIR" || exit 1 > fi > cd "$QUEUEDIR" || exit 1 > > # Create new unique filenames of the form > # MAILFILE: ccyy-mm-dd-hh.mm.ss[-x].mail > # MSMTPFILE: ccyy-mm-dd-hh.mm.ss[-x].msmtp > # where x is a consecutive number only appended if you send more than one > # mail per second. > BASE=3D"`/bin/date +%Y-%m-%d-%H.%M.%S`" > if [ -f "$BASE.mail" -o -f "$BASE.msmtp" ]; then > TMP=3D"$BASE" > i=3D1 > while [ -f "$TMP-$i.mail" -o -f "$TMP-$i.msmtp" ]; do > i=3D`expr $i + 1` > done > BASE=3D"$BASE-$i" > fi > MAILFILE=3D"$BASE.mail" > MSMTPFILE=3D"$BASE.msmtp" > > # Write command line to $MSMTPFILE > echo "$@" > "$MSMTPFILE" || exit 1 > > # Write the mail to $MAILFILE > cat > "$MAILFILE" || exit 1 > > # If we are online, run the queue immediately. > # Replace the test with something suitable for your site. > ping -c 1 -w 2 stw1.rcdrun.com > /dev/null > if [ $? -eq 0 ]; then > msmtp-runqueue.sh > /dev/null & > fi > > exit 0 > >