nullmailer-send(8)

πŸ“¦
version 2.2+10~g7ed88a0 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ nullmailer-send β€” the manual page, but make it make sense ✨

okay bestie, this is nullmailer-send, from the System Manager's Manual (section 8, system admin stuff, very demure, very mindful). She's the one who actually sends the mail. Let's go. πŸ’–


πŸŽ€ NAME πŸŽ€

nullmailer-send β€” Send queued messages. That's it. That's the whole job. She sends the things. πŸ“¬


πŸ¦‹ SYNOPSIS πŸ¦‹

nullmailer-send

no flags, no arguments, she simply exists and delivers. main character energy fr. ✨


πŸ’… DESCRIPTION πŸ’…

so this program is the one responsible for coordinating the transmission of messages that have been queued by nullmailer-queue. She uses a whole variety of protocol modules to deliver the messages from the queue to remote "smart" servers. like, she's the dispatcher, the protocol modules are the drivers. 🚚

when the program starts, the queue is scanned to build a list of messages to send. The queue is rescanned when either:

  • the trigger is pulled, or
  • after pausetime seconds have elapsed after the last failed delivery.

when there are no messages in the queue, nullmailer does no rescanning until the trigger is pulled. periodt. πŸ’€

pulling the trigger consists of opening up the trigger named pipe and writing a single byte to it, which causes this program to be awakened (if it's not already processing the queue). This procedure is done by nullmailer-queue to ensure that messages are delivered immediately. no waiting around, no lollygagging. ⚑

you can start delivery by hand from the command line like this:

echo 1 > trigger

look at you, pulling the trigger manually. iconic. 🫢

Delivery of messages consists of reading the list of remote servers and then trying to deliver the messages to these servers as follows. For each remote in the list, the named protocol handler is executed once for each message remaining in the queue. If the protocol handler succeeds, the message is removed from the queue and processing continues with the next message. If the protocol handler reports a permanent failure or the message has been in the queue longer than queuelifetime, the message is moved into the failed queue and a bounce message is generated with nullmailer-dsn. If any messages remain in the queue, processing of the remaining messages continues with the next remote. When all the remotes have been tried, nullmailer-send sleeps for a number of seconds specified by pausetime before retrying sending the contents of the queue.

so: try, try, try, succeed or fail, move on, nap, repeat. πŸ’…


🌸 CONTROL FILES 🌸

bestie listen. All the control files are reread each time the queue is run. every single time. so don't come for me about caching, there is none. πŸ’€
  • helohost β€” Sets the environment variable $HELOHOST which is used by the SMTP protocol module to set the parameter given to the HELO command. Defaults to the value of the me configuration file. so if you don't set it, she just borrows your name from me. cute.
  • maxpause β€” The maximum time to pause between successive queue runs, in seconds. Defaults to 24 hours (86400). the ceiling, the limit, the final boss of napping. 😴
  • pausetime β€” The minimum time to pause between successive queue runs when there are messages in the queue, in seconds. Defaults to 1 minute (60). Each time this timeout is reached, the timeout is doubled to a maximum of maxpause. After new messages are injected, the timeout is reset. If this is set to 0, nullmailer-send will exit immediately after going through the queue once (one-shot mode). so like, exponential backoff but make it ✨aesthetic✨.
  • queuelifetime β€” The maximum time a message is allowed to live in the queue before being considered permanently failed, in seconds. Defaults to 7 days (604800). a whole week to get your life together, message. then it's the failed queue for you. πŸ’€
  • remotes β€” This file contains a list of remote servers to which to send each message. Each line of this file contains a remote host name or address followed by an optional protocol string, separated by white space. The protocol name defaults to smtp, and may be followed by additional options for that module. See the "PROTOCOL OPTIONS" section for a list of the available options. The options may optionally be prefixed by -- but this is not required. The line is parsed according to standard shell quoting rules. For example, to connect to port 2525 on your SMTP smart host, which also requires SMTP authentication, and initiate TLS with STARTTLS, use:
smarthost.dom smtp port=2525 starttls user=user pass='my pass phrase'

Blank lines and lines starting with a pound (#) are ignored. comments, we love you. πŸ’–

  • sendtimeout β€” The time to wait for a remote module listed above to complete sending a message before killing it and trying again, in seconds. Defaults to 1 hour (3600). If this is set to 0, nullmailer-send will wait forever for messages to complete sending. forever?? FOREVER?? bestie that is a commitment. 😭

πŸ”₯ PROTOCOL OPTIONS πŸ”₯

  • port=PORT β€” Set an alternate port number to connect to on the remote host. For example, SMTP may use port=587 for the alternate SMTP "submission" port. not the default port, the ✨alternate✨ port.
  • user=USERNAME β€” Set the SMTP authentication user name.
  • pass=PASSWORD β€” Set the SMTP authentication password. keep it secret, keep it safe. 🀫
  • source=HOSTNAME β€” Set the source address for connections to the remote host. like, where you're calling from. πŸ“ž
  • auth-login β€” Force SMTP "AUTH LOGIN" mode instead of auto-detecting. no vibes-based guessing, we're doing it manually.
  • auth-external β€” Use SMTP "AUTH EXTERNAL" for TLS client certificate authentication.
  • tls β€” Connect using TLS. This will automatically switch the default port to 465. secure, encrypted, glowing. πŸ”’
  • ssl β€” Alias for the tls option for compatibility. same girl, different name. πŸ‘‘
  • starttls β€” Use the STARTTLS command to initiate a TLS session. starting TLS after you say hi. polite. πŸŽ€
  • x509certfile=FILENAME β€” Set the filename for a TLS client certificate to send to the server.
  • x509keyfile=FILENAME β€” Set the filename for the private key for a TLS client certificate. Defaults to the same file name as x509certfile. she'll just assume they match unless you say otherwise.
  • x509cafile=FILENAME β€” Set the TLS certificate authority trust filename. Defaults to /etc/ssl/certs/ca-certificates.crt.
  • x509crlfile=FILENAME β€” Set the TLS certificate revocation list filename. the naughty list, but for certs. πŸ“‹
  • x509fmtder β€” Specify that TLS X.509 files above are in DER format instead of PEM. different format, same energy.
  • insecure β€” Don't abort a TLS connection if the server certificate fails validation. Use this only if you know the server uses an invalid certificate.
BESTIE. no. only use this if you actually know the server uses an invalid certificate. do not just throw it in because the error message was annoying. πŸ™ˆ
  • tls-anon-auth β€” Use TLS anonymous authentication β€” replacing certificate authentication. This means no external certificates or passwords are needed to set up the connection. With this option your connection is vulnerable to man-in-the-middle (active or redirection) attacks. However, the data are integrity protected and encrypted from passive eavesdroppers. This option must be used with the insecure option β€” to acknowledge that you know what you are doing.
okay so this one is scary. man-in-the-middle attacks are a real thing, not a vibe. but also: integrity protected, encrypted from passive eavesdroppers. she's telling you the whole truth, up front. and yeah, she makes you add insecure too, because she wants you to sign a little waiver first. 🫑

🌈 FILES 🌈

  • /var/spool/nullmailer/failed β€” The failed message queue. the graveyard. πŸͺ¦
  • /var/spool/nullmailer/queue β€” The outgoing message queue. the waiting room. πŸ’Œ
  • /var/spool/nullmailer/trigger β€” A trigger file to cause immediate delivery. pull it, she wakes up. ⚑
  • /etc/nullmailer β€” The configuration directory. where the control files live. 🏠
  • /usr/lib/nullmailer β€” The protocol program directory. where the protocol handlers hang out. πŸ‘―

πŸ‘‘ SEE ALSO πŸ‘‘

like go read those too, they're the rest of the friend group. 🫢


nullmailer-send(8) β€” System Manager's Manual β€” mwah, that's the whole page, thanks for coming to my ted talk, ily, go send some mail πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