Bug 17538 - calls mailx from Firefox in a bad way
Summary: calls mailx from Firefox in a bad way
Status: CLOSED FIXED
Alias: None
Product: Branch 4.0
Classification: Distributions
Component: url_handler (show other bugs)
Version: 4.0
Hardware: all Linux
: P2 critical
Assignee: Dmitry V. Levin
QA Contact: Q.A. 4.0
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-12 23:53 MSD by Ivan Zakharyaschev
Modified: 2010-11-24 08:10 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2008-10-12 23:53:48 MSD
url_handler-0.3.0-alt1

In Lite 4.0.3, if you press on a "mailto" link in Firefox, an undesirable thing happens: (only the last handler is available, it's mailx) mailx is not run in a terminal, so it has no input, and as a result, it even not merely fails, but rather sends some message (empty? or whatever -- that's not important) without your consent to send it.

Probably, that's either because the specification

'/usr/bin/mailx --':VT

in /etc/urlview/url_handlers has un unsuitable mode (VT: Launch in the same terminal) or because the VT mode is not handled correctly in the script (it shouldn't be started if there is no interactive input).

The latter thing must be fixed: a VT program shouldn't be run with no interactive input: so either it should forcibly run in an xterm in such case, or it should simply fail.

As for the first thing, I don't know whether XT would indeed be a better mode for mailx.
Comment 1 Ivan Zakharyaschev 2008-10-13 00:45:54 MSD
What happens:

$ mailx -v -- imz < /dev/null
No message, no subject; hope that's ok
Mail Delivery Status Report will be mailed to <imz>.
$ 
Comment 2 Ivan Zakharyaschev 2008-10-13 00:49:30 MSD
One more possible workaround/solution/enhancement: call mailx in url_handlers in a forced interactive mode; then it will fail in such cases:

$ mailx -v -I -- imz < /dev/null
mailx: tcgetattr: Inappropriate ioctl for device
$ 

But that won't solve the problem of sending mail from Firefox when no other mailers are available. So, there is still need for some modification, such that xterm will be used in such cases.
Comment 3 Ivan Zakharyaschev 2008-10-18 20:00:11 MSD
<a href="mailto:imz@example.com">An example link</a> to press in Firefox (which generates an empty message).

Another way to reproduce: right click, and "Send" in the menu. It generates an empty message to nowhere. (See postfix logs.)
Comment 4 Repository Robot 2010-11-24 05:14:43 MSK
url_handler-0.3.1-alt1 -> sisyphus:

* Wed Nov 24 2010 Dmitry V. Levin <ldv@altlinux> 0.3.1-alt1
- url_handler.sh: added "mailto" type autodetection (closes: #24627).
- url_handlers: changed mailx mode to XT (closes: #17538).
- url_handler.sh: treat BROWSER and MAILER environment variables as
  colon-separated lists without necessary full path (closes: #3482).