Mailpile just hangs?


first, thanks for the forum!
I am kinda partial to IRC but gotta admit that it didnt seem particularly active?
Anyway, beggars cant be choosers :grin:
I installed mailpile on a debian based distro, which I have actually done before successfully (on another system but similar setup), but for whatever reason this time it is not working, like at all. I try to start it up from the terminal prompt “mailpile” and it just hangs, nothing. I checked in firefox using http://localhost:33411/ but that just came up with a “Unable to connect” error. I tried with dmesg in another window but dmesg didnt register anything? (might not have used it right though, “watch dmesg” right?). I looked for some .whatever files and directories to see if I could rm any config stuff and try to run it but there didnt seem to be any?

I know this is not much to go on, are there some log files or something that I could post that might shed some more light on this issue?



Hi Lee!

You’re right, that’s not much to go on. :wink: It would be good if you would start by telling us how you installed Mailpile (apt? .deb? github? Which version/repo/…) and then tell us what commands you ran.

There’s still too much guesswork required here for me to understand what happened, and if I don’t know what you did I can’t venture any guesses as to why it didn’t work.


Doh! Sorry, those were some pretty obvious omissions.
Ok. I installed pretty much verbatim from the mailpile page:
using apt-get, though I am not sure about which version repo… the latest perhaps as it doesnt throw up any errors when I run apt-get update/upgrade.
I have mainly just tried running “mailpile” at the cmd prompt, and mailpile --help :slight_smile:
I tried running dmesg in a separate terminal window but that didnt seem to yeild anything.
I’d be happy to post a log or something, I just dont know which log or where to find logs on my system, sorry ima bit of a noob :frowning:

PS Please dont take my not-much-going-on-in-IRC as a diss, I was just saying its good to have a less “ephemeral” medium to ask questions :slight_smile:


It’s normal that nothing shows in dmesg, dmesg really only shows kernel-related events (devices and networking, things like that). But if running mailpile at the command prompt just hangs, that’s strange.

I would expect at least some output, but if it hangs without printing anything at all… I just dunno. Never seen that! If it’s a very weak machine, I guess it might take a little while to compile all the Python resources and get started. But usually not more than a few seconds.

If you run mailpile and leave it hanging, and then run top in another window, do you see a mailpile or python process consuming a lot of CPU? Can you tell me exactly what Linux distribution you are running? Is it in a VM?

I’m a bit stumped here. If anyone else has ideas, please feel free to chime in!


Perhaps something outside of Mailpile? Disk space or free inodes exhausted maybe?


Just checked to make sure, diskspace is fine but I hadn’t thought of that :slight_smile :slight_smile:
but regarding inodes, I am not familiar with that, how would i check?


its def taking more than a few seconds, I have left it for over an hour and still just hangs.
strangely I didnt see it in top but when I run htop I see:
the command /usr/bin/python /usr/bin/mailpile, taking up 152M virt mem, 0.0% CPU, and 1.9% mem
ah yes, its indeed running in a vm on whonix
I have gotten this setup to work previously, no issues at all but this time when I installed mailpile it just hangs. :slight_smile:
I really like mailpile so I am really hoping to get this working but am no guru :frowning:


Does it print anything at all to the screen?


quite literally nothing :frowning:
I type “mailpile” then return and then blankness, no prompt, nada
I dont know if this counts but when I ^c out it gives me some text, shall i paste that here?

eh. I decided to paste it just in case:

user@host:~$ mailpile
^CTraceback (most recent call last):
  File "/usr/bin/mailpile", line 10, in <module>
  File "/usr/lib/python2.7/dist-packages/mailpile/", line 6, in main
  File "/usr/lib/python2.7/dist-packages/mailpile/", line 207, in Main
  File "/usr/lib/python2.7/dist-packages/mailpile/", line 43, in DetectBinaries
  File "/usr/lib/python2.7/", line 181, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/dist-packages/mailpile/", line 233, in wait
    rv = Unsafe_Popen.wait(self, *args, **kwargs)
  File "/usr/lib/python2.7/", line 1073, in wait
    pid, sts = _eintr_retry_call(os.waitpid,, 0)
  File "/usr/lib/python2.7/", line 121, in _eintr_retry_call
    return func(*args)


