Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only listening to localhost by default #82

Closed
metakermit opened this issue Aug 12, 2013 · 5 comments
Closed

Only listening to localhost by default #82

metakermit opened this issue Aug 12, 2013 · 5 comments

Comments

@metakermit
Copy link
Contributor

The Mailpile web app is listening to localhost only by default

#  lsof -i
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
python   31 root    3u  IPv4 387163      0t0  TCP localhost:33411 (LISTEN)

This makes e.g. development in Vagrant/Docker difficult. The current way of changing this is a bit too complicated:

  1. ./mp
  2. S http_host=0.0.0.0
  3. Ctrl+D
  4. ./mp

Expected behaviour - listen on 0.0.0.0 by default (it is a web app after all) or at least offer an easy option to start it that way, e.g.

./mp -l 0.0.0.0:33411

or accept a config file that sets all the variables.

@BjarniRunar
Copy link
Member

Why is ./mp --set http_host=0.0.0.0 not good enough?

@BjarniRunar
Copy link
Member

Also, listening on anything but localhost by default is not going to happen until we have strong authentication and a fair bit of code reviews, this is not a public server app, this is a personal search engine for e-mail and provides access to large amounts of personal data.

@metakermit
Copy link
Contributor Author

Yup, the --set http_host=0.0.0.0 option is what I was looking for. Thanks!

metakermit added a commit to metakermit/Mailpile that referenced this issue Aug 13, 2013
@metakermit
Copy link
Contributor Author

OK, I added this to the README in #83 (sorry for the multiple comments, I had some trouble getting the anchor link right, so I had to ammend the commit a few times).

BjarniRunar added a commit that referenced this issue Aug 27, 2013
doc: clarify web app listening to 0.0.0.0, fix #82
@dhoe dhoe mentioned this issue Apr 13, 2014
@ghost
Copy link

ghost commented Sep 23, 2014

Just in case someone has the same problem, learn that you should use:
$ ./mp --set sys.http_host="0.0.0.0"

Not this:
$ ./mp --set http_host="0.0.0.0"
Failed to configure i18n. Using fallback.
Traceback (most recent call last):
File "/home/nuage/Mailpile/mailpile/commands.py", line 474, in _run_sync
return self._finishing(command, command(self, _args, *_kwargs))
File "/home/nuage/Mailpile/mailpile/commands.py", line 471, in command
return self.command(_args, *_kwargs)
File "/home/nuage/Mailpile/mailpile/commands.py", line 1623, in command
cfg[var] = value
File "/home/nuage/Mailpile/mailpile/config.py", line 782, in setitem
checker = self.get_rule(key)[self.RULE_CHECKER]
File "/home/nuage/Mailpile/mailpile/config.py", line 687, in get_rule
) % (self._name, key))
InvalidKeyError: Invalid key for config: http_host

set error: Failed: set http_host=0.0.0.0
Elapsed: 0.002s (set: Failed: set http_host=0.0.0.0)

Failed: Failed: set http_host=0.0.0.0

The solution is here: #474
Thanks for the great project!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants