Name

makeimapaccess — Build IMAP server access file

Synopsis

makeimapaccess

DESCRIPTION

makeimapaccess rebuilds the contents of the /etc/courier/imapaccess.dat database from the contents of the files in the /etc/courier/imapaccess directory. When the imapd script starts couriertcpd, the script specifies the /etc/courier/imapaccess.dat file to control access to the Courier mail server's IMAP daemon. The makeimapaccess script must be run before any changes in the /etc/courier/imapaccess directory take effect.

The couriertcpd(8) manual page describes the general format of access files.

The imapaccess configuration file

The couriertcpd(8) manual page describes the generic format of the access file. The access file specifies what should be done with connections from defined IP address ranges. The basic choices are to accept or reject the connection. Also, the generic format of the access file allows arbitrary environment variables to be set based on the connection's remote IP address, however the IMAP server does not use any special environment variables on its own.

Subdirectory checks

/etc/courier/imapaccess can be a subdirectory instead of a text file. This has the effect of concatenating all files in that directory (subject to the following checks) and then using the result as the /etc/courier/imapaccess file. The following checks are made:

  • 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

couriertcpd(8).