MAKESMTPACCESS-MSA(8)

πŸ“¦
version 2.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

makesmtpaccess β€” build the ESMTP server access file. That's it, that's the whole job, and she does it flawlessly. ✨

(oh and for context, the header on this page reads MAKESMTPACCESS, MAKE(8), so yes you're in section 8, bestie. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

makesmtpaccess

makesmtpaccess-msa

🌸 DESCRIPTION 🌸

Okay so picture this: makesmtpaccess rebuilds the contents of the /etc/courier/smtpaccess.dat database from the contents of the files sitting in the /etc/courier/smtpaccess directory. That's the glow-up pipeline. πŸ’…

When the esmtpd script starts couriertcpd, that script hands over /etc/courier/smtpaccess.dat to control access to the Courier mail server's ESMTP daemon. So real talk: the makesmtpaccess script must be run before any changes in the /etc/courier/smtpaccess directory take effect. Edit all you want, nothing happens until you run her. Periodt.

The couriertcpd(8) manual page describes the general format of access files. Go read her, she's the blueprint. 🫢

The default Courier mail server configuration is lowkey lazy in the cutest way and uses the same access file, /etc/courier/smtpaccess.dat, for both the regular ESMTP server and the message submission server on port 587 (RFC 2476). But bestie, you can use different access files. To do so:

  1. Create a different access file.
  2. Edit /etc/courier/esmtpd-msa, and set ACCESSFILE to the filename of the access file directory (that's the directory containing the plain text files, not the .dat file).
  3. Then use makesmtpaccess-msa instead of makesmtpaccess to build the .dat file. Slay. ✨

πŸ’œ The smtpaccess configuration file πŸ’œ

The couriertcpd(8) manual page describes the generic format of the access file. The access file says 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. Gotta love a flexible queen. πŸ‘‘

The Courier mail server's ESMTPD server understands the following environment variables, which may be set in the access file:

  • BLOCK β€” If this variable is set to a non-empty value, all mail will be rejected for this connection. The contents of the environment variable will be used as the error message. Heads up: this is not the same as the couriertcpd access file setting that immediately drops the connection. Here, the incoming connection is accepted, but every message will be rejected. It's giving "come in, but also no". πŸ’€
  • RELAYCLIENT β€” Allow the client to relay mail.
Note: When ESMTP authentication is enabled, a successful authentication automatically sets RELAYCLIENT.
  • FAXRELAYCLIENT β€” Allow the client to send faxes via the courierfax(8) module.
Note: RELAYCLIENT must also be set. FAXRELAYCLIENT is set in addition to RELAYCLIENT.
Note: When ESMTP authentication is enabled, a successful authentication automatically sets FAXRELAYCLIENT.

The following options are typically set globally in the esmtpd configuration file, but may be overridden in the smtpaccess configuration file:

  • BOFHCHECKDNS β€” Do not check the return address's domain in DNS if this environment variable is set to 0. The default value of BOFHCHECKDNS is 1.
Note: Turning off the DNS check disables a number of options in the bofh configuration file. See courier(8) for more information.
  • BOFHCHECKHELO β€” Set this variable to 1 to check the hostname argument to the ESMTP HELO/EHLO command, as follows:
    • A hostname that's actually an IP address, and is the same as the connecting ESMTP client's IP address, is valid.
    • Otherwise hostname should be a valid DNS name with MX and/or A records, with at least one record matching the connecting ESMTP client's IP address.
    • An ESMTP client with relaying privileges (either due to RELAYCLIENT explicitly set, or if it successfully authenticates) may use anything for an EHLO/HELO. The EHLO/HELO argument coming from an authenticated/relaying client is not checked. Main character energy, honestly. ✨
  • BOFHNOEXPN β€” Disable the EXPN command if this environment variable is set to 1.
  • BOFHNOVRFY β€” Disable the VRFY command if this environment variable is set to 1.

Other useful environment variables are listed in the submit(8) manual page. 🫢


🌈 @SYSCONFDIR@/SMTPACCESS SUBDIRECTORY 🌈

The following checks are made on the contents of /etc/courier/smtpaccess:

  • Files whose names contain a tilde, ~, are skipped over. Bye girl. πŸ‘‹
  • 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 they 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 are 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 (which results in a newer timestamp). Easy fix, bestie. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

esmtpd(8), couriertcpd(8), submit(8).


πŸ‘‘ AUTHOR πŸ‘‘

Sam Varshavchik β€” Author. Iconic. πŸ’œ


πŸ“š NOTES πŸ“š

  1. couriertcpd(8) β€” https://www.courier-mta.org/couriertcpd.html
  2. RFC 2476 β€” https://datatracker.ietf.org/doc/html/rfc2476
  3. courierfax(8) β€” https://www.courier-mta.org/courierfax.html
  4. courier(8) β€” https://www.courier-mta.org/courier.html
  5. submit(8) β€” https://www.courier-mta.org/submit.html
  6. esmtpd(8) β€” https://www.courier-mta.org/esmtpd.html

and that's the whole page, bestie!! πŸ’– this was Courier Mail Server, dated 01/10/2026 β€” go run her, she ate, no cap, periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • ubuntu stonking: courier-mta 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms