From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: sendmail-program with msmtpq Date: Mon, 12 Nov 2018 06:11:53 +0100 Organization: GNU's NOT Unix! Message-ID: References: <837ehj9d4f.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1541999422 4334 195.159.176.226 (12 Nov 2018 05:10:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2018 05:10:22 +0000 (UTC) User-Agent: Rmail on GNU Emacs/27.0.50 (27.0.50) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 12 06:10:18 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gM4UL-00011F-5q for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2018 06:10:17 +0100 Original-Received: from localhost ([::1]:44835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gM4WR-0005hK-Cv for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2018 00:12:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gM4Vx-0005hB-Pt for help-gnu-emacs@gnu.org; Mon, 12 Nov 2018 00:11:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gM4Vx-0007l1-1B for help-gnu-emacs@gnu.org; Mon, 12 Nov 2018 00:11:57 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:36823) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gM4Vs-0007gx-IA; Mon, 12 Nov 2018 00:11:52 -0500 X-Originating-IP: 77.136.42.108 Original-Received: from localhost (108.42.136.77.rev.sfr.net [77.136.42.108]) (Authenticated sender: xavier@maillard.im) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9F03220002; Mon, 12 Nov 2018 05:11:49 +0000 (UTC) In-Reply-To: <837ehj9d4f.fsf@gnu.org> (message from Eli Zaretskii on Mon, 12 Nov 2018 05:41:04 +0200) Jabber-ID: xavier@maillard.im X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118649 Archived-At: Hello Eli, > Date: Mon, 12 Nov 2018 05:41:04 +0200 > From: Eli Zaretskii > > > Date: Sun, 11 Nov 2018 23:00:36 +0100 > > From: Xavier Maillard > > > > My goal with this setup is to queue my outgoing messages when I am not > > connected. There is something wrong at some point; when unplugged, > > msmtpq is doing the right thing: it queues the outgoing message but `sendmail-send-it' would consider it as unsent. > > > > Here is the log: > > > > [2018-11-10 08:12:02.017] Sending... > > Added to /home/xavier/.cache/mail/sent > > sendmail-send-it: Sending...failed to mail for [ -oi -f xavier@maillard.im -oep -odi -t ] : couldn't be sent - host not connected; enqueued mail as : [ 2018-11-10-08.12.02 ] ( -oi -f xavier@maillard.im -oep -odi -t ) : successful; > > > > Due to that behaviour, calling C-x m again is just asking if I want to erase the *mail* buffer instead of creating a new one. > > > > What's wrong ? > > I suspect that your program exits with non-zero exit status in this > case, but I cannot be sure because you don't seem to show the entire > message. Here is a test from the command line: # With connection ON $ cat /tmp/test-mail | ~/bin/msmtpq xavier@maillard.im mail for [ xavier@maillard.im ] : send was successful $ echo $? 0 # With connection OFF $ cat /tmp/test-mail | ~/bin/msmtpq xavier@maillard.im mail for [ xavier@maillard.im ] : couldn't be sent - host not connected enqueued mail as : [ 2018-11-12-06.05.45 ] ( xavier@maillard.im ) : successful $ echo $? 0 > sendmail-send-it expects a successful sending to exit with zero > status. As far as I can see, it should be ok. Does sendmail-send-it expect a message or something like that ? Thank you. -- Xavier