### Installer prompt transcript Source: https://docs.ubersmith.com/article.php?id=231&oid=36 Example terminal output while the installer checks for pip, installs Ansible and Ubersmith, and asks for the installation directory, hostname, and admin email. ```text Checking for pip... Installing Ansible... Installing Ubersmith... Choose an installation directory for Ubersmith [/usr/local/ubersmith]: Enter the hostname where you will be hosting Ubersmith [ubersmith.example.com]: Enter the email address of the Ubersmith administrator [admin@example.org]: ``` -------------------------------- ### Decompress installer tarball example with version 3.1.13 Source: https://docs.ubersmith.com/article.php?id=231&oid=36 Concrete example of the tar command using the release version v3.1.13. Run while logged in as root. ```shell tar zxf ubersmith-installer-v3.1.13.tar.gz ``` -------------------------------- ### Remove Setup Directory After Install Source: https://docs.ubersmith.com/article.php?id=231 Remove /setup to load the UI. Run from /usr/local/ubersmith using Docker Compose. ```bash docker-compose exec web rm -rf /var/www/ubersmith_root/app/www/setup ``` -------------------------------- ### Start Ubersmith with Docker Compose Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Commands to navigate to the installation directory and start the Ubersmith containers in detached mode. ```bash # cd /usr/local/ubersmith # docker compose up -d ``` -------------------------------- ### Start Docker service Source: https://docs.ubersmith.com/article.php?id=231 Command to start the Docker service to ensure it is up and running. ```bash service docker start ``` -------------------------------- ### Install PowerDNS on Debian Source: https://docs.ubersmith.com/article.php?id=178&oid=31 Install the PowerDNS server and MySQL backend packages on Debian using apt-get. ```bash apt-get install pdns-server pdns-backend-mysql ``` -------------------------------- ### Ubersmith Installer Prompts Source: https://docs.ubersmith.com/article.php?id=231 Expected prompts from the installer script when running as root. Enter a directory, hostname, and admin email when prompted. ```text Checking for pip... Installing Ansible... Installing Ubersmith... Choose an installation directory for Ubersmith [/usr/local/ubersmith]: Enter the hostname where you will be hosting Ubersmith [ubersmith.example.com]: Enter the email address of the Ubersmith administrator [admin@example.org]: ``` -------------------------------- ### Start Redis containers with docker-compose Source: https://docs.ubersmith.com/article.php?id=157 Run this command as root from the Ubersmith installation directory to bring up a cluster of three Redis containers. ```bash docker-compose -p ubersmith up --scale redis=3 -d redis ``` -------------------------------- ### Run the Installer Script as Root Source: https://docs.ubersmith.com/article.php?id=231 Run as root: ./install_ubersmith.sh for Ubersmith or ./install_appliance.sh for the Ubersmith Appliance. Do not deploy both to the same host. ```bash if [ "$(id -u)" -ne 0 ]; then echo "Must run as root" >&2; exit 1; fi ./install_ubersmith.sh ``` ```bash ./install_appliance.sh ``` -------------------------------- ### Troubleshoot web container startup Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Navigate to the Ubersmith directory and start the web container in the foreground to view error messages. ```bash # cd /usr/local/ubersmith # docker compose up web ``` -------------------------------- ### Make a Database Backup Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Command to start the backup container, which runs Percona xtrabackup and saves the snapshot to the local directory. ```bash # cd /usr/local/ubersmith # docker compose up backup ``` -------------------------------- ### Start Ubersmith backup container (foreground) Source: https://docs.ubersmith.com/article.php?id=314&oid=36 Runs the backup container in the foreground as root, generating a physical backup using Percona's xtrabackup. Output shows backup progress. ```bash # cd /usr/local/ubersmith# docker-compose -p ubersmith up backup ``` -------------------------------- ### Configure the Ubersmith installer Source: https://docs.ubersmith.com/article.php?id=231 Run the configure.sh script as root to set up the installation path, URL, and administrator email. This creates the .ubersmith_installer.ini file. ```bash ./configure.sh Configuring the Ubersmith installer for an existing installation... Current path in use by Ubersmith / Appliance [/usr/local/ubersmith]: Enter the address in use by Ubersmith / Appliance [ubersmith.example.com]: ubersmith.mydomain.com Enter the email address of the Ubersmith administrator [admin@example.org]: jsmith@mydomain.com [ output follows ] localhost : ok=3 changed=1 unreachable=0 failed=0 ``` -------------------------------- ### Remove setup directory after upgrade Source: https://docs.ubersmith.com/article.php?id=103 Delete the setup directory to take Ubersmith out of Setup mode. ```bash rm -rf /var/www/ubersmith_root/app/www/setup ``` -------------------------------- ### Start web container in detached mode Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Use this command to start the web container in the background after resolving configuration issues. ```bash # cd /usr/local/ubersmith # docker compose up -d web ``` -------------------------------- ### Start Ubersmith backup container (background) Source: https://docs.ubersmith.com/article.php?id=314&oid=36 Runs the backup container in the background as root. The backup tarball is placed in /usr/local/ubersmith/backup. ```bash # docker-compose -p ubersmith up -d backup ``` -------------------------------- ### Enable Docker service on boot Source: https://docs.ubersmith.com/article.php?id=231 Command to enable the Docker service to start on boot, as it may not be enabled by default. ```bash systemctl enable docker ``` -------------------------------- ### Install dependencies on Ubuntu 24.04 LTS Source: https://docs.ubersmith.com/article.php?id=231 Command to install required dependencies for Ubersmith on Ubuntu 24.04 LTS. ```bash sudo apt install libssl-dev libffi-dev python3-dev python3-setuptools python3-pymysql python3-pip python3-venv screen ``` -------------------------------- ### Install gettext package in Docker container Source: https://docs.ubersmith.com/article.php?id=93 Updates package lists and installs gettext inside the PHP container. ```bash # cd /usr/local/ubersmith ``` ```bash # docker-compose exec --user root php apt-get update ``` ```bash # docker-compose exec --user root php apt-get install gettext -y ``` -------------------------------- ### DNS TXT Record Example Source: https://docs.ubersmith.com/article.php?id=351&oid=36 An example of the formatted DNS TXT record containing the DKIM public key. ```text mail._domainkey.example.com. IN TXT "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..." ``` -------------------------------- ### Navigate to Ubersmith Installation Directory Source: https://docs.ubersmith.com/article.php?id=335&oid=36 Change the current directory to the default Ubersmith installation path. ```bash cd /usr/local/ubersmith ``` -------------------------------- ### Install PowerDNS packages on Debian and CentOS Source: https://docs.ubersmith.com/article.php?id=178 Install PowerDNS server and MySQL backend packages. The first command is for Debian-based systems, the second for CentOS with the EPEL repository. Run these before configuring DNS in Ubersmith. ```bash apt-get install pdns-server pdns-backend-mysql ``` ```bash yum install pdns pdns-backend-mysql ``` -------------------------------- ### Install PowerDNS on CentOS Source: https://docs.ubersmith.com/article.php?id=178&oid=31 Install the PowerDNS server and MySQL backend packages on CentOS using yum, assuming the EPEL repository is enabled. ```bash yum install pdns pdns-backend-mysql ``` -------------------------------- ### Enable Cron and Mail Containers Source: https://docs.ubersmith.com/article.php?id=103 Navigate to the Ubersmith directory and start the cron and mail containers using Docker Compose. ```bash cd /usr/local/ubersmith docker compose up -d cron mail ``` -------------------------------- ### Install dependencies on Debian 13 Source: https://docs.ubersmith.com/article.php?id=231 Command to install required dependencies for Ubersmith 5.x+ on Debian 13. ```bash sudo apt install libssl-dev libffi-dev python3-dev python3-setuptools python3-pymysql python3-pip python3-venv python3-docker screen ``` -------------------------------- ### Create languages.ini file Source: https://docs.ubersmith.com/article.php?id=93 Example format for the languages.ini file, using the fr_CA locale. The name_convention variable controls name display order. ```ini language_name = "Français canadien"description = "Français canadien"name_convention = 0date_format = "Y-m-d" ``` -------------------------------- ### Example Configuration for Tiered Transfer Billing Source: https://docs.ubersmith.com/article.php?id=298 This configuration sets up 100GB of included transfer, a rate of $0.50/GB up to 1000GB, and a rate of $0.30/GB for usage beyond 1000GB. ```text bw_billing_method transfer bw_included_transfer 100 bw_included_transfer_unit GB bw_overage_unit GB bw_overage_rate 0.50 bw_tier2_minimum 900 bw_tier2_rate 0.30 ``` -------------------------------- ### Ubersmith Web Interface URLs Source: https://docs.ubersmith.com/article.php?id=231 After configuration, load the Setup Wizard via HTTPS using the IP address or hostname of the Ubersmith host. ```text https://10.0.0.1 ``` ```text https://ubersmith.example.com ``` -------------------------------- ### Execute Ubersmith Upgrade Source: https://docs.ubersmith.com/article.php?id=278 Run the upgrade process within the PHP container and remove the setup directory upon completion. ```bash cd /usr/local/ubersmith; docker-compose exec php bash ``` ```bash php /var/www/ubersmith_root/app/www/setup/updatedb.php ubersmith --debug ``` ```bash rm -rf /var/www/ubersmith_root/app/www/setup ``` -------------------------------- ### Change directory to Ubersmith installation path Source: https://docs.ubersmith.com/article.php?id=335 Navigate to the default Ubersmith installation directory before editing docker-compose.override.yml. ```bash cd /usr/local/ubersmith ``` -------------------------------- ### Extract the Ubersmith Installer Tarball Source: https://docs.ubersmith.com/article.php?id=231 Run this command to decompress the release file named ubersmith-installer-v3.1.13.tar.gz. ```bash tar zxf ubersmith-installer-v3.1.13.tar.gz ``` -------------------------------- ### DKIM-Signature Header Example Source: https://docs.ubersmith.com/article.php?id=351&oid=36 An example of the DKIM-Signature header expected in the message headers of a successfully signed email. ```text DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=example.com; s=mail; t=...; bh=...; h=Subject:From:To:Date; b=... ``` -------------------------------- ### Install dependencies on Debian 12 Source: https://docs.ubersmith.com/article.php?id=231 Command to install required dependencies for Ubersmith on Debian 12. Includes setting python alternative to 3.11. ```bash sudo apt install libssl-dev libffi-dev python3-dev python3-setuptools python3-pymysql python3-pip python3-venv python3-docker screen sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 ``` -------------------------------- ### Set PATH for Ansible and Docker Binaries Source: https://docs.ubersmith.com/article.php?id=231 Add pip-installed binaries in ~/.local/bin to PATH to avoid 'command not found' errors during installation. ```bash export PATH="$HOME/.local/bin:$PATH" ``` -------------------------------- ### Example environment variable for message_size_limit Source: https://docs.ubersmith.com/article.php?id=345&oid=36 Sets the Postfix message_size_limit directive to 10,240,000 bytes (approximately 10 MB). ```plaintext POSTCONF_MESSAGE_SIZE_LIMIT=10240000 ``` -------------------------------- ### Create a logical backup with mysqldump Source: https://docs.ubersmith.com/article.php?id=314&oid=36 Run as a user with MySQL client utilities installed. Connects to the local MySQL server (127.0.0.1:3306) and creates a logical backup of the ubersmith database to ubersmith_backup.sql. ```bash $ mysqldump -h 127.0.0.1 -u root -p --opt --quote-names ubersmith > ubersmith_backup.sql ``` -------------------------------- ### Decompress installer tarball Source: https://docs.ubersmith.com/article.php?id=231&oid=36 Run as root to decompress the Ubersmith installer tarball. The placeholder RELEASE is replaced by the actual version, e.g., v3.1.13. ```shell tar zxf ubersmith-installer-vRELEASE.tar.gz ``` -------------------------------- ### Enter web container and restart Apache Source: https://docs.ubersmith.com/article.php?id=342 Commands to restart Apache after updating certificates. First navigate to the Ubersmith directory, then enter the web container using the appropriate Docker command for your version (Ubersmith 4.x uses docker-compose exec, 5.x uses docker compose exec), and finally run apachectl restart. If Apache fails to start, restore the previous certificate and key. ```bash cd /usr/local/ubersmith ``` ```bash docker-compose exec web bash ``` ```bash docker compose exec web bash ``` ```bash apachectl restart ``` -------------------------------- ### Install dependencies on Rocky Linux 10 Source: https://docs.ubersmith.com/article.php?id=231 Commands to remove conflicting packages and install required dependencies for Ubersmith 5.x+ on Rocky Linux 10. Official support coming soon. ```bash sudo dnf remove buildah podman sudo dnf install epel-release gcc libffi-devel python3.12 python3-devel python3-PyMySQL openssl-devel which screen ``` -------------------------------- ### Install dependencies on Rocky Linux 9 Source: https://docs.ubersmith.com/article.php?id=231 Commands to remove conflicting packages and install required dependencies for Ubersmith 5.x+ on Rocky Linux 9. Includes setting python3 alternative to 3.11. ```bash sudo dnf remove buildah podman sudo dnf install epel-release gcc libffi-devel python3.11 python3-devel python3-PyMySQL openssl-devel which screen sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 ``` -------------------------------- ### Stop Ubersmith with Docker Compose Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Commands to navigate to the installation directory and stop the Ubersmith containers. ```bash # cd /usr/local/ubersmith # docker compose stop ``` -------------------------------- ### Install dependencies on CentOS 9 Stream Source: https://docs.ubersmith.com/article.php?id=231 Commands to remove conflicting packages and install required dependencies for Ubersmith on CentOS 9 Stream. Includes setting python3 alternative to 3.11. ```bash sudo dnf remove buildah podman sudo dnf install gcc libffi-devel python3.11 python3-devel python3-PyMySQL openssl-devel which screen sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 ``` -------------------------------- ### Setting message_size_limit Directive Source: https://docs.ubersmith.com/article.php?id=345 Example of setting the message_size_limit directive to 10,240,000 bytes. ```text POSTCONF_MESSAGE_SIZE_LIMIT=10240000 ``` -------------------------------- ### Rebuild Docker containers to apply translation Source: https://docs.ubersmith.com/article.php?id=93 Stops and removes existing containers, then starts Ubersmith again. Ubersmith will be briefly unavailable. ```bash # cd /usr/local/ubersmith ``` ```bash # docker-compose rm -sf; ./ubersmith_start.sh ``` -------------------------------- ### Check Apache SSL configuration with grep SSLC Source: https://docs.ubersmith.com/article.php?id=342 Use this command to verify that the filenames in your Apache configuration match those of your Ubersmith installation. The output shows the expected SSLCertificateFile, SSLCertificateKeyFile, and SSLCACertificateFile directives. The path may differ; only the filenames need to match. ```bash # grep SSLC /usr/local/ubersmith/conf/httpd/sites-enabled/billing.ubersmith.com.conf SSLCertificateFile /var/www/ubersmith_root/conf/ssl/billing.ubersmith.com.pem SSLCertificateKeyFile /var/www/ubersmith_root/conf/ssl/billing.ubersmith.com.key SSLCACertificateFile /var/www/ubersmith_root/conf/ssl/cabundle-billing.ubersmith.com.pem ``` -------------------------------- ### Verify rsyslog socket creation Source: https://docs.ubersmith.com/article.php?id=14&oid=36 Check the rsyslog directory to confirm the log socket exists after starting the service. ```bash root@billing:/usr/local/ubersmith/logs/rsyslog# ls -l total 0 srw-rw-rw- 1 root root 0 Nov 20 12:17 log root@billing:/usr/local/ubersmith/logs/rsyslog# file log log: socket ``` -------------------------------- ### Restart Ubersmith and recreate the search volume Source: https://docs.ubersmith.com/article.php?id=330&oid=19 After the volume is deleted, run these commands to start Ubersmith again. The `ubersmith_search` volume is automatically recreated, and the service becomes available again. ```bash cd /usr/local/ubersmith ./ubersmith_start.sh ``` -------------------------------- ### Disable app_cron container on new appliance Source: https://docs.ubersmith.com/article.php?id=134 Run this command on the new appliance after installation to stop the app_cron container, preventing it from polling devices before migration is complete. ```bash cd /usr/local/ubersmith docker-compose rm -sf app_cron ``` -------------------------------- ### Enter the database container shell Source: https://docs.ubersmith.com/article.php?id=134 Open a shell in the new appliance's app_db container to begin the database restore process. ```bash cd /usr/local/ubersmith docker-compose exec app_db bash ``` -------------------------------- ### Entity Matching Flow During Export (Mermaid flowchart) Source: https://docs.ubersmith.com/article.php?id=338&oid=49 Flowchart diagram illustrating the export process: starting with an Intacct lookup using the External Id, then falling back to a matching rule if no External Id match, and creating or updating the Intacct entity accordingly. If more than one match is found, an error is logged and the entity is skipped. ```mermaid flowchart TD flowstart([Entity Export Start]) flowend([Entity Export End]) error[Log error and skip Entity] --> flowend create[Intacct Create] --> flowend update[Intacct Update] --> flowend flowstart --> B[Intacct lookup using the External Id] B -->|Zero Match| E{Does the entity has a matching rule?} B -->|More Than One Match| error F --->|More Than One Match| error E --->|Yes| F[Intacct lookup using the matching rule] E -->|No| create F --->|Zero Match| create F --->|One Match| update B -->|One Match| update ``` -------------------------------- ### Edit ubersmith.po with translated strings Source: https://docs.ubersmith.com/article.php?id=93 Example format for translating strings in the .po file, replacing empty msgstr with the translated text. ```po msgid "Welcome" msgstr "Bienvenue" ``` -------------------------------- ### Send usage event via API (uber.meter_add_event) Source: https://docs.ubersmith.com/article.php?id=350&oid=50 Example API request parameters for recording a usage event. Each call records a usage event for the specified service. The event_name must match the meter's event name, and the value represents the usage amount. ```plaintext method=uber.meter_add_event brand_id=1 event_name=bandwidth service_id=283 value=1 ``` -------------------------------- ### Apply Configuration Changes Source: https://docs.ubersmith.com/article.php?id=336 Recreate the web container to apply the updated environment variables. ```bash docker compose up -d web ``` -------------------------------- ### Add Redis Sentinel environment variables to docker-compose.override.yml Source: https://docs.ubersmith.com/article.php?id=336&oid=36 Add the required environment variables to the web service's environment section. Replace the example values with your own master name, credentials, and Sentinel host IPs. ```yaml services: web: # ... other configuration ... environment: REDIS_SENTINEL_ENABLE: 1 REDIS_SENTINEL_MASTER: mymaster REDIS_USER: default REDIS_AUTH: your_redis_password REDIS_SENTINEL_HOSTS: 10.0.0.1, 10.0.0.2, 10.0.0.3 ``` -------------------------------- ### Enter new host database container Source: https://docs.ubersmith.com/article.php?id=103 Change to the Ubersmith directory and enter a shell in the db container. ```bash cd /usr/local/ubersmith; docker compose exec db bash ``` -------------------------------- ### Disable cron and mail containers Source: https://docs.ubersmith.com/article.php?id=278&oid=36 Disables the cron and mail containers on the new host after installation to prevent outgoing mail and recurring tasks until production readiness. ```bash cd /usr/local/ubersmith; docker-compose rm -sf cron mail ``` -------------------------------- ### Disable app_cron container on new appliance Source: https://docs.ubersmith.com/article.php?id=243&oid=36 Navigate to the default Ubersmith installation directory and disable the app_cron container on the new appliance to prevent polling before migration is complete. ```bash cd /usr/local/ubersmith ``` ```bash docker-compose rm -sf app_cron ``` -------------------------------- ### Docker Compose override configuration for mail service Source: https://docs.ubersmith.com/article.php?id=345&oid=36 Add the environment variable under the mail service in docker-compose.override.yml. The example shows the placement among existing volume and environment directives. ```yaml mail: volumes: # ...existing volume directives... environment: # ...other environment variables... - POSTCONF_MESSAGE_SIZE_LIMIT=10240000 ``` -------------------------------- ### Custom files directory path Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Path to the custom directory inside the Ubersmith app container. Files placed here are copied to the webroot of the web container when it starts or restarts. ```text /custom/ ``` -------------------------------- ### Enter PHP container for upgrade Source: https://docs.ubersmith.com/article.php?id=103 Change to the Ubersmith directory and enter a shell in the php container. ```bash cd /usr/local/ubersmith docker compose exec php bash ``` -------------------------------- ### Recreate the web container to apply changes Source: https://docs.ubersmith.com/article.php?id=336&oid=36 Run this command to recreate the web container and apply the new Redis Sentinel configuration. ```bash docker compose up -d web ``` -------------------------------- ### Recreate web container command Source: https://docs.ubersmith.com/article.php?id=206&oid=36 Run this command to apply the changes to the web container. ```bash ~/.local/bin/docker-compose up -d web ``` -------------------------------- ### Create Ubersmith Database and User Source: https://docs.ubersmith.com/article.php?id=157 Run these commands from the MySQL command prompt to create the database and grant permissions. ```sql mysql> CREATE DATABASE ubersmith;mysql> GRANT ALL ON ubersmith.* TO 'ubersmith'@'HOSTNAME' IDENTIFIED BY 'PASSWORD'; ``` -------------------------------- ### Shut down Ubersmith and stop containers Source: https://docs.ubersmith.com/article.php?id=330&oid=19 These commands change to the Ubersmith installation directory and stop all running containers with `docker compose rm -sf`. They will cause Ubersmith to become unavailable until the service is restarted. ```bash cd /usr/local/ubersmith docker compose rm -sf ``` -------------------------------- ### Create Translation Directory and Copy Template Source: https://docs.ubersmith.com/article.php?id=93&oid=36 Prepare the directory structure and copy the translation template from the Docker container to the host system. ```bash # mkdir -p /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES ``` ```bash # cd /usr/local/ubersmith ``` ```bash # docker cp ubersmith_web_1:/var/www/ubersmith_root/app/www/ubersmith.pot /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.po ``` -------------------------------- ### Restore database on new appliance Source: https://docs.ubersmith.com/article.php?id=243 Enter the new appliance database container and restore the database from the exported file. ```bash cd /usr/local/ubersmith docker-compose exec app_db bash mysql -u root -p$MYSQL_ROOT_PASSWORD uberapp < /ubersmith_appliance_export.sql ``` -------------------------------- ### Enable Cron and Mail Containers Source: https://docs.ubersmith.com/article.php?id=278&oid=36 Recreate the cron and mail containers on the new host to enable scheduled tasks and email functionality. ```bash cd /usr/local/ubersmith; docker-compose up -d cron mail ``` -------------------------------- ### Create opendkim.conf Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Configuration for /etc/opendkim.conf that matches how the image connects OpenDKIM to Postfix. The UMask 002 setting is necessary to make the socket file writable by its group so Postfix can connect. ```text Syslog yes UMask 002 Mode sv Canonicalization relaxed/simple PidFile /var/run/opendkim/opendkim.pid SignatureAlgorithm rsa-sha256 UserID opendkim:opendkim KeyTable /etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable ExternalIgnoreList /etc/opendkim/TrustedHosts InternalHosts /etc/opendkim/TrustedHosts Socket local:/var/spool/postfix/opendkim/opendkim.sock ``` -------------------------------- ### Generate Service Provider Key and Certificate Source: https://docs.ubersmith.com/article.php?id=50&oid=22 Run these commands in the /usr/local/ubersmith/conf/sso directory to create the required SAML service provider credentials. ```bash $ openssl dsaparam -out saml_sp_dsa_param.pem 4096 $ openssl gendsa -out saml_sp.pem saml_sp_dsa_param.pem $ openssl req -new -x509 -key saml_sp.pem -out saml_sp.crt ``` -------------------------------- ### Restore database with progress meter Source: https://docs.ubersmith.com/article.php?id=103 Alternative restore method using pv to show progress. ```bash pv /ubersmith_export.sql | mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith ``` -------------------------------- ### Generate DKIM key pair with opendkim-genkey Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Generates a 2048-bit DKIM key pair for example.com with selector 'mail'. Creates keys/example.com/mail.private (private key) and keys/example.com/mail.txt (public key in DNS TXT format). Run on the host or inside the running container for each domain to sign. ```bash mkdir -p keys/example.com opendkim-genkey -b 2048 -d example.com -D keys/example.com -s mail -v ``` -------------------------------- ### View container logs Source: https://docs.ubersmith.com/article.php?id=103 Paths to the log files for web and mail containers on the new host for troubleshooting service startup issues. ```text /var/log/ubersmith/web/docker.log /var/log/ubersmith/mail/docker.log ``` -------------------------------- ### Enable Postfix milter connection via POSTCONF_ variables Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Set these four environment variables in docker-compose.override.yml to turn on the milter connection in Postfix. Without them, Postfix does not send mail to OpenDKIM and mail is not signed. ```text POSTCONF_SMTPD_MILTERS='local:opendkim/opendkim.sock' POSTCONF_NON_SMTPD_MILTERS='$$smtpd_milters' POSTCONF_MILTER_DEFAULT_ACTION='accept' POSTCONF_MILTER_PROTOCOL='6' ``` -------------------------------- ### Apply Configuration Changes Source: https://docs.ubersmith.com/article.php?id=335&oid=36 Recreate the mail container to apply the updated configuration. ```bash docker compose up -d mail ``` -------------------------------- ### Access PHP Container Shell Source: https://docs.ubersmith.com/article.php?id=278&oid=36 Enter the shell of the new host's PHP container to begin the upgrade. ```bash cd /usr/local/ubersmith; docker-compose exec php bash ``` -------------------------------- ### Postfix main.cf Configuration Source: https://docs.ubersmith.com/article.php?id=252&oid=36 Configuration options for /etc/postfix/main.cf to enable SMTP relaying with TLS and SASL authentication. ```text relayhost = [smtp.office365.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtp_send_dummy_mail_auth = yes smtp_always_send_ehlo = yes smtp_tls_security_level = may smtp_use_tls = yes smtp_tls_CAfile = /etc/postfix/cacert.pem # debug options # debug_peer_list = smtp.office365.com ``` -------------------------------- ### Copy and Restore Database on New Host Source: https://docs.ubersmith.com/article.php?id=278 Transfer the database export to the new host's database container and restore it using the mysql command. ```bash docker cp ubersmith_export.sql ubersmith_db_1:/ ``` ```bash cd /usr/local/ubersmith; docker-compose exec db bash ``` ```bash mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith < /ubersmith_export.sql ``` ```bash pv /ubersmith_export.sql | mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith ``` -------------------------------- ### Copy physical backup into database container Source: https://docs.ubersmith.com/article.php?id=314&oid=36 As root, copies the backup tarball into the database container and opens a shell inside it. Ensure sufficient disk space. ```bash # cd /usr/local/ubersmith/backup# docker cp backup-2017-03-13-08-24.tar.gz ubersmith_db_1:/tmp# docker exec -ti ubersmith_db_1 bash ``` -------------------------------- ### Persist Configuration Files Source: https://docs.ubersmith.com/article.php?id=252&oid=36 Commands to copy the updated configuration files from the container to the host machine. ```bash docker cp ubersmith-mail-1:/etc/postfix/main.cf /usr/local/ubersmith/conf/mail docker cp ubersmith-mail-1:/etc/postfix/sasl_passwd /usr/local/ubersmith/conf/mail docker cp ubersmith-mail-1:/etc/postfix/sasl_passwd.db /usr/local/ubersmith/conf/mail ``` -------------------------------- ### Recreate the cron container Source: https://docs.ubersmith.com/article.php?id=134 Execute these commands on the new appliance to enable scheduled polling tasks. ```bash cd /usr/local/ubersmith docker-compose up -d app_cron ``` -------------------------------- ### Create locale directory and copy translation template Source: https://docs.ubersmith.com/article.php?id=93 Creates the custom locale directory and copies the translation template (ubersmith.pot) from the Docker container to the custom locale path. ```bash # mkdir -p /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES ``` ```bash # cd /usr/local/ubersmith ``` ```bash # docker cp ubersmith_web_1:/var/www/ubersmith_root/app/www/ubersmith.pot /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.po ``` -------------------------------- ### Restart web and mail services Source: https://docs.ubersmith.com/article.php?id=103 Commands to restart the web and mail services after configuring SSL certificates. ```bash cd /usr/local/ubersmith docker compose restart web docker compose up -d mail ``` -------------------------------- ### Log into MySQL Client Source: https://docs.ubersmith.com/article.php?id=278&oid=36 Log into the MySQL command line client within the database container. ```bash mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith ``` -------------------------------- ### Download CA Certificate Source: https://docs.ubersmith.com/article.php?id=252&oid=36 Commands to navigate to the mail configuration directory and download the required cacert.pem file. ```bash cd /usr/local/ubersmith/conf/mail curl -L -O https://curl.haxx.se/ca/cacert.pem ``` -------------------------------- ### Recreate mail container to apply changes Source: https://docs.ubersmith.com/article.php?id=335 Run docker compose to recreate the mail container with the updated configuration. ```bash docker compose up -d mail ``` -------------------------------- ### Restore database with mysql Source: https://docs.ubersmith.com/article.php?id=103 Restore the database from the export file using the mysql command. ```bash mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith < /ubersmith_export.sql ``` -------------------------------- ### Run Ubersmith upgrade script Source: https://docs.ubersmith.com/article.php?id=103 Run the updatedb.php script with --debug to upgrade the database. ```bash php /var/www/ubersmith_root/app/www/setup/updatedb.php ubersmith --debug ``` -------------------------------- ### Run Upgrade Script Manually Source: https://docs.ubersmith.com/article.php?id=243&oid=36 Run the upgrade.php script manually if the appliance_upgrade.sh script is not present. ```bash docker-compose exec app_web php /var/www/appliance_root/www/upgrade.php ``` -------------------------------- ### Postfix Environment Variable Format Source: https://docs.ubersmith.com/article.php?id=345 The required format for setting Postfix directives via environment variables. ```text POSTCONF_MAIN_CF_DIRECTIVE_NAME ``` -------------------------------- ### Enter Web Container Source: https://docs.ubersmith.com/article.php?id=342&oid=36 Access the web container bash shell for Ubersmith 4.x or 5.x. ```bash docker-compose exec web bash ``` ```bash docker compose exec web bash ``` -------------------------------- ### Verify Milter Configuration Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Commands to confirm that the milter connection is active and the socket file exists. ```bash docker-compose exec mail postconf smtpd_milters non_smtpd_milters milter_default_action milter_protocol docker-compose exec mail ls -la /var/spool/postfix/opendkim/opendkim.sock ``` -------------------------------- ### Configure External Database Server Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Environment variables to set in the web service of docker-compose.override.yml to connect to an external database host. ```yaml environment: MYSQL_USER: your_database_username MYSQL_DATABASE: your_database_name DATABASE_HOST: database.yourdomain.com ``` -------------------------------- ### Configure Load Balancer DSN in config.ini.php Source: https://docs.ubersmith.com/article.php?id=157 Update the dsn and add dsn2 to point to the load balancer. ```ini dsn = mysql://ubersmith:PASSWORD@HAPROXY_ADDRESS/ubersmith dsn2 = mysql://ubersmith:PASSWORD@HAPROXY_ADDRESS:3307/ubersmith ``` -------------------------------- ### Verify Apache SSL Configuration Source: https://docs.ubersmith.com/article.php?id=342&oid=36 Use grep to check the current SSL certificate, key, and CA bundle file paths in the Apache configuration. ```bash # grep SSLC /usr/local/ubersmith/conf/httpd/sites-enabled/billing.ubersmith.com.conf SSLCertificateFile /var/www/ubersmith_root/conf/ssl/billing.ubersmith.com.pem SSLCertificateKeyFile /var/www/ubersmith_root/conf/ssl/billing.ubersmith.com.key SSLCACertificateFile /var/www/ubersmith_root/conf/ssl/cabundle-billing.ubersmith.com.pem ``` -------------------------------- ### Restore Database Source: https://docs.ubersmith.com/article.php?id=103&oid=36 Commands to restore the database using mysql or pv for a progress meter. ```bash mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith < /ubersmith_export.sql ``` ```bash pv /ubersmith_export.sql | mysql -u root -p$MYSQL_ROOT_PASSWORD ubersmith ``` -------------------------------- ### Configure SASL Authentication Source: https://docs.ubersmith.com/article.php?id=252&oid=36 Steps to define SMTP credentials and generate the hashed password database. ```text [smtp.office365.com]:587 smtp-user@example.com:password ``` ```bash postmap /etc/postfix/sasl_passwd ``` -------------------------------- ### Copy database export into new host container Source: https://docs.ubersmith.com/article.php?id=103 Use docker cp to place the export file into the new host's db container. ```bash docker cp ubersmith_export.sql ubersmith-db-1:/ ``` -------------------------------- ### Create languages.ini Configuration Source: https://docs.ubersmith.com/article.php?id=93&oid=36 Define the language metadata in the languages.ini file. ```ini language_name = "Français canadien"description = "Français canadien"name_convention = 0date_format = "Y-m-d" ``` -------------------------------- ### Upgrade Ubersmith with ./upgrade_ubersmith.sh Source: https://docs.ubersmith.com/article.php?id=231&oid=36 Run to upgrade Ubersmith. The upgrade process completes automatically. ```bash ./upgrade_ubersmith.sh ``` -------------------------------- ### Configure TLS certificate for mail container Source: https://docs.ubersmith.com/article.php?id=335 Mount the SSL directory and set environment variables for the TLS certificate and key files. Update the paths to match your certificate and private key. ```yaml services: mail: volumes: # ... other configuration ... - "/usr/local/ubersmith/conf/ssl:/var/www/ubersmith_root/conf/ssl" # ... other configuration ... environment: - "POSTCONF_SMTPD_TLS_CERT_FILE=/etc/ssl/certs/your_domain.com.pem" - "POSTCONF_SMTPD_TLS_KEY_FILE=/etc/ssl/private/your_domain.com.key" ``` -------------------------------- ### Define SSL certificate path Source: https://docs.ubersmith.com/article.php?id=103 The directory path on the new host where SSL certificates and keys should be placed. ```text /usr/local/ubersmith/conf/ssl ``` -------------------------------- ### Reconfigure Ubersmith web service with docker-compose Source: https://docs.ubersmith.com/article.php?id=157 Run this command as root after uncommenting the Redis lock configuration to reconfigure Ubersmith to use Redis for advisory locking. ```bash docker-compose -p ubersmith up -d web ``` -------------------------------- ### Verify DKIM Key with opendkim-testkey Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Uses opendkim-testkey to verify that the key in the KeyTable matches the DNS record. A 'No key' result is normal if the DNS record has not propagated. ```bash docker-compose exec mail opendkim-testkey -d example.com -s mail -k /etc/opendkim/keys/example.com/mail.private -vvv ``` -------------------------------- ### Recreate Containers After Configuration Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Commands to remove existing containers and restart the Ubersmith environment with new configuration settings. ```bash # cd /usr/local/ubersmith # docker compose rm -sf # ./ubersmith_start.sh ``` -------------------------------- ### Export database with mysqldump Source: https://docs.ubersmith.com/article.php?id=103 Enter the db container and run mysqldump to export the ubersmith database to /ubersmith_export.sql. ```bash cd /usr/local/ubersmith docker compose exec db bash mysqldump -u root -p$MYSQL_ROOT_PASSWORD ubersmith > /ubersmith_export.sql ``` -------------------------------- ### Restarting the Falco Container Source: https://docs.ubersmith.com/article.php?id=337&oid=36 Commands to navigate to the Ubersmith directory and restart the Falco container to apply custom rule configurations. ```bash cd /usr/local/ubersmith docker compose restart falco ``` -------------------------------- ### Update Database Schema Source: https://docs.ubersmith.com/article.php?id=278&oid=36 Run the SQL query to add an index to the inv_packs table. ```sql ALTER TABLE `ubersmith`.`inv_packs` ADD INDEX `packid` (`packid` ASC); ``` -------------------------------- ### Generate a physical backup using the backup container Source: https://docs.ubersmith.com/article.php?id=314 Uses the built-in backup container to perform a physical 'hot' backup. The resulting tarball is stored in /usr/local/ubersmith/backup. ```bash # cd /usr/local/ubersmith# docker-compose -p ubersmith up backup ``` ```bash # docker-compose -p ubersmith up -d backup ``` -------------------------------- ### Backup RRD files Source: https://docs.ubersmith.com/article.php?id=314&oid=36 Runs the backup_rrds.ssh script as root to create a tarball of the Appliance's RRD files in /usr/local/ubersmith. ```bash # cd /usr/local/ubersmith# ./backup_rrds.ssh ``` -------------------------------- ### Export Database with mysqldump Source: https://docs.ubersmith.com/article.php?id=243&oid=36 Open a shell in the app_db container and export the uberapp database to a file in the container's filesystem. ```bash cd /usr/local/ubersmith docker-compose exec app_db bash mysqldump -u root -p$MYSQL_ROOT_PASSWORD uberapp > /ubersmith_appliance_export.sql ``` -------------------------------- ### Recreate Mail Container Source: https://docs.ubersmith.com/article.php?id=252&oid=36 Command to apply the new configuration by recreating the mail service. ```bash cd /usr/local/ubersmith; docker compose up -d mail ``` -------------------------------- ### Add entry to KeyTable Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Add this line to the KeyTable file. Maps the key name to the domain, selector, and key file path. The selector must match the one used in the DNS record. ```text mail._domainkey.example.com example.com:mail:/etc/opendkim/keys/example.com/mail.private ``` -------------------------------- ### Build translation with update_translations.php Source: https://docs.ubersmith.com/article.php?id=93 Runs the update_translations.php script to generate the .mo file, copies it to the custom locale directory, and removes the temporary file from the web container. ```bash # cd /usr/local/ubersmith ``` ```bash # docker-compose exec php php /var/www/ubersmith_root/app/www/update_translations.php ``` ```bash # docker cp ubersmith_web_1:/var/www/ubersmith_root/app/www/locale/[locale name] /LC_MESSAGES/ubersmith.mo /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.mo ``` ```bash # docker-compose exec web rm /var/www/ubersmith_root/app/www/locale/[locale name] /LC_MESSAGES/ubersmith.mo ``` -------------------------------- ### Bandwidth Tier Configuration Parameters Source: https://docs.ubersmith.com/article.php?id=298 These parameters define the minimum usage threshold and the associated rate for bandwidth tiers beyond the standard billing tier. ```text bw_tierX_minimum bw_tierX_rate ``` -------------------------------- ### Backup Ubersmith Database with mysqldump Source: https://docs.ubersmith.com/article.php?id=157 Create a full dump of the Ubersmith database using the mysqldump utility. ```bash # mysqldump --opt --quote-names ubersmith > ubersmith_backup.sql ``` -------------------------------- ### Configure OpenDKIM in docker-compose.yml Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Defines the environment variables and volume mounts for the OpenDKIM service. Note that in docker-compose.override.yml, the dollar sign in $smtpd_milters must be escaped as $$smtpd_milters. ```yaml services: mail: [...] environment: POSTCONF_SMTPD_MILTERS: 'local:opendkim/opendkim.sock' POSTCONF_NON_SMTPD_MILTERS: '$$smtpd_milters' POSTCONF_MILTER_DEFAULT_ACTION: 'accept' POSTCONF_MILTER_PROTOCOL: '6' volumes: - /usr/local/ubersmith/conf/mail/opendkim.conf:/etc/opendkim.conf:ro - /usr/local/ubersmith/conf/mail/TrustedHosts:/etc/opendkim/TrustedHosts:ro - /usr/local/ubersmith/conf/mail/KeyTable:/etc/opendkim/KeyTable:ro - /usr/local/ubersmith/conf/mail/SigningTable:/etc/opendkim/SigningTable:ro - /usr/local/ubersmith/conf/mail/keys:/etc/opendkim/keys:ro ``` -------------------------------- ### order.create Source: https://docs.ubersmith.com/article.php?id=332&oid=48 Creates an order with contract definition support. This method is updated to support the CLM add-on. ```APIDOC ## order.create ### Description Creates an order with contract definition support. This method is updated to support the CLM add-on. ### Method POST ### Endpoint order.create ### Parameters #### Request Body - contract_id (integer) - Optional - The ID of the contract to associate with the order. ### Response #### Success Response (200) - contract_id (integer) - The ID of the associated contract. ``` -------------------------------- ### Environment variable format for Postfix directives Source: https://docs.ubersmith.com/article.php?id=345&oid=36 Use this format to set any Postfix main.cf directive via an environment variable. Replace MAIN_CF_DIRECTIVE_NAME with the uppercase directive name. ```plaintext POSTCONF_MAIN_CF_DIRECTIVE_NAME ``` -------------------------------- ### Verify milter connection and socket Source: https://docs.ubersmith.com/article.php?id=351 Commands to confirm the milter connection is active and the OpenDKIM socket exists before testing mail flow. ```bash docker-compose exec mail postconf smtpd_milters non_smtpd_milters milter_default_action milter_protocol docker-compose exec mail ls -la /var/spool/postfix/opendkim/opendkim.sock ``` -------------------------------- ### Configure TLS Certificate Paths Source: https://docs.ubersmith.com/article.php?id=335&oid=36 Update the environment variables in the mail service definition to point to your trusted TLS certificate and private key files. ```yaml services: mail: volumes: # ... other configuration ... - "/usr/local/ubersmith/conf/ssl:/var/www/ubersmith_root/conf/ssl" # ... other configuration ... environment: - "POSTCONF_SMTPD_TLS_CERT_FILE=/etc/ssl/certs/your_domain.com.pem" - "POSTCONF_SMTPD_TLS_KEY_FILE=/etc/ssl/private/your_domain.com.key" ``` -------------------------------- ### Export the uberapp database with mysqldump Source: https://docs.ubersmith.com/article.php?id=134 Perform a logical export of the Ubersmith Appliance database, using the root user with password prompt, and save it to a file. The export should complete successfully before proceeding. ```bash mysqldump -u root -p uberapp > ubersmith_appliance_export.sql ``` -------------------------------- ### client.contract_list Source: https://docs.ubersmith.com/article.php?id=332&oid=48 Lists contracts for a client. ```APIDOC ## client.contract_list ### Description Lists contracts for a client. ### Method POST ### Endpoint client.contract_list ### Parameters #### Query Parameters - client_id (integer) - Optional - Filter by client ID. ### Response #### Success Response (200) - contracts (array) - An array of contract objects. ``` -------------------------------- ### View Falco Logs via journalctl Source: https://docs.ubersmith.com/article.php?id=337 Command to monitor Falco logs in real-time using journalctl. ```bash journalctl -f -t ubersmith/falco ``` -------------------------------- ### Certificate directory path Source: https://docs.ubersmith.com/article.php?id=103&oid=36 The target directory for copying HTTPS and SMTP certificates on the new host. ```text /usr/local/ubersmith/conf/ssl ``` -------------------------------- ### Verify database export completion Source: https://docs.ubersmith.com/article.php?id=103 Use tail to check the end of the export file for the '-- Dump completed on' line. ```bash cd /usr/local/ubersmith/backup tail -n1 ubersmith_export.sql ``` -------------------------------- ### Enable Redis Sentinel in Compose override Source: https://docs.ubersmith.com/article.php?id=352&oid=36 Set these environment variables on the web service in your deployment's Compose override file to enable Redis Sentinel support. ```yaml web: environment: REDIS_SENTINEL_ENABLE: 1 REDIS_SENTINEL_MASTER: mymaster REDIS_USER: your_redis_user REDIS_AUTH: your_redis_password REDIS_SENTINEL_HOSTS: 10.0.0.1,10.0.0.2,10.0.0.3 ``` -------------------------------- ### Add hosts to TrustedHosts Source: https://docs.ubersmith.com/article.php?id=351&oid=36 Add these hosts and networks to the TrustedHosts file. Lists hosts and networks allowed to send signed mail without a signing error. Include your local host and internal network. ```text 127.0.0.1 localhost ::1 10.0.0.0/8 ``` -------------------------------- ### Place old host into maintenance mode Source: https://docs.ubersmith.com/article.php?id=103 Modify the docker-compose.yml file to set the MAINTENANCE variable to 1 in the web service environment, then recreate the web container. ```bash cd /usr/local/ubersmith docker compose up -d web ``` -------------------------------- ### Apache configuration directory path Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Path to the Apache configuration directory. It contains the sites-enabled folder with virtual host definitions for Ubersmith. ```text /httpd/ ``` -------------------------------- ### Generate sasl_passwd.db Source: https://docs.ubersmith.com/article.php?id=252 Command to generate the Postfix SASL password database from the sasl_passwd file. ```bash postmap /etc/postfix/sasl_passwd ``` -------------------------------- ### Verify Ubersmith Database DSN Format Source: https://docs.ubersmith.com/article.php?id=157 Review the dsn configuration in config.ini.php to verify the database name. ```ini [database] dsn = mysql://USERNAME:PASSWORD@HOST/DATABASE ``` -------------------------------- ### Verify Mail Log File Path Source: https://docs.ubersmith.com/article.php?id=103&oid=36 Check the specified log file to confirm that incoming mail is functioning correctly. ```text /var/log/ubersmith/mail/docker.log ``` -------------------------------- ### client.contract_get Source: https://docs.ubersmith.com/article.php?id=332&oid=48 Retrieves a contract for a client. ```APIDOC ## client.contract_get ### Description Retrieves a contract for a client. ### Method POST ### Endpoint client.contract_get ### Parameters #### Query Parameters - contract_id (integer) - Required - The ID of the contract to retrieve. ### Response #### Success Response (200) - contract_id (integer) - The ID of the contract. - client_id (integer) - The ID of the client. - contract_template_id (integer) - The ID of the contract template. - start_date (date) - The start date of the contract. - end_date (date) - The end date of the contract. ``` -------------------------------- ### Restore a logical backup with mysql Source: https://docs.ubersmith.com/article.php?id=314&oid=36 Restores the logical backup created by mysqldump into the ubersmith database. Requires the backup file to be present. ```bash $ mysql -h 127.0.0.1 -u root -p ubersmith < ubersmith_backup.sql ``` -------------------------------- ### Restart Apache Source: https://docs.ubersmith.com/article.php?id=342&oid=36 Restart the Apache web server after updating certificate files. ```bash apachectl restart ``` -------------------------------- ### Restore Ubersmith Database Source: https://docs.ubersmith.com/article.php?id=157 Restore the database from the backup file. ```bash # mysql ubersmith < ubersmith_backup.sql ``` -------------------------------- ### Apache mod_status configuration for /server-status Source: https://docs.ubersmith.com/article.php?id=186 Add this configuration to your httpd.conf file to enable Apache's mod_status status reports only for browsers from the mydomain.com domain. The 'Allow from' value should typically include the IP of your Ubersmith appliance. Misconfiguration could expose sensitive server data to third parties. ```apache SetHandler server-status Order Deny,Allow Deny from all Allow from .mydomain.com ``` -------------------------------- ### Copy database dump out of container Source: https://docs.ubersmith.com/article.php?id=103 Use docker cp to copy the exported database file from the container to the host backup directory. ```bash cd /usr/local/ubersmith/backup docker cp ubersmith-db-1:/ubersmith_export.sql . ``` -------------------------------- ### Enable Ubersmith Maintenance Mode Source: https://docs.ubersmith.com/article.php?id=157 Update config.ini.php to enable maintenance mode before performing a database backup. ```ini [maintenance] enable = 1 ``` -------------------------------- ### Update docker-compose.override.yml with POSTFIX_RELAYHOST Source: https://docs.ubersmith.com/article.php?id=346&oid=36 Add the POSTFIX_RELAYHOST environment variable to the mail service in docker-compose.override.yml. Replace the placeholder with your Microsoft 365 SMTP server hostname. ```yaml mail: ... environment: - "POSTFIX_RELAYHOST=[yourdomain-com.mail.protection.outlook.com]:25" ``` -------------------------------- ### Restart containers for rsyslog configuration Source: https://docs.ubersmith.com/article.php?id=14&oid=36 Execute these commands in the Ubersmith root directory to recreate the rsyslog and php containers, which will cause a brief service interruption. ```bash docker-compose rm -sf php rsyslog docker-compose up -d rsyslog docker-compose up -d php ``` -------------------------------- ### Restart Docker service Source: https://docs.ubersmith.com/article.php?id=43&oid=36 Restart the Docker service to recreate necessary firewall rules and restore inter-container communication. ```bash # service docker restart ```