[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[msmtp-users] msmtpq invokes msmtp while offline
Hi All,
I am in the process of trying to switch from msmtp to msmtpq as my
sendmail program in emacs. As has previously been discussed on this
list, it appears that emacs expects silence upon success.
http://sourceforge.net/mailarchive/message.php?msg_id=29729814[1]
After reading the documentation, I have set the environment variable
EMAIL_QUEUE_QUIET=t and that works great when sending while online.
I do not have similar sucess offline. The messages queue correctly, but
the subsequent failure of msmtp (because I'm offline), causes problems.
My logs look like:
2013 01 Sep 19:06:28 : mail for [ -a XXXXXXXX jschwab@...20... ] : couldn't be sent - host not connected
2013 01 Sep 19:06:28 : enqueued mail as : [ 2013-09-01-19.06.28 ] ( -a XXXXXXXX jschwab@...20... ) : successful
2013 01 Sep 19:06:28 : mail for [ -a XXXXXXXX jschwab@...20... ] : send was unsuccessful ; msmtp exit code was 68
2013 01 Sep 19:06:28 : enqueued mail as : [ 2013-09-01-19.06.28 ] ( -a XXXXXXXX jschwab@...20... )
and msmtp also complains on stderr:
msmtp: cannot locate host smtp.gmail.com: Name or service not known
msmtp: could not send mail (account XXXXXXXX from /home/jschwab/.msmtprc)
Poking around in the code, the issue arises in during the send_mail
(line 436) function. After failing the connection test (line 438) and
enquing the message, msmtp is invovked (line 445) almost immediately
thereafter. Naively, that seems surprising to me. Is this the intended
behavior?
This is relatively simple to workaround, either by wrapping the msmtp
call in a connection test (so it doesn't run) or by sending stderr to
/dev/null (so emacs doesn't hear the complaints.)
I'd like to figure out how to set this up "correctly", so it can just
be drop-in and work out-of-the-box for emacs users.
Best,
Josiah Schwab