NEWALIASES(8)

πŸŽ€ newaliases β€” the system manager's manual, but make it group chat πŸŽ€

okay bestie, welcome to newaliases(8) β€” she's a System Manager's Manual girlie and she's here to rebuild your mail aliases. yes, that's the whole vibe. let's get into it πŸ’…


✨ NAME ✨

newaliases β€” rebuild mail aliases. that's it. that's the tweet πŸ¦‹


🌸 SYNOPSIS 🌸

newaliases [-f file]

πŸ’– DESCRIPTION πŸ’–

so here's the tea: newaliases makes the changes you made to the mail aliases file actually visible to smtpd(8). like, she's the messenger. she tells the mail server "hey, the aliases changed, look at them please" 🫢

you should run her every single time the aliases(5) file is changed. not sometimes. not when you remember. every time, periodt 😀

where does the alias file even live, you ask? that's defined in smtpd.conf(5), and it defaults to /etc/smtpd/aliases. cute, right?

The options are as follows:

  • -f file β€” use file as the configuration file, instead of the default /etc/smtpd/smtpd.conf. basically "bestie, ignore the usual config, use this one instead" πŸ’«

🧚 the equivalence lore 🧚

okay this part is lowkey iconic because newaliases is basically a shortcut and it depends on what kind of files you're rocking:

If you're using database (db) files, newaliases is equivalent to running makemap(8) like this:

# makemap -t aliases /etc/smtpd/aliases

If you're using plain text files instead, newaliases is equivalent to running smtpctl(8) like this:

# smtpctl update table aliases

same energy, different backend. iykyk πŸ”₯


πŸ“ FILES πŸ“

  • /etc/smtpd/aliases β€” List of local user mail aliases.
  • /etc/smtpd/virtual β€” List of virtual host aliases.

these are the files in question. know them, love them πŸ’œ


⭐ EXIT STATUS ⭐

The newaliases utility exits 0 on success, and >0 if an error occurs.

so like β€” 0 means slay, anything bigger means something went off and you should maybe look at it 😭


🌈 SEE ALSO 🌈

smtpd.conf(5), makemap(8), smtpctl(8), smtpd(8)

go read these, they're her friends and honestly they ate πŸ‘‘


πŸ‘‘ HISTORY πŸ‘‘

The newaliases command first appeared in OpenBSD 4.6 as a replacement for the equivalent command shipped with sendmail. glow-up behavior, honestly ✨


ngl bestie, the one thing to remember: change the aliases file β†’ run newaliases. that's the self-care routine πŸ’…

and that's a wrap! this page came from the Debian crew, dated July 20, 2018 β€” mwah, thanks for coming to my ted talk πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from