unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.60; emacs-report-bug fails silently
@ 2008-05-30 12:59 Florian Beck
  2008-05-30 13:59 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 36+ messages in thread
From: Florian Beck @ 2008-05-30 12:59 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

If I send a bug with 

emacs -Q
M-x report-emacs-bug

emacs trys to use sendmail-user-agent by default.

This doesn't work, which is no surprise because I haven't even installed
sendmail.

What *is* a problem is that there is no indication that sending the
message failed. Emacs even displays Sending…done.

if I wouldn't read emacs-pretest-bug, I'd never known by bug report was
not delivered.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.4 (i686-pc-linux-gnu)
 of 2008-05-29 on aeschylus
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--with-x-toolkit=no' 'CC=gcc' 'CFLAGS=-O0 -fno-crossjumping -g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Help

Minor modes in effect:
  shell-dirtrack-mode: t
  show-paren-mode: t
  jabber-activity-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  view-mode: t

Recent input:
<down> <down> <down> <down> <down> <end> <left> <left> 
<left> <left> <left> <left> <left> <return> C-x m f 
b @ s t r e i t b l a t t . d e <down> <down> <down> 
<up> <up> <up> t e <backspace> <backspace> <down> t 
e s t <down> <down> <down> t e s t C-c C-c <switch-frame> 
g g <switch-frame> C-x C-f <C-backspace> <C-backspace> 
<C-backspace> <C-backspace> . e m a <tab> <return> 
<up> <up> <up> <up> <C-home> <C-down> <C-down> <C-down> 
<C-down> <C-down> <C-down> <C-down> <C-down> <return> 
( e t <backspace> <backspace> s e t q SPC m a i l - 
u s <tab> r <tab> SPC <f1> v <return> g n u s - u s 
e r - a g <tab> ) <C-left> <C-left> <C-left> ' <end> 
C-x C-e C-x s C-x m f b @ s t <tab> r <tab> e i t b 
l a t t . d e <down> T e s t <down> <down> <down> <down> 
t e s t C-c C-c <switch-frame> g <up> <up> <up> <up> 
<up> <up> <up> <up> <return> <return> <switch-frame> 
M-x r e p o r t - e m a c s - b u g <return> I n c 
o r r e c t SPC s i z e SPC w i t h SPC s e t - f o 
n t s e t - f o n t <return> C-o C-x C-f t m <tab> 
t e s <tab> e <tab> <return> <next> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> C-SPC C-SPC 
<C-end> C-x C-k C-x C-o C-o C-y C-SPC C-SPC <C-end> 
C-x C-k <C-home> <down> <down> <down> <down> <down> 
<down> <down> <down> <next> <next> <C-home> C-c C-c 
M-x M-p <return>

Recent messages:
Mark set
Mark activated
Mark set [2 times]
Mark activated
Mark set [2 times]
Wrote /home/fb/DATA/TODO/Journal.muse
Sending...
Sending via mail...
Wrote /home/fb/Mail/Send-Mail/192
Sending...done

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-30 12:59 23.0.60; emacs-report-bug fails silently Florian Beck
@ 2008-05-30 13:59 ` Lennart Borgman (gmail)
  2008-05-30 21:42   ` Florian Beck
  0 siblings, 1 reply; 36+ messages in thread
From: Lennart Borgman (gmail) @ 2008-05-30 13:59 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Florian Beck wrote:
> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
> 
> Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.
> 
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
> 
> If I send a bug with 
> 
> emacs -Q
> M-x report-emacs-bug
> 
> emacs trys to use sendmail-user-agent by default.
> 
> This doesn't work, which is no surprise because I haven't even installed
> sendmail.
> 
> What *is* a problem is that there is no indication that sending the
> message failed. Emacs even displays Sending…done.
> 
> if I wouldn't read emacs-pretest-bug, I'd never known by bug report was
> not delivered.

Is not this similar to the situation we had before on w32? The solution 
to that was mailclient-send-it in mailclient.el.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-30 13:59 ` Lennart Borgman (gmail)
@ 2008-05-30 21:42   ` Florian Beck
  2008-05-30 21:52     ` Lennart Borgman (gmail)
  2008-06-01  5:36     ` Chong Yidong
  0 siblings, 2 replies; 36+ messages in thread
From: Florian Beck @ 2008-05-30 21:42 UTC (permalink / raw)
  To: emacs-pretest-bug

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Florian Beck wrote:
>> Please write in English if possible, because the Emacs maintainers
>> usually do not have translators to read other languages for them.
>>
>> Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.
>>
>> Please describe exactly what actions triggered the bug
>> and the precise symptoms of the bug:
>>
>> If I send a bug with 
>>
>> emacs -Q
>> M-x report-emacs-bug
>>
>> emacs trys to use sendmail-user-agent by default.
>>
>> This doesn't work, which is no surprise because I haven't even installed
>> sendmail.
>>
>> What *is* a problem is that there is no indication that sending the
>> message failed. Emacs even displays Sending…done.
>>
>> if I wouldn't read emacs-pretest-bug, I'd never known by bug report was
>> not delivered.
>
> Is not this similar to the situation we had before on w32? The
> solution to that was mailclient-send-it in mailclient.el.

No, this happens on Ubuntu and probably on many gnu-linux-systems that
do not install sendmail by default. I'm sorry, I forgot the system information.
(see below)

Also, I'm not looking for a workaround. (After I set mail-user-agent to
gnus-user-agent everything is fine.) I'm reporting that on systems
without sendmail bug reports likely disappear without trace.

In GNU Emacs 23.0.60.4 (i686-pc-linux-gnu)
 of 2008-05-29 on aeschylus
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--with-x-toolkit=no' 'CC=gcc' 'CFLAGS=-O0 -fno-crossjumping -g''

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-30 21:42   ` Florian Beck
@ 2008-05-30 21:52     ` Lennart Borgman (gmail)
  2008-05-31  0:44       ` Florian Beck
  2008-06-01  5:36     ` Chong Yidong
  1 sibling, 1 reply; 36+ messages in thread
From: Lennart Borgman (gmail) @ 2008-05-30 21:52 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Florian Beck wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Florian Beck wrote:
>>> Please write in English if possible, because the Emacs maintainers
>>> usually do not have translators to read other languages for them.
>>>
>>> Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.
>>>
>>> Please describe exactly what actions triggered the bug
>>> and the precise symptoms of the bug:
>>>
>>> If I send a bug with 
>>>
>>> emacs -Q
>>> M-x report-emacs-bug
>>>
>>> emacs trys to use sendmail-user-agent by default.
>>>
>>> This doesn't work, which is no surprise because I haven't even installed
>>> sendmail.
>>>
>>> What *is* a problem is that there is no indication that sending the
>>> message failed. Emacs even displays Sending…done.
>>>
>>> if I wouldn't read emacs-pretest-bug, I'd never known by bug report was
>>> not delivered.
>> Is not this similar to the situation we had before on w32? The
>> solution to that was mailclient-send-it in mailclient.el.
> 
> No, this happens on Ubuntu and probably on many gnu-linux-systems that
> do not install sendmail by default. I'm sorry, I forgot the system information.
> (see below)
> 
> Also, I'm not looking for a workaround. (After I set mail-user-agent to
> gnus-user-agent everything is fine.) I'm reporting that on systems
> without sendmail bug reports likely disappear without trace.

