Repository navigation
Migration
MSFE-NG is a clean-room replacement for the discontinued ConfigServer
MailScanner Front-End. It reads the old flat-file settings so your policy
carries across, then takes over rule generation and the UI. It runs fine on
top of the engine ConfigServer bundled (/usr/mailscanner, MailScanner 5.4
under cPanel's perl) — the installer detects that tree and points
config.toml at its MailScanner.conf; the rules dir follows the conf's
%rules-dir%. Nothing under /usr/msfe is modified.
-
Install MSFE-NG with the legacy front-end still in place (the import
in step 3 needs it):
The installer prints which
curl -fsSL https://raw.githubusercontent.com/inalto/msfe-ng/main/packaging/get.sh | shMailScanner.confit found; the doctor's first line names the engine and version it will manage. -
Database — Dashboard → Create database & apply schema (or set
db_*in/etc/msfe-ng/config.toml, thenmsfe-ng db-migrate). You can reuse the existingmailscanner/ MailWatch database: themaillogschema is compatible and migrations useCREATE TABLE IF NOT EXISTS. -
Import the old policy:
Reads
msfe-ng import /usr/msfe # preview, as JSON msfe-ng import /usr/msfe --save # write it under /etc/msfe-ng/policy
msconfig.txt(global settings),mailscannerbw(system white/black lists, de-duplicated),digestdomainsand the language file. -
Generate the rules and switch logging over:
msfe-ng sync # rule files into the engine's %rules-dir% msfe-ng mailscanner enable-logging # MSFE-NG's logging plugin (backup kept) msfe-ng service restart
-
Verify:
msfe-ng doctor,msfe-ng selftest, then the WHM dashboard — new mail is logged, the Messages tab fills, a couple of domains look right in the user UI. Both front-ends are installed at this point; MSFE-NG's cron rewrites the managed rule files every 10 minutes, so make policy changes in MSFE-NG only from here on.
Once the import is verified (msfe-ng import /usr/msfe --save, or the
Settings tab shows your policy), the old front-end can go. Which tool depends
on the engine:
-
Still on ConfigServer's bundled engine (
/usr/mailscannerexists)? Use the guided migration below — its uninstaller removes the engine as well, and the RPM cannot be installed beside it, so the two happen in one sequence. -
Already on the MailScanner RPM (or any other engine)? Service → Decommission ConfigServer MSFE, or
msfe-ng legacy decommission --run(msfe-ng legacy decommissionalone prints what would happen). It removes the front-end and only the front-end — the engine keeps scanning, nothing is restarted:- backup:
/usr/msfe, every cron file that runs it (/etc/cron.d/msfe.sh,/etc/cron.hourly/msdigest.pl,/etc/cron.daily/mailscanner_daily.cron, …), the WHM app registration file and root's crontab (asroot.crontab) go into<backup_dir>/legacy-msfe-<time>.tar.gz— nothing is removed if that fails -
/usr/msferemoved - those cron files removed (
csget, ConfigServer's shared updater used by csf, is never touched) - the
/usr/msfelines dropped from root's crontab - the legacy WHM plugin unregistered
- re-scan: decommissioned, or whatever is still present for your hands
Restore everything with
tar xzf <backup> -C /(root's crontab from theroot.crontabmember:crontab root.crontab). ConfigServer's ownuninstall.msfe.shis never run by this tool. On a host still on the ConfigServer engine the command works too (the engine is left alone, with a note that the migration is the way to switch it), but the Service tab shows the migration card instead of this one. - backup:
The doctor's legacy ConfigServer front-end notice links here.
ConfigServer's uninstaller (/usr/msfe/uninstall.msfe.sh) removes the
bundled MailScanner engine too, and the RPM installer refuses to install
beside /usr/mailscanner, so the two have to happen in one sequence. Service → Migrate from ConfigServer
MailScanner (shown while /usr/mailscanner exists) does it as one
background job and follows its log; msfe-ng engine migrate-legacy prints
the preflight, --run does the same from a shell. Mail keeps spooling
meanwhile (Exim queues into the scanning spool; nothing is lost, it is
scanned once the new engine runs). The steps, each logged, stopping at the
first failure:
- backup of
/etc/msfe-nginto the backup dir (pre-migration-<time>.tar.gz) - copy of
/usr/mailscanner/etcto/etc/msfe-ng/legacy-engine-etc(org name, custom rules,spamassassin.conf— for reference afterwards) - stop the legacy MailScanner
-
the legacy message history is saved: ConfigServer's MailControl logged
into the MySQL database
mailscanner, and its uninstaller drops that database. When it exists, the job dumps it into the backup dir (legacy-mailscanner-<time>.sql.gz) and copies every row MSFE-NG does not have yet into its ownmaillog(timestamp→msg_ts,id→message_id, the shared columns as they are), so the Messages tab keeps the history from before the switch. If the dump or the copy fails the migration stops here, before anything is removed. With the database not yet configured, the dump is kept andmsfe-ng db import-legacycopies it later. (Hosts migrated before 1.0.70 lost that history — the uninstaller had already dropped the database.) - ConfigServer's uninstaller (any
/usr/msfe/uninstall*.sh, answering yes to its prompts), then whatever it left:/usr/mailscanner,/usr/msfe, every cron entry referencing/usr/msfe(/etc/cron.d/msfe.sh,/etc/cron.hourly/msdigest.pl,/etc/cron.daily/mailscanner_daily.cron, …),/etc/init.d/MailScanner, a hand-writtenMailScanner.servicepointing at the removed tree (disabled and parked under/etc/msfe-ng/legacy-engine-etc/), root's crontab lines, the legacy WHM plugin registration.csget(ConfigServer's shared updater, used by csf too) is never touched. -
msfe-ng engine installat the latest MailScanner v5 release -
config.tomlpointed at/etc/MailScanner/MailScanner.conf -
%org-name%,%org-long-name%,%web-site%carried over from the legacy conf -
msfe-ng engine configure(queues, run-as user, shared SA state, Razor/Pyzor homes,envelope_sender_header) msfe-ng mailscanner enable-loggingmsfe-ng sync- Exim wiring: the two-config layout is kept if the uninstaller left it; otherwise the named-queue wiring is set up
- startup latch on, unit enabled, MailScanner (re)started
-
msfe-ng doctor --fix— the mechanical repairs first (among them the upstream SpamAssassin ruleset for the SpamAssassin the new engine loads, see below), then anything still not OK is printed with its fix
Preflight notes worth acting on before starting: no policy imported yet
(the legacy settings vanish with /usr/msfe — run the import first) and
database not configured.
A ConfigServer host migrated on 2026-09-20 kept its two-config Exim
wiring (/etc/exim.conf spooling into /var/spool/exim_incoming,
exim_outgoing.conf delivering) — expected, and the doctor reports it as
wired; there is no kill switch on that layout and queue commands must go
through -C /etc/exim_outgoing.conf (the Queues tab does; see
Troubleshooting). Things the doctor then found and now repairs:
-
/etc/exiscandisableleft by ConfigServer: not a MailScanner bypass on a stock cPanel, only its exiscan (ClamAV in Exim) switch — kept as is. - a stale
MailScanner.servicefrom 2020, enabled, failing at every boot beside the RPM'smailscanner.service. -
SpamAssassin from CPAN (
/usr/local/share/perl5, version 4.0.2) whose upstream ruleset had never been fetched: cPanel's nightlysa-updatefeeds its own bundled 4.0.1, so MailScanner had been scoring with the site rules (KAM + cPanel's few picked rules) for a year. The RPM engine's daily cron (ms_cron_sa=1in/etc/MailScanner/defaults) runsms-update-safrom the first night;doctor --fixdoes it at once. - the private DNS resolver install on a Hetzner host, where the same IPv4 is listed twice: fixed in the installer, and the doctor now restarts a dead loopback resolver.
If you already removed the front-end by hand (or its uninstaller took the
engine with it), just run msfe-ng engine install, msfe-ng engine configure, msfe-ng mailscanner enable-logging, msfe-ng sync and check
msfe-ng doctor for the wiring — the same steps, without the removal.
Carries over (via import) |
Not imported |
|---|---|
Global scan/action/score settings (msconfig.txt) |
Per-user ~/.mailscanner* dotfiles (set per-domain in the new UI) |
System white/black lists (mailscannerbw) |
The old MailControl logger (replaced by MSFE-NG's plugin) |
Digest domains (digestdomains) |
— |
Existing maillog history (if you reuse the DB) |
— |
Per-domain overrides are managed by account holders in the user UI (or by the
admin) and stored under /etc/msfe-ng/policy/domains/.