FORWARD(5)

πŸ“¦ version 7.9.0p0, in opensuse-leap 16.0

πŸ’Œ forward(5) β€” email forwarding information file πŸ’Œ

okay bestie, this page is from the File Formats Manual, and it’s all about that .forward life. no cap, it’s giving β€œset it and let smtpd handle the rest” energy. ✨

πŸŽ€ NAME πŸŽ€

  • forward β€” email forwarding information file. literally the manual page for the .forward file, and yes it’s iconic. πŸ’…

🌸 DESCRIPTION 🌸

okay so here’s the tea: users may put a .forward file in their home directory. If this file exists, smtpd(8) forwards email to the destinations specified therein. smtpd(8) is the main character here, lowkey. πŸ‘‘

A .forward file contains a list of expansion values, as described in aliases(5). Each expansion value should be on a line by itself. Expansion is performed under the user ID of the .forward file owner. iykyk β€” it’s doing the work as that user. 🫢

Permissions on the .forward file are very strict, and expansion is rejected if:

  • the file is group or world-writable;
  • the home directory is group writeable;
  • or the file is not owned by the user.
🚨 bestie, this is not a drill: those permission checks are strict, periodt. If any of those conditions hit, expansion gets rejected. no vibes pass go. πŸ’€

Users should avoid editing the .forward file directly, to prevent delivery failures from occurring if a message arrives while the file is not fully written. The best option is to use a temporary file and use the mv(1) command to atomically overwrite the former .forward. Alternatively, setting the sticky(8) bit on the home directory will cause the .forward lookup to return a temporary failure, causing mails to be deferred. slayful little safety dance. 🧚

πŸ—‚οΈ FILES πŸ—‚οΈ

  • ~/.forward β€” Email forwarding information. literally the file this whole page is about. πŸ’–

πŸ§ͺ EXAMPLES πŸ§ͺ

The following file forwards mail to user@example.com, and pipes the same mail to examplemda. cute, concise, forwarding. πŸŽ€

# empty lines are ignored

user@example.com        # anything after # is ignored
"|/path/to/examplemda"

πŸ”— SEE ALSO πŸ”—

⚠️ CAVEATS ⚠️

ngl, one spicy limitation: the pipe | and :include: mechanisms are not allowed for the root user. that’s the rule, bestie. πŸ’€

Debian, September 5, 2024 β€” and that’s forward(5), bestie. go forth and forward responsibly. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from