Use YAMN with Tor (Debian/Ubuntu)

For Linux users there currently is only a command line version of YAMN remailer. If you haven't already done so install YAMN on Linux by following this tutorial, and after you are done return here to learn how to use YAMN with Tor under Linux.

  • You will need to install 3 additional programs: Tor, Socat and Curl. As root or sudo user:

    root@debian:~$ apt update
    root@debian:~$ apt install tor socat curl

    Tor will now be running in the background on your computer! There is no need to "start it" or "turn it on".

  • Exit root user and log in as user yamn.

  • Now we are logged in as user yamn. Yes, Tor is still running in the background ;) We will now replace your current Yamn configuration file with a configuration that works with Tor.

    yamn@debian:~$ cd ~yamn
    yamn@debian:~/yamn$ mv yamn.yml yamn.yml.old
    yamn@debian:~/yamn$ wget 
    yamn@debian:~/yamn$ mv yamn.yml.tor yamn.yml

  • Now we want to start Socat. Socat is a relay tool. Like Tor you won't see it running. But it will be running in the background. After we start it up it will sit between your Yamn client and your local Tor and will allow for relaying of your message(s) to the remote Tor hidden service we have chosen, i.e. b42o7yhesx3fon7bzak4rkq7ax2yoanzapykqpzyznil6obcybe3zlyd.onion.

    yamn@debian:~/yamn$ socat TCP-Listen:5870,bind=localhost,fork SOCKS4A:localhost:b42o7yhesx3fon7bzak4rkq7ax2yoanzapykqpzyznil6obcybe3zlyd.onion:587,socksport=9050

    (That very long command should be on one line.)

    yamn@debian:~/yamn$ CTL-Z
    yamn@debian:~/yamn$ bg

  • Now that we have both Tor and socat running in the background we can compose a message and send it through Yamn & Tor. But first we need to download some fresh YAMN stats and keys. We use Curl for this task:

    yamn@debian:~$ cd ~yamn 
    yamn@debian:~/yamn$ curl -s --socks5-hostname -O -O
  • Be patient here. Doing things through Tor is always slower.

  • Now we are ready to compose our message in a file message.txt and send it out. Here is a sample message.txt for you to use:.

    yamn@debian:~/yamn$ wget

    Change to a valid recipient address.

  • Once your outgoing message.txt is composed, save it and exit your text editor. At the command line do:

    yamn@debian:~/yamn$ yamn --mail < message.txt

    This will create an encrypted YAMN message chained through three random remailers and place it into ~/yamn/pool

  • To send out the messages in your pool do:

    yamn@debian:~/yamn$ yamn -S
  • It should be sent out through the Tor network. You can tell that Tor DID NOT send it out if you see this warning in yamn.log:

  • yamn@debian:~/yamn$ Warn: 2022/02/14 15:45:24 pool.go:76: Pool mailing failed:
     dial tcp connect: connection refused
  • If you are finished with YAMN you may now shut down the Socat background process:

    yamn@debian:~/yamn$ ps ax | grep "socat"
    yamn@debian:~/yamn$ 27219 ? S  0:00 socat TCP-Listen:5870,bind=localhost,fork SOCKS4A [...]
    yamn@debian:~/yamn$ kill -9 27219
  • Done!

back Home Back Home