Simple script to 'poke' a backup MX server via ETRN

ipv6 ready


This is a simple script that finds a list of domains hosted by the host is is being run on, then connects to the specified remote host via fetchmail to 'poke' the server with ETRN commands to invoke immediate delivery of any mail that is pending delivering for those domains on the backup MS server.

Please report any problems via a comment on the AUR page for this software.


By default, the script looks for it's configuration file in /etc/etrn-poke/options.conf so if you've put it somewhere else, you'll need to edit the script and point it in the right direction. The script checks for the file at startup and handles it sanely if it can't find the file.

The following configuration variables are available:
Variable Name Description Type Default
USE_DB Whether to make a query to a PostgreSQL database to find the domains we are primary MX for. This assumes you are using a PostgreSQL database, with a database schema similar to the default created by the PostfixAdmin web app. 'yes' or 'no' 'yes'

If not using a database, specify a comma-separated list of domains to poke on the remote server. Ignored if USE_DB is 'yes'

String None

Hostname or IP Address of the PostgreSQL server. Ignored if USE_DB is 'no'

String None

TCP Port of the PostgreSQL server. Ignored if USE_DB is 'no'

String 5432

Username to connect to the PostgreSQL server as. Ignored if USE_DB is 'no'

String None

Password of the PostgreSQL username in PGSQL_USERNAME. Ignored if USE_DB is 'no'

String None

Name of the PostgreSQL database to connect to. Ignored if USE_DB is 'no'

String None

Name of the table or view that holds a list of domains for this host. Ignored if USE_DB is 'no'

String domains

Name of the column in the $PGSQL_COL table/view that is the domain TLD. Ignored if USE_DB is 'no'

String domain
(Binary Paths)
If you are not using ArchLinux, you may need to adjust the paths to variosu binary files used by the script such as 'psql' 'sed' and 'fetchmail' Various ArchLinux sane defaults


etrn-poke backup-mx-server [options-file]



Follow On GitHub