Update scripts

Reqad keeps its maintenance scripts in /usr/local/reqad/scripts/update/. Each one fixes or sets up one thing on an existing server. Most run on their own on every install and update; a few are for you to run when you need them. This page lists them all, so you know which ones have already run and when to run the others.

You rarely need to run any of these. dnf update reqad runs the automatic ones for you, in the right order. Each checks first and changes nothing when the server is already right, so running one again is harmless. Their output is in /usr/local/reqad/log/post_install.log.

Running one by hand

bash /usr/local/reqad/scripts/update/<script> --dry-run
bash /usr/local/reqad/scripts/update/<script> --apply
  • Run them as root.
  • Where a script has --dry-run, try that first: it shows what would change and changes nothing.
  • Scripts that edit nginx, Apache, exim, dovecot or PHP-FPM test the new configuration first (nginx -t, httpd -t, exim -bV, doveconf, php-fpm -t) and put the old file back if the test fails.
  • The header comment at the top of each script explains why it exists and what it touches.

Run on every install and update

In the order the update runs them. By hand lists the options that are useful when you run one yourself; panel marks scripts the panel also calls when you change the setting they belong to.

Panel, webmail and web server

ScriptWhat it doesBy hand
setup_reqad_fpm.shSets up the panel's own PHP-FPM master (reqad-php-fpm, with its own php.ini). Runs once; later updates leave it alone, so your changes are kept.-
update_ini.shAdds missing keys to etc/server-software.ini. Never changes a value you set.-
update_roundcube.shUpdates Roundcube (webmail) to the latest stable release; keeps its config, logs, temp files and custom plugins.Run it to update webmail between Reqad releases.
install-webmail-autologin.shInstalls the Roundcube plugin behind the panel's "open webmail" button.Panel: when webmail auto-login is switched on.
setup_webmail_guard.sh --applyWebmail brute-force protection: at most 3 failed logins a minute per mailbox, login POSTs limited per IP in nginx, and an lfd rule (tag reqadwebmail) that blocks an IP in the firewall after 10 failed logins. Blocks show under Settings > Security > Blocked addresses.--dry-run, --remove
update_user_phpfpm.shAdds required settings (security, logs, temp directories) to every account's PHP-FPM pool.-
update_default_nginx_host.shCreates the default nginx site for the server hostname if it is missing, with a Let's Encrypt certificate if there is one, otherwise self-signed.Panel: when converting Apache to nginx.
update_certbot_hostname.shRenews the hostname certificate through the web server instead of the standalone method.-
update_default_apache_host.shThe same as the nginx one, for Apache servers.-
update_wetty_shell.shKeeps the web terminal (wetty) on Reqad's packaged start script. Does nothing without wetty.-

Mail

ScriptWhat it doesBy hand
setup_autoresponder_sieve.shSets up autoresponders in Sieve. Only acts on servers that deliver mail through dovecot LMTP (see setup_dovecot_sieve.sh below).-
setup_sieve_pipe.shEnables the "Pipe to a program" email filter action, for server-wide and domain filters only. Same condition as above.-
seed_skiprbl_extra.shOne-time move of a hand-made RBL skip list into the panel's "extra addresses". Does nothing afterwards.-
fix_maildir_dotfiles.shKeeps dovecot's internal files out of the folder list in mail clients.-
fix_imap_separator.shMakes sure the IMAP folder separator is ., which matches how mail is stored, and repairs folder subscriptions.-
fix_managesieve_listen.shManageSieve listens on IPv4 loopback only, so dovecot starts on servers without IPv6.-
setup_special_use.shTells mail clients which folders are Sent, Drafts, Trash and Junk, so phones and webmail use the same ones.Afterwards see merge_duplicate_sent.sh.
repair_truncated_exim_conf.shRestores a damaged exim configuration from the newest good backup. Does nothing when the configuration is complete.[path to exim.conf]
setup_spam_score_logging.shOne SpamAssassin scan per incoming message as the receiving account, the score in exim's log and X-Spam-* headers on the message.-
setup_spamd_per_user.shLets SpamAssassin read each account's own allow and block lists.-
setup_exim_reload.shGives exim a real reload, so configuration changes apply without dropping connections.Panel: used before reloading exim.
setup_mail_limits.shOutgoing limits per sending domain: messages per hour and failed messages per hour.Panel: Email > Config.
fix_system_alias_pipe.shDelivers mail for root to the panel's root-mail forwarder reliably.-
setup_forward_spam_gate.shDoesn't forward mail SpamAssassin already marked as spam, which protects the server's sending reputation.Panel: switch in Email > Config.
ensure_dovecot_packages.shChecks that the dovecot add-on packages match dovecot and that Sieve is installed where it is used. During an update it only reports.--fix installs what is missing.
setup_dovecot_compress.sh --repairMail compression settings for dovecot 2.4; --repair only fixes a setup that is already on.--status, --disable. Panel: Email > Config.
setup_dovecot_vsz.sh --migrateThe memory limit per IMAP/POP3 process, kept in its own file.--status, --vsz <size>, --reset. Panel: Email > Config.
setup_autoconfig.shAutomatic setup of mail accounts in Thunderbird and Outlook (static files, no PHP involved).Panel: when converting Apache to nginx.

