MH-TAILOR(5mh)

๐Ÿ“ฆ
version 1.8 ยท 3 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– mh-tailor, mts.conf โ€” mail transport configuration for nmh ๐Ÿ’–

okay bestie, pull up a chair, we're reading MH-TAILOR(5mh) together and honestly? it's giving "settings file that runs the whole show" โœจ it lives in section 5 of the mh manual, and it's all about mts.conf ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

mh-tailor, mts.conf โ€” mail transport configuration for nmh message handler ๐Ÿฆ‹


โœจ DESCRIPTION โœจ

so the file /etc/nmh/mts.conf is where you define run-time options for all the nmh programs that interact โ€” in some form โ€” with the message transport system ๐Ÿ’Œ rn those user programs are: ap, inc, msgchk, post, rcvdist, and rcvpack. periodt.

each option gets one single line, no sprawling, no multitasking ๐Ÿ™…โ€โ™€๏ธ blank lines are ignored, and so is anything that starts with # (that's your comment vibe, queen).

here's every option, with its default value and what it actually means ๐Ÿ‘‡

  • mts: โ€” the mail transport method you wanna use. three acceptable options: smtp (which is the default, iconic), sendmail/smtp, and sendmail/pipe.
    • if you use smtp, that enables a direct SMTP interface in nmh. when you send mail, instead of handing the message off to the mail transport agent, post opens a socket connection to the mail port on the machine named in the servers entry ๐Ÿ”Œ
    • if you use sendmail/smtp, then post sends messages by forking a local copy of sendmail. it'll still speak SMTP with that local copy of sendmail ๐Ÿ—ฃ๏ธ and for backward compatibility, sendmail/smtp can be abbreviated to just sendmail.
    • the third one, sendmail/pipe, also forks a local copy of sendmail, but it feeds the message directly to it using sendmail -t. this replaces the old, undocumented spost mechanism and keeps some of its limitations, like no support for the Dcc: header field โ€” as described in the send and post manual pages. so like, know what you're signing up for ๐Ÿ’€
  • localname: โ€” the hostname nmh considers local. it should typically be a fully qualified hostname. if this isn't set, depending on your version of Unix, nmh will query the system for this value (e.g. uname, gethostname, etc.) and attempt to fully qualify it ๐Ÿ 
    • if you're using POP to retrieve new messages, you might wanna set this to the name of the POP server, so that outgoing messages look like they originated on the POP server ๐Ÿ‘€
  • localdomain: โ€” if this is set, a . followed by this string gets appended to your hostname.
    • you should only need this if, for some reason, nmh can't fully qualify the hostname returned by the system (e.g. uname, gethostname, etc.) ๐Ÿซ 
  • clientname: โ€” this specifies the host name nmh will give in the SMTP HELO (and EHLO) command when posting mail. if it's not set, the default is to use the host name nmh considers local (see localname above ๐Ÿ‘†). if this option is set, but empty, then no HELO command will be given ๐Ÿ™ˆ
    • and even though the HELO command is required by RFC 821, lots of SMTP servers don't require it. early versions of SendMail will fail if the hostname in the HELO command is the local host. later versions of SendMail will complain if you omit the HELO command ๐Ÿ˜ญ if you run SendMail, find out what your system expects and set this field if needed.
  • systemname: โ€” this one is only used for UUCP mail. it specifies the name of the local host in the UUCP "domain". if not set, depending on your version of Unix, nmh will query the system for this value ๐Ÿ“ฎ this has no equivalent in the nmh configuration file.
  • mmdfldir: /var/mail โ€” the directory where mail drops are kept ๐Ÿ—‚๏ธ if this option is set but empty, the user's home directory is used. this overrides the default value chosen at the time of compilation.
  • mmdflfil: โ€” the name of the mail drop file inside the directory where mail drops are kept. if this is empty, the user's login name is used. this overrides the default value (which is empty) ๐Ÿ“ญ
  • spoollocking: fcntl โ€” the locking algorithm to use when opening the mail drop ๐Ÿ”’ can be any one of the following:
    • fcntl
    • dot
    • flock
    • lockf
  • maildelivery: /usr/lib/mh/maildelivery โ€” the name of the system-wide default maildelivery file ๐Ÿ“ฌ see slocal(1) for the details.

๐Ÿ“ก SMTP support ๐Ÿ“ก

this option is only available if you set mts to smtp.

  • servers: localhost โ€” a single hostname to be used when performing mail submission via SMTP ๐ŸŒ previous versions of nmh supported multiple hostnames for servers, but the current version of nmh only supports a single entry (the name is kept for backwards compatibility reasons, bless). this can be overridden via the -server switch to send(1). it is not possible to change the mail submission port number in the servers entry โ€” see the -port switch to send(1) for that functionality ๐Ÿ‘‘

๐Ÿ“จ SendMail ๐Ÿ“จ

this option is only available if you set mts to sendmail/smtp or sendmail/pipe.

  • sendmail: /usr/sbin/sendmail โ€” the pathname to the sendmail program ๐Ÿ“ฎ

๐Ÿค Post Office Protocol ๐Ÿค

  • pophost: โ€” the name of the default POP service host. if this isn't set, then nmh looks in the standard mail drop areas for waiting mail; otherwise, the named POP service host is consulted ๐Ÿ“ฅ

๐Ÿ” File Locking ๐Ÿ”

a few words on locking, bestie, because this part matters:

nmh has two main uses for locking โ€” locking the mail spool during mail incorporation, and locking metadata files (sequence files, the context) during updates. these locking methods can be configured separately from each other ๐Ÿง 

for locking the mail spool, the spoollocking entry in mh-tailor(5) controls the locking algorithm to use when inc incorporates mail from the spool file. if no entry is given, a default based on the operating system type will be chosen ๐Ÿ’ซ

for locking all other files, the datalocking entry in mh-profile(5) controls the locking algorithm used for all other file access. if no entry is given, the fcntl lock method will be chosen.

if you don't wish to use kernel-based locking, dot locking is an option available to you ๐Ÿ’… if --enable-lockdir=directory is not specified at build time, lock files will be created in the directory where the file being locked resides. otherwise, lock files will be created in the directory specified by --enable-lockdir ๐Ÿ“

before installing nmh, you should see how locking is done at your site, and set the appropriate values. no cap, do this ๐Ÿ™

๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

  • /etc/nmh/mts.conf โ€” nmh mts configuration file

๐Ÿชž PROFILE COMPONENTS ๐Ÿชž

None โ€” yeah, literally none, that's the whole vibe ๐Ÿ“


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

mh-mts(8), post(8), send(8) โ€” go read those too, they're the supporting cast ๐Ÿ’œ


๐ŸŽ€ DEFAULTS ๐ŸŽ€

as listed above โ˜๏ธ the path of the mail transport configuration file can be changed with the MHMTSCONF environment variable and augmented with the MHMTSUSERCONF environment variable โ€” see mh-profile(5) ๐ŸŒˆ


๐Ÿ’€ BUGS ๐Ÿ’€

failure to open any mail transport configuration file is silently ignored ๐Ÿ˜ถ (not even a peep, it's giving ghosting). therefore, it's best to avoid dynamically creating such a file with the intent of using it via the MHMTSCONF or MHMTSUSERCONF environment variables. if you absolutely must do that, the ability to successfully open the file should first be verified โœ…

fr fr, verify first. silent failure will humble you ๐Ÿ™ˆ

okay that's the whole page bestie, you ate this ๐Ÿ’– stay locked, stay configured, and remember: one option per line, always ๐Ÿ’…

this was nmh-1.8, dated 2017-02-19 โ€” mwah, love u, bye ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from