Priority email gateway
> Documentation > Priority email gateway
- From adullact.net
- ChangeLog
Priority email gateway is a configuration system for an email gateway sending messages based on their priority.
Priorities are assigned from message headers. Several different priorities can be assigned to a message, for primary recipients (To) and for copy recipients (Cc and Bcc).
A set of rules identifies headers and chooses priorities to assign.
The system is based on Postfix MTA with Qpsmtpd SMTP server. It works on Debian-based Linux distributions (Debian Etch with backports, Debian Lenny or higher, and Ubuntu 8.04 or higher).
→ Translation in progress: see French documentation for more detailed information.
Sommaire
- 1 Architecture
- 2 Installation
- 3 Configuration
- 4 Start/stop of priority system
- 5 Supervision
Architecture
Schema
Principle
TODO
Message path
TODO
Installation
Requirements
The system is intended to be installed on Debian-based Linux distributions, e.g.:
- Debian Etch (4.0) or Lenny (5.0),
- Ubuntu server (8.4).
Postfix version should be at least 2.5 in order to have better concurrency scheduler.
For Debian Etch, Postfix should be installed from repository etch‑backports.
Installation of Postfix and Qpsmtpd
First step consists of installing Postfix, Qpsmtpd and SNMP agent.
# apt-get install postfix qpsmtpd snmpd
SNMP agent is used for supervision and is optional.
Installer could want to remove another mail server already installed to replace it with Postfix.
Choose Internet site option in order to generate a default configuration.
Default Postfix settings in /etc/postfix will be used to generate other configurations for all Postfix instances. It will be used only for initial creation of configurations.
It can now be customized with options which will be common to all instances.
Useful settings to be changed in /etc/postfix/main.cf are, for example, myhostname which is used to specify the name of the server.
Authentication and listen ports must not be setup now because they are different in every instances.
Installation of priority system
Priority system packet contains a tool to generate settings for all Postfix instances and Qpsmtpd, scripts for supervision and also startup scripts.
Download Debian package, then launch installation with the following command:
# dpkg -i priority-email-gateway_VERSION.deb
Packet will install the system and create, from default configuration in /etc/postfix, settings for all Postfix instances in /etc/postfix‑frontend, /etc/postfix0, /etc/postfix1, /etc/postfix2, ...
Qpsmtpd and Postfix instances will be started at the end.
Configuration
File list
- /etc/priority-email-gateway.conf: count and settings of priority instances.
- /etc/postfix: base Postfix settings used only during installation in order to generate other configurations.
- /etc/postfix-frontend: settings of frontend Postfix instance.
- /etc/postfix0, /etc/postfix1, ...: settings of Postfix instances managing different priorities.
Postfix main configuration files are main.cf and master.cf.
- /etc/qpsmtpd/addPrivatePriorityDomain.conf: rules to identify message headers in order to assign priorities.
Tools / Scripts
- /etc/init.d/postfix-priority: starting script for all Postfix instances.
- /etc/init.d/qpsmtpd-priority: starting script for Qpsmtpd.
- /usr/sbin/update-priority-email-gateway: tool used to generate or update settings for all Postfix instances and Qpsmtpd.
- /usr/sbin/priority-email-gateway-showQueues: tool used to display message counts in all queues of all Postfix instances.
General setup
Qpsmtpd parameters
TODO
Postfix parameters
TODO
Event when sending a bounce back to message originator
TODO
Customization of Postfix frontend
TODO
Customization of Postfix priority instances
TODO
Customization of rules to identify message headers
TODO
Start/stop of priority system
Priority system service is automatically launched when the server starts. Scripts used are /etc/init.d/postfix‑priority and /etc/init.d/qpsmtpd‑priority. They control all configured Postfix instances and Qpsmtpd.
Start service:
# /etc/init.d/postfix‑priority start # /etc/init.d/qpsmtpd‑priority start
Stop service:
# /etc/init.d/postfix‑priority stop # /etc/init.d/qpsmtpd‑priority stop
Restart service:
# /etc/init.d/postfix‑priority restart # /etc/init.d/qpsmtpd‑priority restart
After an configuration update with update‑priority‑email‑gateway, service is automatically restarted.
Supervision
Console
TODO
Log
TODO
SNMP
TODO