tree: 28cb9a82d6b8d9df641b58ee84a975688ace478f [path history] [tgz]
  1. endpoints/
  2. plugins/
  3. testendpoints/
  4. main.py
  5. openapi.yaml
  6. ponymail.yaml.example
  7. README.md
  8. requirements.txt
  9. server_version.py
  10. update_version.sh
server/README.md

Pony Mail Foal - Backend UI Server

This is the (as of yet incomplete) backend server for the Foal UI.

Progress

What works

  • The “phone book” (front page)
  • Browsing threads on a list
  • Viewing single threads, emails and sources
  • Searching with keywords, quotes, +/- inclusion/exclusion
  • Rudimentary AAA (logged in with an authoritative OAuth gives read access to everyting)
  • Persistent user sessions across restarts of the server
  • OAuth logins (Google, Github + Generic for now)
  • Composing replies
  • Mbox downloads

What doesn't work

  • Preferences
  • Notifications/favorites

While rudimentary AAA works, the backend should not yet be used for private email archives unless restricted behind some form of external/parent authentication mechanism.

How to run:

See the Installation documentation for instructions on how to install Foal.

Once followed, this should fire up a backend server on 127.0.0.1:8080. You can then proxy to that using a web server of your choice. The /api/ URL of your online archive should be passed straight to the backend, while the rest should be served from the webui/ directory in this repository.

An example Apache HTTPd configuration could be (for plain-text HTTP):

<VirtualHost *:80>
    ServerName archives.example.com        
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/foal/webui/
    # PathInfo is needed for threads
    AcceptPathInfo On
    # Also needed for threads to be able to handle message-ids with embedded /:
    AllowEncodedSlashes On # (or NoDecode)
    ProxyPass /api/ http://localhost:8080/api/
    <Directory /var/www/foal/webui/>
        Require all granted
        # MultiViews means you can shorten threads to https://localhost/thread/blablabla
        Options +MultiViews
    </Directory>
</VirtualHost>