Internal configuration
The server module reads its configuration from two files inside the installation directory (/opt/msh-pm-milter):
lib/defaults.cf- the defaults shipped with every release. Do not edit this file - it is overwritten on every update.etc/config.cf- your host-local overrides. This file is never shipped in the package, so your changes survive updates.
Both files are sourced by the service launchers, etc/config.cf after lib/defaults.cf, so any value you set there wins.
How to override a parameter
- Create (or edit)
/opt/msh-pm-milter/etc/config.cfand add only the keys you want to change, one per line:
MILTER_PORT=9999
MAIL_SMTP_HOST=relay.example.com
JAVA_XMX=2048M
- Restart the services so the launchers pick up the new values:
sudo systemctl restart msh-pm-settings.service msh-pm-milter.service
Parameters
| Key | Default | Description |
|---|---|---|
MSH_JAVA_BIN | java | Java executable used to start the services |
MSH_USER | msh | System user that owns the installation |
MILTER_PORT | 7080 | Port the milter listens on for Postfix |
SETTINGS_PORT_IN | 1207 | RMI registry port of the settings service |
SETTINGS_PORT_OUT | 1208 | RMI data port of the settings service |
JAVA_XMS | 128M | Initial JVM heap size |
JAVA_XMX | 1024M | Maximum JVM heap size |
POOL_SIZE | 10 | Message processing worker threads |
QUEUE_SIZE | 20 | Queue capacity for waiting messages |
STATS_UPDATE_TIME | 60 | Statistics refresh interval (seconds) |
MAIL_SMTP_HOST | localhost | SMTP host used to send mail |
MAIL_SMTP_PORT | 25 | SMTP port used to send mail |
MAIL_SMTP_CONNECTION_TIMEOUT | 10000 | SMTP connection timeout (milliseconds) |
MAIL_SMTP_TIMEOUT | 30000 | SMTP read timeout (milliseconds) |
MSH_JAVA_BIN
The Java executable used to start both the milter and the settings service - either a command name resolved from PATH or an absolute path to the binary. The launchers verify that it points to Java 17 or newer and refuse to start otherwise. See Custom Java location for details and examples.
MSH_USER
The system user that owns the installation tree and runs the services. Used by lib/fixperms.sh when re-applying ownership and permissions after an update. If you change it, adjust the systemd unit files accordingly.
MILTER_PORT
The TCP port the milter listens on for connections from Postfix.
If you change MILTER_PORT, make sure to update the corresponding value in /etc/postfix/main.cf as well so Postfix continues to communicate with the milter on the correct port. See Postfix configuration.
SETTINGS_PORT_IN and SETTINGS_PORT_OUT
The two ports of the settings service:
SETTINGS_PORT_IN- the RMI registry port. Both the milter (locally) and the Administrator Panel (remotely) connect to it to look up the settings service.SETTINGS_PORT_OUT- the fixed port used for the actual RMI data connections. Without pinning this port, RMI would pick a random one, which makes firewall rules impossible.
If the Administrator Panel connects from another machine, both ports must be reachable through the firewall. See Connection problems if the panel cannot connect.
JAVA_XMS and JAVA_XMX
The initial and maximum JVM heap size for both services, in JVM notation (128M, 2G, ...). Increase JAVA_XMX if the application runs out of heap space - see Java for the symptoms.
POOL_SIZE and QUEUE_SIZE
The milter processes messages in a worker thread pool. POOL_SIZE is the number of threads working concurrently; QUEUE_SIZE is how many messages can wait for a free thread before the milter starts refusing work. The current utilization is written to var/log/milter.stats - if the queue keeps filling up, increase POOL_SIZE. See Logs for how to read the statistics file.
STATS_UPDATE_TIME
How often the milter rewrites the var/log/milter.stats snapshot, in seconds.
MAIL_SMTP_HOST and MAIL_SMTP_PORT
The SMTP server the milter uses when it sends mail itself - for example autoreplies generated by autoresponder rules. By default it hands mail to the local Postfix on localhost:25. Point it at a different host or port if your MTA listens elsewhere or you want the milter's own mail routed through a specific relay.
MAIL_SMTP_CONNECTION_TIMEOUT and MAIL_SMTP_TIMEOUT
Timeouts (in milliseconds) for the SMTP connection above: MAIL_SMTP_CONNECTION_TIMEOUT limits how long establishing the connection may take, MAIL_SMTP_TIMEOUT limits how long the milter waits for a response while sending. They prevent message processing from hanging when the SMTP server is unreachable or stalled.
Additional resources
- Postfix configuration - configure Postfix to connect to the milter
- Custom Java location - point the services at a specific JVM
- Logs - all files the services write to
var/log