* sendmail-program with msmtpq
@ 2018-11-11 22:00 Xavier Maillard
2018-11-12 3:41 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Maillard @ 2018-11-11 22:00 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I am trying to use msmtpQ with the regular mail-mode.
I set sendmail-program to "msmtpq" and `send-mail-function' to `sendmail-send-it'.
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 ?
Regards
--
Xavier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq
2018-11-11 22:00 sendmail-program with msmtpq Xavier Maillard
@ 2018-11-12 3:41 ` Eli Zaretskii
2018-11-12 5:11 ` Xavier Maillard
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2018-11-12 3:41 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 11 Nov 2018 23:00:36 +0100
> From: Xavier Maillard <xavier@maillard.im>
>
> 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.
sendmail-send-it expects a successful sending to exit with zero
status.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq
2018-11-12 3:41 ` Eli Zaretskii
@ 2018-11-12 5:11 ` Xavier Maillard
2018-11-12 5:22 ` Xavier Maillard
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Maillard @ 2018-11-12 5:11 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Hello Eli,
> Date: Mon, 12 Nov 2018 05:41:04 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Sun, 11 Nov 2018 23:00:36 +0100
> > From: Xavier Maillard <xavier@maillard.im>
> >
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq
2018-11-12 5:11 ` Xavier Maillard
@ 2018-11-12 5:22 ` Xavier Maillard
2018-11-12 15:44 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Maillard @ 2018-11-12 5:22 UTC (permalink / raw)
To: Xavier Maillard; +Cc: help-gnu-emacs
Hello again,
in fact, no matter my online status, calling `compose-mail' after a
previous call to `sendmail-send-it' behaves the same.
I did not pay attention before but, I have many `sendmail-errors-XXXX'
buffers with msmtpqs's output (exactly the same output than when
calling it from the terminal).
Is it safe to "silent" msmtpq via an advice in the `sendmail-send-it'
function ?
--
Xavier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq
2018-11-12 5:22 ` Xavier Maillard
@ 2018-11-12 15:44 ` Eli Zaretskii
2018-11-12 20:54 ` sendmail-program with msmtpq [SOLVED] Xavier Maillard
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2018-11-12 15:44 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Mon, 12 Nov 2018 06:22:54 +0100
> From: Xavier Maillard <xavier@maillard.im>
> Cc: eliz@gnu.org, help-gnu-emacs@gnu.org
>
> in fact, no matter my online status, calling `compose-mail' after a
> previous call to `sendmail-send-it' behaves the same.
>
> I did not pay attention before but, I have many `sendmail-errors-XXXX'
> buffers with msmtpqs's output (exactly the same output than when
> calling it from the terminal).
Please show the full message you get in the *Messages* buffer after a
failure to send a message.
> Is it safe to "silent" msmtpq via an advice in the `sendmail-send-it'
> function ?
Sorry, I don't understand what that means, nor how it is related to
the issue at hand. What do you mean by "silent"? if you mean
"silence", I still don't see where did you silence it and why do you
think it might be unsafe to do that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq [SOLVED]
2018-11-12 15:44 ` Eli Zaretskii
@ 2018-11-12 20:54 ` Xavier Maillard
2018-11-12 23:10 ` Eric Abrahamsen
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Maillard @ 2018-11-12 20:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
> Date: Mon, 12 Nov 2018 17:44:05 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Mon, 12 Nov 2018 06:22:54 +0100
> > From: Xavier Maillard <xavier@maillard.im>
> > Cc: eliz@gnu.org, help-gnu-emacs@gnu.org
> >
> > in fact, no matter my online status, calling `compose-mail' after a
> > previous call to `sendmail-send-it' behaves the same.
> >
> > I did not pay attention before but, I have many `sendmail-errors-XXXX'
> > buffers with msmtpqs's output (exactly the same output than when
> > calling it from the terminal).
>
> Please show the full message you get in the *Messages* buffer after a
> failure to send a message.
In fact, there is no failure just an output from the msmtpq command
which I suspect, is not what is expected.
I read through msmtpq source code (thank you FOSS) and I find a way to
make the command be quiet.
I tested it and it no longer bails out any error anywhere (and my
mesages are either sent or queued depending my connectivity).
Thank you for your help.
--
Xavier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sendmail-program with msmtpq [SOLVED]
2018-11-12 20:54 ` sendmail-program with msmtpq [SOLVED] Xavier Maillard
@ 2018-11-12 23:10 ` Eric Abrahamsen
0 siblings, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2018-11-12 23:10 UTC (permalink / raw)
To: help-gnu-emacs
Xavier Maillard <xavier@maillard.im> writes:
>> Date: Mon, 12 Nov 2018 17:44:05 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>> > Date: Mon, 12 Nov 2018 06:22:54 +0100
>> > From: Xavier Maillard <xavier@maillard.im>
>> > Cc: eliz@gnu.org, help-gnu-emacs@gnu.org
>> >
>> > in fact, no matter my online status, calling `compose-mail' after a
>> > previous call to `sendmail-send-it' behaves the same.
>> >
>> > I did not pay attention before but, I have many `sendmail-errors-XXXX'
>> > buffers with msmtpqs's output (exactly the same output than when
>> > calling it from the terminal).
>>
>> Please show the full message you get in the *Messages* buffer after a
>> failure to send a message.
>
> In fact, there is no failure just an output from the msmtpq command
> which I suspect, is not what is expected.
>
> I read through msmtpq source code (thank you FOSS) and I find a way to
> make the command be quiet.
>
> I tested it and it no longer bails out any error anywhere (and my
> mesages are either sent or queued depending my connectivity).
As an interested bystander: did you suppress the error, or did you
change the return value so it didn't return a message (only the 0)? My
understanding is that msmtpq should return 0 whether it sent the message
or queued it, right? Can't `call-process-region' ignore the message, and
only pay attention to the return value?
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-12 23:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-11 22:00 sendmail-program with msmtpq Xavier Maillard
2018-11-12 3:41 ` Eli Zaretskii
2018-11-12 5:11 ` Xavier Maillard
2018-11-12 5:22 ` Xavier Maillard
2018-11-12 15:44 ` Eli Zaretskii
2018-11-12 20:54 ` sendmail-program with msmtpq [SOLVED] Xavier Maillard
2018-11-12 23:10 ` Eric Abrahamsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).