Security and isolation

ScriptWhat it doesBy hand
patch_csf_cve_2026_67402.shApplies the CVE-2026-67402 fix to an installed csf (new installs get a fixed csf).-
fix_vhost_deny_order.shPuts the "deny hidden files" and "deny PHP in uploads" rules of existing sites before the PHP handler.--dry-run
setup_error_pages.shReqad's error pages for every site; the pages don't name the web server software.Panel: when converting Apache to nginx.
fix_cache_perms.shTightens permissions on the nginx caches and the shared PHP session folder.-
refresh_wp_security.phpRe-applies WordPress Toolkit security rules to the sites that use them, so rule improvements in an update reach them.Run with the panel's PHP: /opt/reqad/php-current/usr/bin/php -c /etc/reqad/php-fpm/php.ini …
fix_panel_ip_bypass.shThe panel asks every client for its login, and monit checks an nginx-only /reqad-health address instead of the dashboard.--dry-run
setup_panel_loopback_guard.shFirewall rule: code running as a hosting account can't connect to the panel's local ports (panel, web terminal, monit).--dry-run, --remove
fix_panel_tree_perms.shThe panel's folder, database and backups are readable by the panel only, not by hosting accounts.--dry-run
fix_dovecot_users_perms.shThe mailbox password file is readable by the mail server and root only.--dry-run
setup_sysctl_hardening.shKernel settings that keep accounts from watching each other (/etc/sysctl.d/90-reqad.conf). Override a value in 99-local.conf.--dry-run, --remove
setup_proc_hidepid.shEach account sees only its own processes.--dry-run, --remove
harden_account_perms.sh --apply --quietAccount permissions: a site's files readable by its own account and the web server only; PHP pools in the account's own group. Writes a restore script (/var/lib/reqad/perms-restore-<time>.sh) before changing anything.--dry-run, --user=NAME. Panel: after a PHP handler change and when converting Apache to nginx.
tune_fpm_pools.sh --applyMoves PHP pools still on the old defaults to on-demand workers: up to 20 per site, stopped after 10 s idle, a stuck script ended after 5 minutes. Pools you tuned are left alone.--dry-run
setup_session_limits.sh --applyCPU, memory and process limits for each account's SSH, cron and web terminal sessions, and the log of limit hits.--dry-run, --remove. Per account: reqad account limits.

The update also runs two steps from outside this folder: scripts/account_shell.sh install (the jailed shell, for accounts with jailed or SFTP-only access) and reqad account limits --sync-db --quiet (database connection limits per account).

Run once, when needed

ScriptWhen the update runs itWhat it does
migrate_smtp_errors_log.shUpdating from a panel database older than 1034.Moves old SMTP delivery errors from the panel database into log/smtp_errors.log.

Run by hand

These are never run by an update, because they change how mail is delivered, install packages, or are one-off jobs. Run each one when you need what it does.

ScriptWhen to run itNotes
check_lmtp_readiness.shBefore switching mail delivery to dovecot LMTP.Only reads. A non-zero exit code means: don't switch yet. setup_dovecot_sieve.sh runs it itself.
setup_dovecot_sieve.shTo turn on email filters at all three levels (server, domain, mailbox) and filter editing from webmail and mail clients.Switches delivery to dovecot LMTP + Sieve and installs packages. --check only reports. See Email filters.
setup_dovecot_fts.shTo make mailbox searches fast.Installs a package, restarts dovecot and indexes every mailbox over time. See Email search & indexing.
merge_duplicate_sent.shOnce, after setup_special_use.sh, to merge Apple Mail's "Sent Messages" into "Sent".Only reports by default; --apply moves the mail. The only script here that moves messages.
migrate_dovecot_2.4.shUpgrading a server from dovecot 2.3 to 2.4.Rewrites the dovecot configuration and keeps mailboxes, certificates and keys. --no-upgrade, --force.
rename_hostname.shChanging the server's hostname.<new.host.name> [--dry-run] [--yes] [--no-cert] [--delete-old-cert]. Copies every file it changes to /root/reqad-hostname-rename-<time>/ first.
update_phpmyadmin.shTo update phpMyAdmin to the latest stable release.Keeps its configuration and temp folder.
ensure_dovecot_packages.sh --fixWhen an update reported a missing or mismatched dovecot package.The report-only check runs on every update.

Need a hand? Create a free account or contact us.