What I meant is that we should not require users to use any special mail 
agent to send bug reports. If they just have a system mail client set up 
it should work by using that.

Perhaps you did not have a system mail client set up?

> In GNU Emacs 23.0.60.4 (i686-pc-linux-gnu)
>  of 2008-05-29 on aeschylus
> Windowing system distributor `The X.Org Foundation', version 11.0.10400090
> configured using `configure  '--with-x-toolkit=no' 'CC=gcc' 'CFLAGS=-O0 -fno-crossjumping -g''
> 




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-30 21:52     ` Lennart Borgman (gmail)
@ 2008-05-31  0:44       ` Florian Beck
  2008-05-31  9:18         ` Lennart Borgman (gmail)
  2008-05-31  9:53         ` Reiner Steib
  0 siblings, 2 replies; 36+ messages in thread
From: Florian Beck @ 2008-05-31  0:44 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, Florian Beck

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Florian Beck wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>
>>> Florian Beck wrote:

>>>> If I send a bug with 
>>>>
>>>> emacs -Q
>>>> M-x report-emacs-bug
>>>>
>>>> emacs trys to use sendmail-user-agent by default.
>>>>
>>>> This doesn't work, which is no surprise because I haven't even installed
>>>> sendmail.
>>>>
>>>> What *is* a problem is that there is no indication that sending the
>>>> message failed. Emacs even displays Sending…done.

>> Also, I'm not looking for a workaround. (After I set mail-user-agent to
>> gnus-user-agent everything is fine.) I'm reporting that on systems
>> without sendmail bug reports likely disappear without trace.
>
> What I meant is that we should not require users to use any special
> mail agent to send bug reports. If they just have a system mail client
> set up it should work by using that.
>
> Perhaps you did not have a system mail client set up?

Not that I know of. I never needed to and I would not know how to set
it up. As I said, now that I know about the problem, it is easy for me
to fix.

Look, if you think my setup is bizzare, please ignore my report. But I don't
think it is. I installed Ubuntu and used gnus to talk to my pop server. I
didn't configure sendmail or a system mail client or `mail-user-agent'
because everything worked – until after more then a year I realised that
emacs bug reports were not delived, despite the message »Sending…done«.


-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-31  0:44       ` Florian Beck
@ 2008-05-31  9:18         ` Lennart Borgman (gmail)
  2008-05-31 10:56           ` Reiner Steib
  2008-06-01  2:47           ` Florian Beck
  2008-05-31  9:53         ` Reiner Steib
  1 sibling, 2 replies; 36+ messages in thread
From: Lennart Borgman (gmail) @ 2008-05-31  9:18 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Florian Beck wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Florian Beck wrote:
>>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>>
>>>> Florian Beck wrote:
> 
>>>>> If I send a bug with 
>>>>>
>>>>> emacs -Q
>>>>> M-x report-emacs-bug
>>>>>
>>>>> emacs trys to use sendmail-user-agent by default.
>>>>>
>>>>> This doesn't work, which is no surprise because I haven't even installed
>>>>> sendmail.
>>>>>
>>>>> What *is* a problem is that there is no indication that sending the
>>>>> message failed. Emacs even displays Sending…done.
> 
>>> Also, I'm not looking for a workaround. (After I set mail-user-agent to
>>> gnus-user-agent everything is fine.) I'm reporting that on systems
>>> without sendmail bug reports likely disappear without trace.
>> What I meant is that we should not require users to use any special
>> mail agent to send bug reports. If they just have a system mail client
>> set up it should work by using that.
>>
>> Perhaps you did not have a system mail client set up?
> 
> Not that I know of. I never needed to and I would not know how to set
> it up. As I said, now that I know about the problem, it is easy for me
> to fix.
> 
> Look, if you think my setup is bizzare, please ignore my report.

No, I just wanted to be sure about what could be done.

 From what you have told us it looks like when

- there is no way for Emacs to send the bug report itself
- and there is no system mail client that can be used

then Emacs pretends it still has sent the message. That is of course a 
bug that should be removed if it is possible.

Though I am not at all sure what is happening on your system. On my w32 
system mail-user-agent is 'sendmail-user-agent. However when sending bug 
reports `mailclient-send-it' is used to send the message.

You said you know how to fix it. Do you mean you have a solution for how 
to fix this bug in Emacs? Otherwise could you check what is happening 
when you try to send a bug report? Is `mailclient-send-it' called?

> But I don't
> think it is. I installed Ubuntu and used gnus to talk to my pop server. I
> didn't configure sendmail or a system mail client or `mail-user-agent'
> because everything worked – until after more then a year I realised that
> emacs bug reports were not delived, despite the message »Sending…done«.
> 
> 




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-31  0:44       ` Florian Beck
  2008-05-31  9:18         ` Lennart Borgman (gmail)
@ 2008-05-31  9:53         ` Reiner Steib
  2008-06-01  2:54           ` Florian Beck
  1 sibling, 1 reply; 36+ messages in thread
From: Reiner Steib @ 2008-05-31  9:53 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

On Sat, May 31 2008, Florian Beck wrote:

> Look, if you think my setup is bizzare, please ignore my report. But
> I don't think it is.

Me neither, see the sub-thread[1] about this in April on emacs-devel.

> I installed Ubuntu and used gnus to talk to my pop server. 

POP is only for fetching mail, not for sending.

> I didn't configure sendmail or a system mail client or
> `mail-user-agent' because everything worked – until after more then
> a year I realised that emacs bug reports were not delived, despite
> the message »Sending…done«.

Emacs (or Gnus) doesn't know that your Gnus configuration allows to
send mail, so it can't set `mail-user-agent' to `gnus-user-agent'.

