System Scripts - MailCleaner/MailCleaner-Next GitHub Wiki

MailCleaner is largely a configuration Web UI and series of scripts that are used to update and manage the configuration files for other open source, third-party services. Changes made within the web interface are written no our database as well as directly to a handful of configuration files directly (eg. /etc/resolv.conf). That information is then acted upon by "dumper" scripts to generate new configuration files when relevant services are started, as well as for a variety of other management tasks (eg. releasing messages or sending quarantine reports).

This document seeks to detail the function of many of these scripts.

dump_domains.pl

This script is run with a domain as an option:

dump_domains.pl domain.com

-a can be used for 'all' domains.

This script is run by several of the other services' dumper files as a prerequisite before they start to ensure that the latest configuration files are available when they load.

This script generates many files in /var/mailcleaner/spool/tmp/mailcleaner, especially .list files:

domains.list
domains.list
domains_smarthost.list
domains_to_callout.list
domains_to_altcallout.list
domains_to_adcheck.list
domains_to_addlistcallout.list
domains_to_extcallout.list
domains_to_mx.list
domains_to_greylist.list
relay_accepteddest.list
domains_to_check_batv.list
domains_to_prevent_spoof.list
no_caps_domains.list
local_domains_require_incoming_tls.list
local_domains_require_outgoing_tls.list
domains_to_dkim.list
snmpdomains.list
domains_to_prevent_docm.list

These files are read in real-time by exim and generally determine whether specific routers and ACLs apply to specific domains, etc.