§2024-11-01

# HARAKA_VERSION="3.0.5" defined in 01_install_commits.sh

npm install --production --no-optional --no-package-lock --no-audit --no-shrinkwrap --unsafe-perm -g Haraka@$HARAKA_VERSION

The command you provided is for installing the Haraka email server globally using npm (Node Package Manager). Here’s a breakdown of the options used:

install: This command tells npm to install a package. --production: Installs only the dependencies required for running the application, excluding devDependencies. --no-optional: Skips the installation of optional dependencies. --no-package-lock: Prevents the creation of a package-lock.json file. --no-audit: Disables auditing of the package for vulnerabilities. --no-shrinkwrap: Ignores any existing npm-shrinkwrap.json file. --unsafe-perm: Allows scripts to run with root privileges; this is sometimes necessary for global installs. -g: Installs the package globally, making it accessible from anywhere on the system. Haraka@$HARAKA_VERSION: Specifies the package name (Haraka) and uses the version stored in the environment variable HARAKA_VERSION

$ command -v haraka
/usr/bin/haraka

The command haraka -i /opt/haraka is used to initialize a new Haraka email server instance in the specified directory (/opt/haraka). Here’s a brief explanation of what it does:

haraka: This is the command to run Haraka.

$ ls -l /opt/haraka/
total 24
drwxr-xr-x   3 deploy   deploy   4096 Sep 27 14:42 config
drwxr-xr-x   2 deploy   deploy      6 Sep 27 14:40 docs
drwxr-xr-x 134 deploy   deploy   8192 Sep 27 14:40 node_modules
-rw-r--r--   1 deploy   deploy    249 Sep 27 14:40 package.json
drwxr-xr-x   3 deploy   deploy     22 Sep 27 14:40 plugins
drwxr-xr-x   2 wildduck wildduck    6 Sep 27 14:41 queue
-rw-r--r--   1 deploy   deploy    906 Sep 27 14:40 README