MAKEPERCENTRELAY(8)

NAME
makepercentrelay - Build a list of %-relayed domains

SYNOPSIS

makepercentrelay

DESCRIPTION

makepercentrelay reads @sysconfdir@/esmtppercentrelay.dir and creates @sysconfdir@/esmtppercentrelay.dat which is a binary database file. The files @sysconfdir@/esmtppercentrelay and @sysconfdir@/esmtppercentrelay.dat specify a list of "percent-hack" domains. @sysconfdir@/esmtppercentrelay is a plain text file, containing one domain per line. The Courier mail server loads the contents of @sysconfdir@/esmtppercentrelay into memory, so if you have a lot of domains, you will want to use the binary database file. The makepercentrelay command reads @sysconfdir@/esmtppercentrelay.dir, which can be either a plain text file itself, or a directory containing plain text files. All files in the subdirectory are concatenated, and the binary database file is created from the result.

the Courier mail server can use both @sysconfdir@/esmtppercentrelay and @sysconfdir@/esmtppercentrelay.dat at the same time. Usually you would put a couple of your most frequent domains in @sysconfdir@/esmtppercentrelay, then put the rest in @sysconfdir@/esmtppercentrelay.dir, and use makepercentrelay to turn it into a database file.

"percent-hack" domains are a list of domains for which the Courier mail server accepts mail via ESMTP addressed as "local%percent.hack.domain@local.domain", where "percent.hack.domain" is a domain found in @sysconfdir@/esmtppercentrelay or @sysconfdir@/esmtppercentrelay.dat, and "local.domain" is any domain found in @sysconfdir@/locals. The Courier mail server removes the local domain, and rewrites the address as "local@percent.hack.domain", then attempts to deliver it.

The percent hack applies only to mail received via ESMTP. The Courier mail server does not check this list of domains if the message is received via any other way (such as by running @bindir@/sendmail directly from the command line). "percent.hack.domain" would likely to be a domain that the Courier mail server knows how to handle via some other means. It might be an entry in @sysconfdir@/aliases, or an entry in @sysconfdir@/esmtproutes.

SUBDIRECTORY CHECKS

The following checks are made on the contents of @sysconfdir@/esmtppercentrelay.dir:

    • Files whose names contain a tilde, “~” are skipped over.

    • Files whose names end with the following suffixes result in an error message: “.rpmsave”, “.rpmnew”, and “.dpkg-suffix”. These files are backup files created by package manager when updating to a newer version of the package and contain the old or the new version of a configuration file whose settings may be new or obsolete.

    The contents of the file whose name does not have the suffix should be checked against the backup. The backup file should be deleted after making any needed manual changes to the configuration file.

    • Files whose names end with the “.dist” suffix is also treated as a configuration file backup or template, but with the following exception: the “.dist” file gets ignored and automatically skipped over, without any error message, if the suffix-less file exists and its modification time is more recent than the “.dist” file's modification time.

    Otherwise an error message gets reported. Resolving the error message is done by either copying the “.dist” file or editing and saving the file without the suffix (resulting in a newer timestamp).

SEE ALSO

esmtpd(8)[1], makealiases(8)[2].

AUTHOR

Sam Varshavchik
    Author

NOTES

1.  esmtpd(8)
    https://www.courier-mta.org/esmtpd.html

2.  makealiases(8)
    https://www.courier-mta.org/makealiases.html