Skip to content

Quickstart

Joshua Thijssen edited this page Jun 29, 2020 · 18 revisions

Tutorial on how to setup your BitMealum server and client.

(still much in progress, so not everything works already)

On a server with a public IP

  1. Generate your server configuration

     ./bm-config init-config --server
    

    This will generate a template server-config.yml. Make sure you configure these settings properly, but the default settings should be secure enough. Note that you will need to change the config.server.host setting to either your public IP or 0.0.0.0 if you want to listen on all interfaces.

  2. Obtain a server certificate and key for your given hostname (see LetsEncrypt certificates).

    You can generate your own self-signed certificates by using:

     ./bm-config generate-cert --domain <bitmaelum.example.org>
    

    The certificates are stored in server.cert and server.key. Make sure you point to these files in your server-config.yaml file. Note that running with self-signed certificates is NOT RECOMMENDED as other mail-servers can deny mail from servers with invalid or self-signed certificates.

  3. Run the mail server:

      ./bm-server
    

    This will start the server on 127.0.0.1:2424 by default. Configure your server-config.yml if you want to make your server accessible from the outside world (you need a valid certificate if you want to communicate with other mail-servers)

    Test the server by running an HTTP request to it:

       curl 127.0.0.1:2424
    

    This should return a nice BitMaelum logo.

  4. Invite a new address to register on the server:

      ./bm-config create-invite <address\!>
    

    This will result in a token which you need to use when registering your account locally.

On your local computer

Set up your email account and register it to your mail server:

  1. Generate a client configuration and change its settings according to your needs.

      ./bm-config init-config --client
    
  2. Create a new mail account:

      ./bm-client account create <address\!> <mailserver>
    

    This will ask all kinds of questions in order to set up your account and register it at your mail-server. Note that you will need the invitation token as generated on the mail-server.

The invitation token only works for the specified address and is not valid for any other address. Tokens are also valid for a default of 30 days.

  1. Send out a test email to the global bouncer to see if things work:

     ./bm-client send --from "<address\!>" --to "hello@bitmealum\!" \
       --subject "New account created" \
       --blocks "text,Hello world"
    

    This will return a lovely message back to your address.

  2. Read your email:

     ./bm-client read <address\!>
    
Clone this wiki locally