Gnus (`message.el') tried harder than `sendmail.el' to figure out if
sendmail exists.  See the function and the variable
`message-send-mail-function':

--8<---------------cut here---------------start------------->8---
(defun message-send-mail-function ()
  "Return suitable value for the variable `message-send-mail-function'."
  (cond ((and (require 'sendmail)
	      (boundp 'sendmail-program)
	      sendmail-program
	      (executable-find sendmail-program))
	 'message-send-mail-with-sendmail)
	((and (locate-library "smtpmail")
	      (require 'smtpmail)
	      smtpmail-default-smtp-server)
	 'message-smtpmail-send-it)
	((locate-library "mailclient")
	 'message-send-mail-with-mailclient)
	(t
	 (lambda ()
	   (error "Don't know how to send mail.  Please customize `message-send-mail-function'")))))

;; Useful to set in site-init.el
(defcustom message-send-mail-function (message-send-mail-function)
  "Function to call to send the current buffer as mail.
The headers should be delimited by a line whose contents match the
variable `mail-header-separator'.

Valid values include `message-send-mail-with-sendmail'
`message-send-mail-with-mh', `message-send-mail-with-qmail',
`message-smtpmail-send-it', `smtpmail-send-it',
`feedmail-send-it' and `message-send-mail-with-mailclient'.  The
default is system dependent and determined by the function
`message-send-mail-function'.

See also `send-mail-function'."
[...]
--8<---------------cut here---------------end--------------->8---

`sendmail.el' just uses `sendmail-send-it' without any check if
/usr/sbin/sendmail (et al) even exist:

--8<---------------cut here---------------start------------->8---
;; Useful to set in site-init.el
;;;###autoload
(defcustom send-mail-function
  (if (and window-system (memq system-type '(darwin windows-nt)))
      'mailclient-send-it
    'sendmail-send-it)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.

[1] http://thread.gmane.org/gmane.emacs.devel/94623
    http://thread.gmane.org/gmane.emacs.devel/94336/focus=94623

,----
| From: Reiner Steib
| Subject: Default of send-mail-function (was: ...)
| To: Lennart Borgman
| Cc: emacs-devel@gnu.org
| Date: Mon, 07 Apr 2008 23:05:49 +0200
| Message-ID: <v9prt12x5e.fsf_-_@marauder.physik.uni-ulm.de>
`----
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-31  9:18         ` Lennart Borgman (gmail)
@ 2008-05-31 10:56           ` Reiner Steib
  2008-06-01  2:47           ` Florian Beck
  1 sibling, 0 replies; 36+ messages in thread
From: Reiner Steib @ 2008-05-31 10:56 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: emacs-pretest-bug, Florian Beck

On Sat, May 31 2008, Lennart Borgman (gmail) wrote:

> Though I am not at all sure what is happening on your system. On my w32 system
> mail-user-agent is 'sendmail-user-agent. 

`mail-user-agent' primarily specifies which *mail composition* package
is used:

,----[ <f1> v mail-user-agent RET ]
| mail-user-agent is a variable defined in `simple.el'.
| Its value is gnus-user-agent
| 
| Documentation:
| *Your preference for a mail composition package.
| Various Emacs Lisp packages (e.g. Reporter) require you to compose an
| outgoing email message.  This variable lets you specify which
| mail-sending package you prefer.  
| 
| Valid values include:
| 
|   `sendmail-user-agent' -- use the default Emacs Mail package.
|                            See Info node `(emacs)Sending Mail'.
|   `mh-e-user-agent'     -- use the Emacs interface to the MH mail system.
|                            See Info node `(mh-e)'.
|   `message-user-agent'  -- use the Gnus Message package.
|                            See Info node `(message)'.
|   `gnus-user-agent'     -- like `message-user-agent', but with Gnus
|                            paraphernalia, particularly the Gcc: header for
|                            archiving.
| 
| Additional valid symbols may be available; check with the author of
| your package for details.  The function should return non-nil if it
| succeeds.
| 
| See also `read-mail-command' concerning reading mail.
| 
| You can customize this variable.
`----

> However when sending bug reports mailclient-send-it' is used to send
> the message.

If `mail-user-agent' is `sendmail-user-agent', the value from
`send-mail-function' specifies how to *send* the prepared mail.  When
`mail-user-agent' is `message-user-agent' or `gnus-user-agent',
`message-send-mail-function' is used.  Dunno about `mh-e-user-agent'.

See also my other mail: <v9wsla4x68.fsf@marauder.physik.uni-ulm.de>.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-31  9:18         ` Lennart Borgman (gmail)
  2008-05-31 10:56           ` Reiner Steib
@ 2008-06-01  2:47           ` Florian Beck
  2008-06-01  8:04             ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 36+ messages in thread
From: Florian Beck @ 2008-06-01  2:47 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, Florian Beck

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>>
>> Not that I know of. I never needed to and I would not know how to set
>> it up. As I said, now that I know about the problem, it is easy for me
>> to fix.
>>
>> Look, if you think my setup is bizzare, please ignore my report.
>
> No, I just wanted to be sure about what could be done.
>
> From what you have told us it looks like when
>
> - there is no way for Emacs to send the bug report itself
> - and there is no system mail client that can be used
>
> then Emacs pretends it still has sent the message. That is of course a
> bug that should be removed if it is possible.

Exactly.

> Though I am not at all sure what is happening on your system. On my
> w32 system mail-user-agent is 'sendmail-user-agent. However when
> sending bug reports `mailclient-send-it' is used to send the message.
>
> You said you know how to fix it. Do you mean you have a solution for
> how to fix this bug in Emacs? 

Sorry, what i meant is that it was easy to fix *my* Emacs after I found
out what the problem was.

> Otherwise could you check what is happening when you try to send a bug
> report? Is `mailclient-send-it' called?

It is not. It is only called on darwin and windows-nt. From
`send-mail-function':

  (if (and window-system (memq system-type '(darwin windows-nt)))
      'mailclient-send-it
    'sendmail-send-it)

Now, I think this bug bites anyone who
- is not on darwin/windows-nt (where mailclient-send-it might be able to deliver)
- has not configured sendmail and
- has not configured mail-user-agent (or reports from emacs -Q)

Am I wrong?


-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-31  9:53         ` Reiner Steib
@ 2008-06-01  2:54           ` Florian Beck
  2008-06-01  7:59             ` Lennart Borgman (gmail)
  2008-06-02  0:38             ` Stefan Monnier
  0 siblings, 2 replies; 36+ messages in thread
From: Florian Beck @ 2008-06-01  2:54 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Sat, May 31 2008, Florian Beck wrote:
>
>> Look, if you think my setup is bizzare, please ignore my report. But
>> I don't think it is.
>
> Me neither, see the sub-thread[1] about this in April on emacs-devel.

Well, /usr/sbin/sendmail indeed *does* exist on my system, although the
sendmail package is not installed. Confusing, isn't it?

>> I installed Ubuntu and used gnus to talk to my pop server. 
>
> POP is only for fetching mail, not for sending.

Sorry, to my SMTP server. 

Anyway, because the sendmail binary does exist,
message-send-mail-function returns message-send-mail-with-sendmail. So
that would not help.

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-05-30 21:42   ` Florian Beck
  2008-05-30 21:52     ` Lennart Borgman (gmail)
@ 2008-06-01  5:36     ` Chong Yidong
  1 sibling, 0 replies; 36+ messages in thread
From: Chong Yidong @ 2008-06-01  5:36 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug, emacs-devel

Florian Beck <abstraktion@t-online.de> writes:

>>> If I send a bug with 
>>>
>>> emacs -Q
>>> M-x report-emacs-bug
>>>
>>> emacs trys to use sendmail-user-agent by default.
>>>
>>> This doesn't work, which is no surprise because I haven't even installed
>>> sendmail.
>>>
>>> What *is* a problem is that there is no indication that sending the
>>> message failed. Emacs even displays Sending…done.
>
> No, this happens on Ubuntu and probably on many gnu-linux-systems that
> do not install sendmail by default. I'm sorry, I forgot the system information.
> (see below)
>
> Also, I'm not looking for a workaround. (After I set mail-user-agent to
> gnus-user-agent everything is fine.) I'm reporting that on systems
> without sendmail bug reports likely disappear without trace.

This is indeed a problem.  Would anyone like to work on fixing it?




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-01  2:54           ` Florian Beck
@ 2008-06-01  7:59             ` Lennart Borgman (gmail)
  2008-06-02  0:38             ` Stefan Monnier
  1 sibling, 0 replies; 36+ messages in thread
From: Lennart Borgman (gmail) @ 2008-06-01  7:59 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Florian Beck wrote:
> Reiner Steib <reinersteib+gmane@imap.cc> writes:
> 
>> On Sat, May 31 2008, Florian Beck wrote:
>>
>>> Look, if you think my setup is bizzare, please ignore my report. But
>>> I don't think it is.
>> Me neither, see the sub-thread[1] about this in April on emacs-devel.
> 
> Well, /usr/sbin/sendmail indeed *does* exist on my system, although the
> sendmail package is not installed. Confusing, isn't it?


Indeed. Is there any easy way to detect from Emacs that parts of what is 
needed is missing? Perhaps sendmail returns some status or status message?




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-01  2:47           ` Florian Beck
@ 2008-06-01  8:04             ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 36+ messages in thread
From: Lennart Borgman (gmail) @ 2008-06-01  8:04 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

Florian Beck wrote:
>> Otherwise could you check what is happening when you try to send a bug
>> report? Is `mailclient-send-it' called?
> 
> It is not. It is only called on darwin and windows-nt. From
> `send-mail-function':
> 
>   (if (and window-system (memq system-type '(darwin windows-nt)))
>       'mailclient-send-it
>     'sendmail-send-it)
> 
> Now, I think this bug bites anyone who
> - is not on darwin/windows-nt (where mailclient-send-it might be able to deliver)
> - has not configured sendmail and
> - has not configured mail-user-agent (or reports from emacs -Q)
> 
> Am I wrong?

No, I think you are right.

It looks like the logic have to be revised a bit. Perhaps in addition to 
the above it is necessary to try and send a mail and check the result?




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-01  2:54           ` Florian Beck
  2008-06-01  7:59             ` Lennart Borgman (gmail)
@ 2008-06-02  0:38             ` Stefan Monnier
  2008-06-02  2:13               ` Florian Beck
  2008-06-02  8:07               ` Paul R
  1 sibling, 2 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-02  0:38 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

>>> Look, if you think my setup is bizzare, please ignore my report. But
>>> I don't think it is.
>> Me neither, see the sub-thread[1] about this in April on emacs-devel.
> Well, /usr/sbin/sendmail indeed *does* exist on my system, although the
> sendmail package is not installed.  Confusing, isn't it?

Not necessarily: many packages (i.e. most MTAs) provide
/usr/sbin/sendmail.  Could you try and figure out what that
`/usr/sbin/sendmail' is?

> Anyway, because the sendmail binary does exist,
> message-send-mail-function returns message-send-mail-with-sendmail.
> So that would not help.

We definitely have a problem in this respect.  Traditionally on Unix,
sending mail is done via the /usr/sbin/sendmail program, but nowadays
it's very common to have such programs completely misconfigured.
It's fundamentally a bug in the distributions, I believe, but it's not
one that we can expect to see fixed any time soon, so we're going to
have to deal with it.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02  0:38             ` Stefan Monnier
@ 2008-06-02  2:13               ` Florian Beck
  2008-06-02  2:24                 ` Stefan Monnier
  2008-06-05  5:27                 ` Stefan Monnier
  2008-06-02  8:07               ` Paul R
  1 sibling, 2 replies; 36+ messages in thread
From: Florian Beck @ 2008-06-02  2:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> Look, if you think my setup is bizzare, please ignore my report. But
>>>> I don't think it is.
>>> Me neither, see the sub-thread[1] about this in April on emacs-devel.
>> Well, /usr/sbin/sendmail indeed *does* exist on my system, although the
>> sendmail package is not installed.  Confusing, isn't it?
>
> Not necessarily: many packages (i.e. most MTAs) provide
> /usr/sbin/sendmail.  Could you try and figure out what that
> `/usr/sbin/sendmail' is?

It is from the postfix package, but obviously not configured:

fb@aeschylus:~$ sendmail
sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
fb@aeschylus:~$ echo $?
75


>
>> Anyway, because the sendmail binary does exist,
>> message-send-mail-function returns message-send-mail-with-sendmail.
>> So that would not help.
>
> We definitely have a problem in this respect.  Traditionally on Unix,
> sending mail is done via the /usr/sbin/sendmail program, but nowadays
> it's very common to have such programs completely misconfigured.
> It's fundamentally a bug in the distributions, I believe, but it's not
> one that we can expect to see fixed any time soon, so we're going to
> have to deal with it.
>
>         Stefan

As a test, I installed sendmail from the ubuntu repository. It kind of
works, but only delivers mail locally. Of course, now sendmail returns
0. So a misconfigured sendmail may be difficult to detect.

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02  2:13               ` Florian Beck
@ 2008-06-02  2:24                 ` Stefan Monnier
  2008-06-05  5:27                 ` Stefan Monnier
  1 sibling, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-02  2:24 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

>>>>> Look, if you think my setup is bizzare, please ignore my report. But
>>>>> I don't think it is.
>>>> Me neither, see the sub-thread[1] about this in April on emacs-devel.
>>> Well, /usr/sbin/sendmail indeed *does* exist on my system, although the
>>> sendmail package is not installed.  Confusing, isn't it?
>> 
>> Not necessarily: many packages (i.e. most MTAs) provide
>> /usr/sbin/sendmail.  Could you try and figure out what that
>> `/usr/sbin/sendmail' is?

> It is from the postfix package, but obviously not configured:

> fb@aeschylus:~$ sendmail
> sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
> fb@aeschylus:~$ echo $?
> 75

Good, so this one is not misconfigured.  We should be able to DTRT here.

>> We definitely have a problem in this respect.  Traditionally on Unix,
>> sending mail is done via the /usr/sbin/sendmail program, but nowadays
>> it's very common to have such programs completely misconfigured.
>> It's fundamentally a bug in the distributions, I believe, but it's not
>> one that we can expect to see fixed any time soon, so we're going to
>> have to deal with it.

> As a test, I installed sendmail from the ubuntu repository.  It kind of
> works, but only delivers mail locally.  Of course, now sendmail returns 0.

I.e. it's broken and misconfigured.

> So a misconfigured sendmail may be difficult to detect.

Yes.  But clearly we're not even doing the right when sendmail fails
cleanly, so there's room for improvement.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02  0:38             ` Stefan Monnier
  2008-06-02  2:13               ` Florian Beck
@ 2008-06-02  8:07               ` Paul R
  2008-06-02 18:56                 ` Reiner Steib
  1 sibling, 1 reply; 36+ messages in thread
From: Paul R @ 2008-06-02  8:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:


> We definitely have a problem in this respect.  Traditionally on Unix,
> sending mail is done via the /usr/sbin/sendmail program, but nowadays
> it's very common to have such programs completely misconfigured.
> It's fundamentally a bug in the distributions, I believe, but it's not
> one that we can expect to see fixed any time soon, so we're going to
> have to deal with it.

I can't find what prevents us from using sendmail.el, with a default
bug-report configuration, i.e. a preconfigured smtp server allowing
bug reports.

This server ought to be protected against abuse, but this problem is
not on the client-side at least.

-- 
      Paul




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02  8:07               ` Paul R
@ 2008-06-02 18:56                 ` Reiner Steib
  2008-06-02 19:15                   ` Paul R
  0 siblings, 1 reply; 36+ messages in thread
From: Reiner Steib @ 2008-06-02 18:56 UTC (permalink / raw)
  To: Paul R.; +Cc: emacs-pretest-bug, Florian Beck, Stefan Monnier

On Mon, Jun 02 2008, Paul R wrote:

> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> We definitely have a problem in this respect.  Traditionally on Unix,
>> sending mail is done via the /usr/sbin/sendmail program, but nowadays
>> it's very common to have such programs completely misconfigured.
>> It's fundamentally a bug in the distributions, I believe, but it's not
>> one that we can expect to see fixed any time soon, so we're going to
>> have to deal with it.
>
> I can't find what prevents us from using sendmail.el, with a default
> bug-report configuration, i.e. a preconfigured smtp server allowing
> bug reports.

[So you mean `smtpmail.el'?]  AFAIK many (corporate) firewall
configurations (and ISPs) won't allow outgoing connections from
clients on port 25.

Instead of this, we should better work on a simple web based bug
submission form which can be sent to the bugtracker via Emacs' url
library (or emacs-w3m?).

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02 18:56                 ` Reiner Steib
@ 2008-06-02 19:15                   ` Paul R
  2008-06-03  8:26                     ` tomas
  0 siblings, 1 reply; 36+ messages in thread
From: Paul R @ 2008-06-02 19:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> [So you mean `smtpmail.el'?]  AFAIK many (corporate) firewall
> configurations (and ISPs) won't allow outgoing connections from
> clients on port 25.

That's a serious limitation, indeed.

> Instead of this, we should better work on a simple web based bug
> submission form which can be sent to the bugtracker via Emacs' url
> library (or emacs-w3m?).

Sending mail through http :)
In the same spirit, we can make it send mail to an ssl-only smtp
server listening to 443. This should pass through corporate firewalls.

-- 
      Paul




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02 19:15                   ` Paul R
@ 2008-06-03  8:26                     ` tomas
  2008-06-05  5:15                       ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: tomas @ 2008-06-03  8:26 UTC (permalink / raw)
  To: Paul R; +Cc: emacs-pretest-bug, Florian Beck, Stefan Monnier

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jun 02, 2008 at 09:15:31PM +0200, Paul R wrote:
> Reiner Steib <reinersteib+gmane@imap.cc> writes:
> 
> > [So you mean `smtpmail.el'?]  AFAIK many (corporate) firewall
> > configurations (and ISPs) won't allow outgoing connections from
> > clients on port 25.
> 
> That's a serious limitation, indeed.
> 
> > Instead of this, we should better work on a simple web based bug
> > submission form which can be sent to the bugtracker via Emacs' url
> > library (or emacs-w3m?).
> 
> Sending mail through http :)
> In the same spirit, we can make it send mail to an ssl-only smtp
> server listening to 443. This should pass through corporate firewalls.

Or just not tacitly assume that the machine Emacs is running
on is on the 'net (Horrors!).

Maybe the user just wants to generate a bug report, save it on an USB
stick and mail it later. Ask the user, I'd say, then try a couple of
possibilities _if_ she said "dunno", then maybe give up loudly and
offer to save if all those alternatives fail.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIRQA7Bcgs9XrR2kYRAoodAJ99RSN0xGLM0X5Dyuo6GujC4kaydQCdGMHO
mszuODt6xtDjsadNQz9+M5Y=
=Gjup
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-03  8:26                     ` tomas
@ 2008-06-05  5:15                       ` Stefan Monnier
  2008-06-05 12:41                         ` tomas
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2008-06-05  5:15 UTC (permalink / raw)
  To: tomas; +Cc: emacs-pretest-bug, Paul R, Florian Beck

> Or just not tacitly assume that the machine Emacs is running
> on is on the 'net (Horrors!).

> Maybe the user just wants to generate a bug report, save it on an USB
> stick and mail it later. Ask the user, I'd say, then try a couple of
> possibilities _if_ she said "dunno", then maybe give up loudly and
> offer to save if all those alternatives fail.

A properly configured `sendmail' will handle this just fine, stashing
the message somewhere so it can be sent later on when the destination
is reachable.
That's why a properly configured `sendmail' is the right solution.
Too bad the rest of the world doesn't understand it,


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-02  2:13               ` Florian Beck
  2008-06-02  2:24                 ` Stefan Monnier
@ 2008-06-05  5:27                 ` Stefan Monnier
  2008-06-05 11:53                   ` Florian Beck
  1 sibling, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2008-06-05  5:27 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

> It is from the postfix package, but obviously not configured:

> fb@aeschylus:~$ sendmail
> sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
> fb@aeschylus:~$ echo $?
> 75

That's odd.  From what you said earlier, it seems you're using the
sendmail.el code to send the message.  And that code does (around line
1167):
		     (exit-value (apply 'call-process-region args)))
		(or (null exit-value) (eq 0 exit-value)
		    (error "Sending...failed with exit value %d" exit-value)))

so it should catch a non-0 exit status and signal an error for it.

Could you try and investigate, to see whether you're indeed running this
code and why it doesn't get an exit-value of 75?


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05  5:27                 ` Stefan Monnier
@ 2008-06-05 11:53                   ` Florian Beck
  2008-06-05 13:58                     ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Florian Beck @ 2008-06-05 11:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It is from the postfix package, but obviously not configured:
>
>> fb@aeschylus:~$ sendmail
>> sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
>> fb@aeschylus:~$ echo $?
>> 75
>
> That's odd.  From what you said earlier, it seems you're using the
> sendmail.el code to send the message.  And that code does (around line
> 1167):
> 		     (exit-value (apply 'call-process-region args)))
> 		(or (null exit-value) (eq 0 exit-value)
> 		    (error "Sending...failed with exit value %d" exit-value)))
>
> so it should catch a non-0 exit status and signal an error for it.
>
> Could you try and investigate, to see whether you're indeed running this
> code and why it doesn't get an exit-value of 75?

Yes, this code is run. As far as I can see the following happens:

* append((1 72 "/usr/sbin/sendmail" nil 0 nil "-oi") nil nil ("-oem" "-odb") ("-t") nil)

And then:

Debugger entered--returning value: nil
  call-process-region(1 72 "/usr/sbin/sendmail" "/tmp/emacsY9owP5" 0 nil "-oi" "-oem" "-odb" "-t")
* apply(call-process-region (1 72 "/usr/sbin/sendmail" nil 0 nil "-oi" "-oem" "-odb" "-t"))
* byte-code [snipped]
* sendmail-send-it()
  mail-send()
  mail-send-and-exit(nil)
  call-interactively(mail-send-and-exit nil nil)

However,

> (or (null exit-value) (eq 0 exit-value)
> 		    (error "Sending...failed with exit value %d" exit-value)))

is never run, because it belongs to the else branch of the enclosing if statement.

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05  5:15                       ` Stefan Monnier
@ 2008-06-05 12:41                         ` tomas
  2008-06-05 16:43                           ` Don Armstrong
  0 siblings, 1 reply; 36+ messages in thread
From: tomas @ 2008-06-05 12:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, tomas, Florian Beck, Paul R

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jun 05, 2008 at 01:15:59AM -0400, Stefan Monnier wrote:
> > Or just not tacitly assume that the machine Emacs is running
> > on is on the 'net (Horrors!).

[...]

> A properly configured `sendmail' will handle this just fine, stashing
> the message somewhere so it can be sent later on when the destination
> is reachable.

Actually no. As a counterexample, for my laptop, "the destination" will
never be "reachable" (smtp-wise). I have an smtp running on it because my
distro insists on it and I don't feel like fighting it. I'm sure there
are lots of people aut there with this kind of set-up.

> That's why a properly configured `sendmail' is the right solution.
> Too bad the rest of the world doesn't understand it,

:-)

I have some sympathy for this view... good old times of the UNIX
workstation. But nowadays (for the typical GNU/Linux), the end user
just configures her MUA to talk to some external smtp server (at best).
There is some local smtp thingie (exim or postfix) running and collecting
the complaints of some quirky subsystems (e.g. cron) which prefer to
mail their logs instead of logging them. They land on some mailbox
(typically root) and never get read. The Emacs bug report goes there
too. For a long sleep :-)

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIR98WBcgs9XrR2kYRAsnWAJ9qsO1Ttq+bVC05ZpZGxE9vlVcZ+gCffh4C
cZ0Gvb1aj6XdO8J+I2zhuCc=
=TCRL
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05 11:53                   ` Florian Beck
@ 2008-06-05 13:58                     ` Stefan Monnier
  2008-06-05 14:28                       ` Florian Beck
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2008-06-05 13:58 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

>> That's odd.  From what you said earlier, it seems you're using the
>> sendmail.el code to send the message.  And that code does (around line
>> 1167):
>> (exit-value (apply 'call-process-region args)))
>> (or (null exit-value) (eq 0 exit-value)
>> (error "Sending...failed with exit value %d" exit-value)))
>> 
>> so it should catch a non-0 exit status and signal an error for it.
>> 
>> Could you try and investigate, to see whether you're indeed running this
>> code and why it doesn't get an exit-value of 75?

> Yes, this code is run. As far as I can see the following happens:

> * append((1 72 "/usr/sbin/sendmail" nil 0 nil "-oi") nil nil ("-oem" "-odb") ("-t") nil)

> And then:

> Debugger entered--returning value: nil
>   call-process-region(1 72 "/usr/sbin/sendmail" "/tmp/emacsY9owP5" 0 nil "-oi" "-oem" "-odb" "-t")
> * apply(call-process-region (1 72 "/usr/sbin/sendmail" nil 0 nil "-oi" "-oem" "-odb" "-t"))
> * byte-code [snipped]
> * sendmail-send-it()
>   mail-send()
>   mail-send-and-exit(nil)
>   call-interactively(mail-send-and-exit nil nil)

Can you do M-x trace-function-background RET call-process-region RET,
then run the code, then look at the *trace-output* buffer to see what
call-process-region returns?

>> (or (null exit-value) (eq 0 exit-value)
>> (error "Sending...failed with exit value %d" exit-value)))

> is never run, because it belongs to the else branch of the enclosing
> if statement.

Hmm... which version of sendmail.el is that?  On the trunk and the
Emacs-22 branch, this code is the body of the `let' that runs
call-process-region, so it definitely should be run.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05 13:58                     ` Stefan Monnier
@ 2008-06-05 14:28                       ` Florian Beck
  2008-06-06  6:01                         ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Florian Beck @ 2008-06-05 14:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> That's odd.  From what you said earlier, it seems you're using the
>>> sendmail.el code to send the message.  And that code does (around line
>>> 1167):
>>> (exit-value (apply 'call-process-region args)))
>>> (or (null exit-value) (eq 0 exit-value)
>>> (error "Sending...failed with exit value %d" exit-value)))
>>> 
>>> so it should catch a non-0 exit status and signal an error for it.
>>> 
>>> Could you try and investigate, to see whether you're indeed running this
>>> code and why it doesn't get an exit-value of 75?
>
>> Yes, this code is run. As far as I can see the following happens:
>
>> * append((1 72 "/usr/sbin/sendmail" nil 0 nil "-oi") nil nil ("-oem" "-odb") ("-t") nil)
>
>> And then:
>
>> Debugger entered--returning value: nil
>>   call-process-region(1 72 "/usr/sbin/sendmail" "/tmp/emacsY9owP5" 0 nil "-oi" "-oem" "-odb" "-t")
>> * apply(call-process-region (1 72 "/usr/sbin/sendmail" nil 0 nil "-oi" "-oem" "-odb" "-t"))
>> * byte-code [snipped]
>> * sendmail-send-it()
>>   mail-send()
>>   mail-send-and-exit(nil)
>>   call-interactively(mail-send-and-exit nil nil)
>
> Can you do M-x trace-function-background RET call-process-region RET,
> then run the code, then look at the *trace-output* buffer to see what
> call-process-region returns?

1 -> call-process-region: start=1 end=77 program="/usr/sbin/sendmail" delete=nil buffer=0 display=nil args=("-oi" "-oem" "-odb" "-t")
1 <- call-process-region: nil

According to the docstring, call-process-region doesn't return the exit
value, because buffer=0.
This is because mail-interactive is nil by default.

>>> (or (null exit-value) (eq 0 exit-value)
>>> (error "Sending...failed with exit value %d" exit-value)))
>
>> is never run, because it belongs to the else branch of the enclosing
>> if statement.
>
> Hmm... which version of sendmail.el is that?  On the trunk and the
> Emacs-22 branch, this code is the body of the `let' that runs
> call-process-region, so it definitely should be run.

You are right, of course. Seems I got lost somewhere in the long list of bindings.

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05 12:41                         ` tomas
@ 2008-06-05 16:43                           ` Don Armstrong
  2008-06-05 19:50                             ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Don Armstrong @ 2008-06-05 16:43 UTC (permalink / raw)
  To: emacs-devel

On Thu, 05 Jun 2008, tomas@tuxteam.de wrote:
> Actually no. As a counterexample, for my laptop, "the destination"
> will never be "reachable" (smtp-wise). I have an smtp running on it
> because my distro insists on it and I don't feel like fighting it.

Almost all of the sane distributions configure their default MTA to
send to some smarthost by default. [I know that's how exim, postfix,
and nullmailer are configured in Debian.]

There's no reason not to have a working /usr/lib/sendmail on unix.


Don Armstrong

-- 
No matter how many instances of white swans we may have observed, this
does not justify the conclusion that all swans are white.
 -- Sir Karl Popper _Logic of Scientific Discovery_

http://www.donarmstrong.com              http://rzlab.ucr.edu




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05 16:43                           ` Don Armstrong
@ 2008-06-05 19:50                             ` Stefan Monnier
  0 siblings, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-05 19:50 UTC (permalink / raw)
  To: emacs-devel

>> Actually no. As a counterexample, for my laptop, "the destination"
>> will never be "reachable" (smtp-wise). I have an smtp running on it
>> because my distro insists on it and I don't feel like fighting it.

> Almost all of the sane distributions configure their default MTA to
> send to some smarthost by default. [I know that's how exim, postfix,
> and nullmailer are configured in Debian.]

That requires user-interaction.  It may require updating, etc...
Unless actively uses `sendmail' to send his email, he'll completely
forget to update/fix/configure this, past the initial setup.
All popular MUAs encourage you to not use sendmail, AFAICT.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-05 14:28                       ` Florian Beck
@ 2008-06-06  6:01                         ` Stefan Monnier
  2008-06-06 19:04                           ` Richard M Stallman
                                             ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-06  6:01 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug

>> Can you do M-x trace-function-background RET call-process-region RET,
>> then run the code, then look at the *trace-output* buffer to see what
>> call-process-region returns?

> 1 -> call-process-region: start=1 end=77 program="/usr/sbin/sendmail" delete=nil buffer=0 display=nil args=("-oi" "-oem" "-odb" "-t")
> 1 <- call-process-region: nil

> According to the docstring, call-process-region doesn't return the exit
> value, because buffer=0.
> This is because mail-interactive is nil by default.

Duh!  Thank you for tracking this down.  I've changed the default of
mail-interactive with the patch below.


        Stefan


--- sendmail.el.~1.314.~	2008-05-11 17:49:35.000000000 -0400
+++ sendmail.el	2008-06-06 01:58:09.000000000 -0400
@@ -114,7 +114,11 @@
   :group 'sendmail)
 
 ;;;###autoload
-(defcustom mail-interactive nil
+(defcustom mail-interactive t
+  ;; We used to use a default of nil rather than t, but nowadays it is very
+  ;; common for sendmail to be misconfigured, so one cannot rely on the
+  ;; bounce message to be delivered anywhere, least of all to the
+  ;; user's mailbox.
   "Non-nil means when sending a message wait for and display errors.
 nil means let mailer mail back a message to report errors."
   :type 'boolean




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-06  6:01                         ` Stefan Monnier
@ 2008-06-06 19:04                           ` Richard M Stallman
  2008-06-07  1:24                             ` Stefan Monnier
  2008-06-07  2:28                           ` Florian Beck
                                             ` (2 subsequent siblings)
  3 siblings, 1 reply; 36+ messages in thread
From: Richard M Stallman @ 2008-06-06 19:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, abstraktion

My original reason for making mail-interactive default to nil
was that t was noticeably slow.

That reason may be obsolete now that machines are faster.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-06 19:04                           ` Richard M Stallman
@ 2008-06-07  1:24                             ` Stefan Monnier
  0 siblings, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-07  1:24 UTC (permalink / raw)
  To: rms; +Cc: emacs-pretest-bug, abstraktion

> My original reason for making mail-interactive default to nil
> was that t was noticeably slow.

Yes, that's what I expected.

> That reason may be obsolete now that machines are faster.

I hope so.  If not, we'll just have to use start-process, which isn't
that bad either.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-06  6:01                         ` Stefan Monnier
  2008-06-06 19:04                           ` Richard M Stallman
@ 2008-06-07  2:28                           ` Florian Beck
  2008-06-07 14:23                             ` Chong Yidong
  2008-06-07  7:50                           ` Reiner Steib
  2008-06-13  4:15                           ` Kevin Rodgers
  3 siblings, 1 reply; 36+ messages in thread
From: Florian Beck @ 2008-06-07  2:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Duh!  Thank you for tracking this down.  I've changed the default of
> mail-interactive with the patch below.

Embarrassingly, I cannot verify this, because after I had a stab at
configuring sendmail ubuntu doesn't let my un-configure what I have
done. Even after brutally deleting files I have touched, sendmail now
refuses to return an error code.

Anyway, your patch does of course *not* help in the case that sendmail
or postfix is halfway configured, ie. delivers mail locally (which means
in practise the mail most likely is never seen). This is quite likely to
happen because, as far as I remember, either anti spam software or some
web server stuff required me to install postfix (but it didn't require
that it worked properly).

Maybe Emacs should require the user to set up her mail. That is, if not
configured, it should return an error. Inconvenient with emacs -Q,  I
know. Probably worth it if you consider it likely sendmail is misconfigured.

>
>         Stefan
>
> --- sendmail.el.~1.314.~	2008-05-11 17:49:35.000000000 -0400
> +++ sendmail.el	2008-06-06 01:58:09.000000000 -0400
> @@ -114,7 +114,11 @@
>    :group 'sendmail)
>
>  ;;;###autoload
> -(defcustom mail-interactive nil
> +(defcustom mail-interactive t
> +  ;; We used to use a default of nil rather than t, but nowadays it is very
> +  ;; common for sendmail to be misconfigured, so one cannot rely on the
> +  ;; bounce message to be delivered anywhere, least of all to the
> +  ;; user's mailbox.
>    "Non-nil means when sending a message wait for and display errors.
>  nil means let mailer mail back a message to report errors."
>    :type 'boolean

-- 
Florian Beck




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-06  6:01                         ` Stefan Monnier
  2008-06-06 19:04                           ` Richard M Stallman
  2008-06-07  2:28                           ` Florian Beck
@ 2008-06-07  7:50                           ` Reiner Steib
  2008-06-13  4:15                           ` Kevin Rodgers
  3 siblings, 0 replies; 36+ messages in thread
From: Reiner Steib @ 2008-06-07  7:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Florian Beck

On Fri, Jun 06 2008, Stefan Monnier wrote:

>  ;;;###autoload
> -(defcustom mail-interactive nil
> +(defcustom mail-interactive t
> +  ;; We used to use a default of nil rather than t, but nowadays it is very
> +  ;; common for sendmail to be misconfigured, so one cannot rely on the
> +  ;; bounce message to be delivered anywhere, least of all to the
> +  ;; user's mailbox.
>    "Non-nil means when sending a message wait for and display errors.
>  nil means let mailer mail back a message to report errors."
>    :type 'boolean

You should add a :version tag to indicate the change of the default.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-07  2:28                           ` Florian Beck
@ 2008-06-07 14:23                             ` Chong Yidong
  0 siblings, 0 replies; 36+ messages in thread
From: Chong Yidong @ 2008-06-07 14:23 UTC (permalink / raw)
  To: Florian Beck; +Cc: emacs-pretest-bug, Stefan Monnier

Florian Beck <abstraktion@t-online.de> writes:

> Anyway, your patch does of course *not* help in the case that sendmail
> or postfix is halfway configured, ie. delivers mail locally (which means
> in practise the mail most likely is never seen). This is quite likely to
> happen because, as far as I remember, either anti spam software or some
> web server stuff required me to install postfix (but it didn't require
> that it worked properly).

I don't see how we could detect this case.

Maybe we could add a warning message to the instruction text of the
email buffer that report-emacs-bug creates, saying that this will
attempt to use `sendmail' or a similar smtp program to send the email,
and the user shouldn't use it if this isn't set up.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-06  6:01                         ` Stefan Monnier
                                             ` (2 preceding siblings ...)
  2008-06-07  7:50                           ` Reiner Steib
@ 2008-06-13  4:15                           ` Kevin Rodgers
  2008-06-13 14:17                             ` Stefan Monnier
  3 siblings, 1 reply; 36+ messages in thread
From: Kevin Rodgers @ 2008-06-13  4:15 UTC (permalink / raw)
  To: emacs-devel; +Cc: emacs-pretest-bug

Stefan Monnier wrote:
>>> Can you do M-x trace-function-background RET call-process-region RET,
>>> then run the code, then look at the *trace-output* buffer to see what
>>> call-process-region returns?
> 
>> 1 -> call-process-region: start=1 end=77 program="/usr/sbin/sendmail" delete=nil buffer=0 display=nil args=("-oi" "-oem" "-odb" "-t")
>> 1 <- call-process-region: nil
> 
>> According to the docstring, call-process-region doesn't return the exit
>> value, because buffer=0.
>> This is because mail-interactive is nil by default.
> 
> Duh!  Thank you for tracking this down.  I've changed the default of
> mail-interactive with the patch below.

Just curious: Why not leave the default as-is and let-bind the variable
in emacs-report-bug?

> --- sendmail.el.~1.314.~	2008-05-11 17:49:35.000000000 -0400
> +++ sendmail.el	2008-06-06 01:58:09.000000000 -0400
> @@ -114,7 +114,11 @@
>    :group 'sendmail)
>  
>  ;;;###autoload
> -(defcustom mail-interactive nil
> +(defcustom mail-interactive t
> +  ;; We used to use a default of nil rather than t, but nowadays it is very
> +  ;; common for sendmail to be misconfigured, so one cannot rely on the
> +  ;; bounce message to be delivered anywhere, least of all to the
> +  ;; user's mailbox.
>    "Non-nil means when sending a message wait for and display errors.
>  nil means let mailer mail back a message to report errors."
>    :type 'boolean

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: 23.0.60; emacs-report-bug fails silently
  2008-06-13  4:15                           ` Kevin Rodgers
@ 2008-06-13 14:17                             ` Stefan Monnier
  0 siblings, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2008-06-13 14:17 UTC (permalink / raw)
  To: Kevin Rodgers; +Cc: emacs-pretest-bug, emacs-devel

>> Duh!  Thank you for tracking this down.  I've changed the default of
>> mail-interactive with the patch below.

> Just curious: Why not leave the default as-is and let-bind the variable
> in emacs-report-bug?

Because lost email is bad, not just for bug-reports.


        Stefan




^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2008-06-13 14:17 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 12:59 23.0.60; emacs-report-bug fails silently Florian Beck
2008-05-30 13:59 ` Lennart Borgman (gmail)
2008-05-30 21:42   ` Florian Beck
2008-05-30 21:52     ` Lennart Borgman (gmail)
2008-05-31  0:44       ` Florian Beck
2008-05-31  9:18         ` Lennart Borgman (gmail)
2008-05-31 10:56           ` Reiner Steib
2008-06-01  2:47           ` Florian Beck
2008-06-01  8:04             ` Lennart Borgman (gmail)
2008-05-31  9:53         ` Reiner Steib
2008-06-01  2:54           ` Florian Beck
2008-06-01  7:59             ` Lennart Borgman (gmail)
2008-06-02  0:38             ` Stefan Monnier
2008-06-02  2:13               ` Florian Beck
2008-06-02  2:24                 ` Stefan Monnier
2008-06-05  5:27                 ` Stefan Monnier
2008-06-05 11:53                   ` Florian Beck
2008-06-05 13:58                     ` Stefan Monnier
2008-06-05 14:28                       ` Florian Beck
2008-06-06  6:01                         ` Stefan Monnier
2008-06-06 19:04                           ` Richard M Stallman
2008-06-07  1:24                             ` Stefan Monnier
2008-06-07  2:28                           ` Florian Beck
2008-06-07 14:23                             ` Chong Yidong
2008-06-07  7:50                           ` Reiner Steib
2008-06-13  4:15                           ` Kevin Rodgers
2008-06-13 14:17                             ` Stefan Monnier
2008-06-02  8:07               ` Paul R
2008-06-02 18:56                 ` Reiner Steib
2008-06-02 19:15                   ` Paul R
2008-06-03  8:26                     ` tomas
2008-06-05  5:15                       ` Stefan Monnier
2008-06-05 12:41                         ` tomas
2008-06-05 16:43                           ` Don Armstrong
2008-06-05 19:50                             ` Stefan Monnier
2008-06-01  5:36     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).