- username_min_length and username_max_length are both set to a
default value of 9 in the chatmail.ini.f template. When they have
the same value, it doesn't matter which one we use in newemail.py
(which handles the /new URL). However, if they are configured to
different values by the admin, then the current implementation using
username_min_length chooses from a smaller set of possible
usernames.
- Revised create_newemail_dict() in newemail.py to use
username_max_length as the length of the random username it offers
via the /new URL. This randomizes within a much larger set of
possible usernames.
- Implemented changes suggested in review by missytake:
- Removed relation between acmetool-redirector and certs.
- Added internal nginx listening on port 8443.
- Changed direction of arrows between certs and the services that
use them. This makes the arrow show the direction of
information flow, rather than a "depends on" relation.
- For filesystem paths, added a descriptive name to the node.
- Replaced most arrows with plain lines, to simply show that a
relationship exists between the two nodes. This also reduces visual
clutter, since the graph is pretty dense with information already.
- Split nginx and certs into two nodes, to reduce entanglement in the
graph. These "linked" nodes are given a different shape and filled
with a different colour, to highlight the fact that they are the
same node.
- Revised text about the meaning of edges in the graph.
- For starters, this file is just a diagram of components of a
chatmail server. In the future, this document can grow into a more
complete description of the architecture of the server, the
deployment process, and the design intent behind what is and isn't
in the code base.
- The name ARCHITECTURE.md is inspired by this article, which also has
good suggestions about what to put in the file:
https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html
- Before proceeding with installation of Python dependencies, check
whether the 'gcc' command is available by running it with the
--version argument. If it is not available, print a helpful message
and exit.
- For the current set of Python dependencies, without GCC, the build
process fails when building the crypt-r package. According to the
error message, on my system the exact command it tries to run is
'x86_64-linux-gnu-gcc', but rather than depend on this variant
specifically, the script checks for the generic 'gcc' command, so as
to avoid coupling the check to an architecture or operating system.
Similar problems arise if we attempt to check for packages by name;
the compiler binary is provided by 'gcc-11', but the symlinks that
provide the unversioned commands (as used by the Python build) come
from a package named 'gcc'. Trying to be too precise in what we
check for could lead to unnecessary failures in some environments,
or become a maintenance challenge in the future. For that reason,
this change simply attempts to run 'gcc' and uses that as a
probably-sufficient proxy for having what the Python package install
will need.
- The Python modules installed by initenv.sh require a compiler to build.
- Revised initenv.sh to check whether build-essential is installed
before proceeding, if the system is based on Debian or Ubuntu.
- Added 'try' blocks around the 'git rev-parse' and 'git diff'
commands that are run in deploy_chatmail(). If there is an error
running rev-parse, git_hash is set to "unknown". If there is an
error running diff, git_diff is set to the null string.
- This allows the deployment process work in two scenarios that would
otherwise fail with an exception:
- Systems where the 'git' command is not available.
- When running with a copy of the tree content of chatmail/relay,
but without a copy of the .git directory.