That is useful! Your Mailpile is hanging trying to check if the apps it requires are installed. If you run the following commands yourself from the shell, what happens?

  1. gpg --version
  2. dirmngr --version
  3. gpg-agent --version
  4. openssl version
  5. tor --version

Do any of them hang? Are any missing?


yeah, good to hear that I was able to provide at least some useful output.
Ok, I get the following from the first 4 commands:

gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/user/.gnupg
Supported algorithms:
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
dirmngr (GnuPG) 2.1.18
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gpg-agent (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
OpenSSL 1.1.0j  20 Nov 2018

but tor hangs.
This is starting to sound familar, problems with tor that is. Though last time it tor was apparently the default browser and mailpile would pull up the torbrowser and apparently tor didnt like mailpile, or visaversa?


It’s really weird if Tor hangs when you just ask it for the version number. But that’s your culprit!

What if you run it this way?

$ tor -f /dev/null --version


hmmm, that apparently just makes it hang as well
is there any reason mp shouldnt work with tor?


Very strange. Your Tor shouldn’t be hanging like that. If you get that fixed, things will work. It would also be really cool to know why, and document that here for others who have the same issue.

But… as a workaround you can also go to the source and just comment out tor from the mailpile.platforms module. Then things won’t hang until (unless) you actually ask Mailpile to launch Tor.

I need to fix things at my end so that doesn’t hang forever, and probably to make the Tor dependency a warning rather than a hard failure. I’ll be filing an issue for that…


for what its worth, if i run “torbrowser” then the tor browser pops right up, but not when i type “tor” (“tor” just hangs) could that be part of the problem?
Regarding the workaround, where would the mailpile.platforms module be located?
Thanks for all the help, really really appreciated.


Tor is not the Tor browser, it’s the backend daemon that manages connections to the Tor network. I just apt install tor, I have no idea what ships with the browser or whether it’s somehow weirdly different.

You can find your mailpile.platforms like so:

$ dpkg -L mailpile |grep

… but if you hand-edit that, it will probably get overwritten next time Mailpile updates. Hopefully I’ll have patched the issue by then.


ah right. ok well I will give the workaround a try.
Thanks again!!


(Note I edited my previous response, it had typoes and got posted prematurely.)


Thanks for the note.
So i tried, and got:
user@host:~$ dpkg -L mailpile |grep

so i assumed it was the so edited the section like below:
# These are the binaries we want, and the test we use to detect whether
# they are available/working.
‘GnuPG’: [‘gpg’, ‘–version’],
‘OpenSSL’: [‘openssl’, ‘version’],
# ‘Tor’: [‘tor’, ‘–version’]}

Then tried mailpile and got:
user@host:~$ mailpile
Traceback (most recent call last):
File “/usr/bin/mailpile”, line 6, in
from mailpile.main import main
File “/usr/lib/python2.7/dist-packages/mailpile/”, line 2, in
from import Main
File “/usr/lib/python2.7/dist-packages/mailpile/”, line 8, in
import mailpile.util
File “/usr/lib/python2.7/dist-packages/mailpile/”, line 28, in
from mailpile.safe_popen import Popen, PIPE
File “/usr/lib/python2.7/dist-packages/mailpile/”, line 30, in
import mailpile.platforms
File “/usr/lib/python2.7/dist-packages/mailpile/”, line 24
def _assert_file_exists(path):
SyntaxError: invalid syntax

so am I editing the wrong file or does “#” not suffice? (sorry I know almost nothing about coding)


You need to move the closing } to the previous line (instead of the trailing comma).