dot-forward(1qmail)

✨ dot-forward(1qmail) ✨

okay so bestie, this is the manual page for dot-forward, and it's literally the glow-up that lets qmail read your old-school .forward file πŸŽ€


πŸ’– NAME πŸ’–

dot-forward β€” read a .forward file under qmail. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

in ~/.qmail: | dot-forward [ -nN ] file ...

πŸ‘‘ OVERVIEW πŸ‘‘

so here's the tea: dot-forward forwards your incoming messages according to sendmail-style instructions in file, if file exists. and normally, file is .forward. periodt πŸ’…

⚠️ WARNING: if you create a .qmail file to enable dot-forward, bestie, you absolutely MUST add a second line specifying delivery to your normal mailbox. do not skip this. for example:
|dot-forward .forward
./Mailbox
πŸ’€ COMPATIBILITY WARNING: dot-forward does not support :include: or mbox deliveries. nope, not a thing, not happening. you can use the delivery mechanism described in dot-qmail(5) instead 🫢

✨ OPTIONS ✨

  • -N β€” (Default.) Read and forward a message. the classic. the moment. the main character 🌟
  • -n β€” Parse file and print the forwarding instructions in it, one per line; do not follow the instructions. it's giving "just show me, don't do it". you can totally use this option from the command line to see how your .forward file will be interpreted:
dot-forward -n .forward

πŸŽ€ FILE HANDLING πŸŽ€

when a message arrives, dot-forward opens file and handles it as discussed below. then it exits 99, so qmail-local will ignore further instructions in .qmail. πŸ”₯

Exception: if file specifies delivery directly to you, dot-forward exits 0, so qmail-local will read further instructions in .qmail. slay πŸ’–

if file does not exist, dot-forward exits 0. and you can list several files! then dot-forward will try each one in turn, using the first one that exists, or exiting 0 if none of them exist. multitasking queen πŸ‘‘

πŸ’€ COMPATIBILITY WARNING: dot-forward treats an empty file as if it did not exist. versions of sendmail before V8 would throw away the incoming message. rip to those messages i guess 😭
πŸ’€ COMPATIBILITY WARNING: if dot-forward encounters a temporary error opening file, it exits 111, so that qmail-local will try again later. sendmail assumes incorrectly that file does not exist. not sendmail being wrong again πŸ™ˆ
πŸ’€ COMPATIBILITY WARNING: file must be readable by dot-forward, which is normally running as the user. sendmail places different constraints on its .forward permissions, since it is normally running as root. different rules for different girls, iykyk ✨

🌈 FORWARDING 🌈

normally file contains an address. dot-forward forwards the message to that address. simple as that πŸ¦‹

the address is parsed as if it were in an RFC 822 message header. parenthesized comments and bracketed addresses are permitted:

bob (Bob, the postmaster) @heaven.af.mil

addresses with special characters must be quoted:

"spaced out mailbox"@heaven.af.mil

address groups are not permitted. nope πŸ™…β€β™€οΈ

file can contain any number of lines, each line containing any number of addresses. dot-forward forwards the message to each address:

bob, fred, susan
Joe Shmoe <shmoe@heaven.af.mil>

an address without a fully qualified domain name is handled as described in qmail-header(5). Exception: certain addresses without domain names are handled specially, as described below. the drama continues πŸ’…


⭐ DIRECT DELIVERY ⭐

if an address does not contain a domain name, and matches the environment variable $USER (without regard to case), it specifies delivery directly to you. it's giving "me, myself, and i" 🫢

if an address matches $USER@$HOST (without regard to case), it specifies delivery directly to you. yes queen, that one's yours too πŸ‘‘

πŸ’€ COMPATIBILITY WARNING: sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by dot-forward. dot-forward treats \joe the same way as joe. the dot-qmail delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding. we simply don't need it bestie πŸ’…

🧚 COMMANDS 🧚

if an address does not contain a domain name, and begins with a vertical bar, dot-forward takes the rest of the address as a command to run:

bob, "|vacation bob"

dot-forward feeds the message to the command, preceded by the environment variables $UFLINE, $RPLINE, and $DTLINE. handing over the whole care package 🎁

πŸ’€ COMPATIBILITY WARNING: internet addresses can legitimately start with a slash or vertical bar. dot-forward treats anything with an unquoted @ as an address. sendmail appears to have various problems coping with these addresses, and with commands that contain @ signs. not sendmail struggling again 😭

πŸ“ COMMENTS πŸ“

any line in file that begins with # is ignored:

# this is a comment
πŸ’€ COMPATIBILITY WARNING: versions of sendmail before V8 did not allow comments in .forward files. ancient behaviour, honestly πŸ’€

πŸ’œ VERSION πŸ’œ

this is dot-forward 0.71. the dot-forward home page is http://pobox.com/~djb/dot-forward.html. go pay it a visit bestie 🌐✨


πŸ”₯ SEE ALSO πŸ”₯

  • qmail-header(5)
  • dot-qmail(5)

and that's a wrap on dot-forward(1qmail), brought to you by dot-forward 0.71 πŸ’– thanks for reading the whole thing, you're literally the best, mwah πŸŽ€πŸ¦‹πŸ’