MAILER.CONF(5)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’Œ MAILER.CONF(5) β€” like, the whole entire vibe πŸ’Œ

okay so bestie, gather round, because today we're talking about mailer.conf(5) β€” the File Formats Manual entry for the configuration file that drives mailwrapper(8). yes it's a whole thing and yes it's iconic πŸŽ€


✨ NAME ✨

mailer.conf β€” the configuration file for mailwrapper(8) πŸ¦‹


🌸 DESCRIPTION 🌸

okay so the file /etc/mail/mailer.conf is literally just a bunch of lines that look like this:

name program [arguments ...]

The first word of each line? That's the name of a program that invokes mailwrapper(8). Like, on a typical system /usr/sbin/sendmail would be a symbolic link to mailwrapper(8), and so would newaliases(1) and mailq(1). So name might be sendmail or newaliases etc. β€” you get it πŸ’…

The second word of each line is the name of the program that actually gets executed when that first name is invoked. the real one. the main character πŸ‘‘

The further arguments, if there are any, get passed to the program β€” and then, after those, come the arguments mailwrapper(8) was called with. order matters, bestie 🫢

The file can also have comment lines, and those are denoted by a # mark in the first column of any line. first column only, no cap 🀭


πŸŽ€ FILES πŸŽ€

  • /etc/mail/mailer.conf

πŸ”₯ EXAMPLES πŸ”₯

This example shows how to set up mailer.conf to invoke the traditional sendmail(8) program:

# Execute the "real" sendmail program located in
# /usr/libexec/sendmail/sendmail
sendmail        /usr/libexec/sendmail/sendmail
mailq           /usr/libexec/sendmail/sendmail
newaliases      /usr/libexec/sendmail/sendmail

Using Postfix (from ports) to replace sendmail(8):

# Emulate sendmail using postfix
sendmail        /usr/local/sbin/sendmail
mailq           /usr/local/sbin/sendmail
newaliases      /usr/local/sbin/sendmail

Using Exim (from ports) to replace sendmail(8):

# Emulate sendmail using exim
sendmail        /usr/local/sbin/exim
mailq           /usr/local/sbin/exim -bp
newaliases      /usr/bin/true
rmail           /usr/local/sbin/exim -i -oee

Using mini_sendmail (from ports) to replace sendmail(8):

# Send outgoing mail to a smart relay using mini_sendmail
sendmail        /usr/local/bin/mini_sendmail -srelayhost

Using dma(8) to replace sendmail(8):

# Execute dma instead of sendmail
sendmail        /usr/libexec/dma
mailq           /usr/libexec/dma
newaliases      /usr/libexec/dma
rmail           /usr/libexec/dma

like, pick your fighter, they're all valid 🌈


πŸ’œ SEE ALSO πŸ’œ


πŸ¦‹ HISTORY πŸ¦‹

mailer.conf appeared in NetBSD 1.4. a true vintage icon, honestly ✨


πŸ‘‘ AUTHORS πŸ‘‘

Perry E. Metzger <perry@piermont.com>


πŸ’€ BUGS πŸ’€

ngl the entire reason this program exists is a crock. 😭 Like, instead, a command for how to submit mail should be standardized, and all the "behave differently if invoked with a different name" behavior of things like mailq(1) should go away. so there's that. screaming, crying, throwing up, etc. πŸ™ˆ


and that's the tea, bestie πŸ“ this whole page came to you from Debian, dated December 26, 2017 β€” go forth and configure your mailer, you absolute legend πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from