MAILWRAPPER(8)
π MAILWRAPPER π
okay so this is the <bold>MAILWRAPPER(8)</bold> page from the System Manager's Manual and bestie, buckle up, because this tiny program has lore. π
β¨ NAME β¨
mailwrapper β invoke appropriate MTA software based on configuration file
like, it's a mail traffic director. a little bouncer at the club door of your system's mail. πΊ
β¨ SYNOPSIS β¨
Special. See below.
yeah. no flags. no args list. it's giving "i contain multitudes" energy. you literally have to read the whole page to understand how it gets called, and honestly? iconic of it. π
β¨ DESCRIPTION β¨
okay so storytime π§ once upon time, the only Mail Transfer Agent (MTA) software easily available was βsendmailβ. this famous MTA was written by Eric Allman and first appeared in 4.1BSD. the legacy of this MTA affected most Mail User Agents (MUAs) such as mail(1) β the way that the path and calling conventions expected by βsendmailβ were just compiled in. baked right into the binary. no takebacks. π
but times changed. on a modern FreeBSD system, the administrator may wish to use one of several available MTAs. we love options. we love variety. π
and here's the problem: it would be difficult to modify all MUA software typically available on a system. so most of the authors of alternative MTAs have written their own front end message submission programs that may appear in the place of /usr/sbin/sendmail, but still follow the same calling conventions as βsendmailβ. drop-in replacement vibes. π«Ά
the βsendmailβ MTA also typically has aliases named mailq(1) and newaliases(1) linked to it. the program knows to behave differently when its argv[0] is βmailqβ or βnewaliasesβ and behaves appropriately. typically, replacement MTAs provide similar functionality, either through a program that also switches behavior based on calling name, or through a set of programs that provide similar functionality. multiple ways to slay, same end result. π
although having replacement programs that plug replace βsendmailβ helps in installing alternative MTAs, it essentially makes the configuration of the system depend on hand installing new programs in /usr. and that's the messy part, fr fr. this leads to configuration problems for many administrators, since they may wish to install a new MTA without altering the system provided /usr. (this may be, for example, to avoid having upgrade problems when a new version of the system is installed over the old.) they may also have a shared /usr among several machines, and may wish to avoid placing implicit configuration information in a read-only /usr. read-only means read-only bestie, don't @ me. π
enter our main character: the mailwrapper program is designed to replace /usr/sbin/sendmail and to invoke an appropriate MTA based on configuration information placed in ${LOCALBASE}/etc/mail/mailer.conf falling back on /etc/mail/mailer.conf. this permits the administrator to configure which MTA is to be invoked on the system at run time. runtime decisions!! genuinely obsessed. β¨
other configuration files may need to be altered when replacing sendmail(8). for example, if the replacement MTA does not support the -A option with mailq(1), daily_status_include_submit_mailq should be turned off in /etc/periodic.conf. consider this your friendly heads-up so nothing breaks at 3am. π₯
β¨ FILES β¨
- Configuration for
mailwrapperis kept in${LOCALBASE}/etc/mail/mailer.confor/etc/mail/mailer.conf. /usr/sbin/sendmailis typically set up as a symbolic link tomailwrapperwhich is not usually invoked on its own.
like yes, it's a symlink. it has a whole secret identity situation going on. π¦
β¨ EXIT STATUS β¨
- The
mailwrapperutility exits0on success, and>0if an error occurs.
simple. clean. zero means we ate, anything else means we did not. π
β¨ DIAGNOSTICS β¨
The mailwrapper will print a diagnostic if its configuration file is missing or malformed, or does not contain a mapping for the name under which it was invoked.
so if it's confused about who's calling it, it will say something. no silent ghosting. π»
β¨ SEE ALSO β¨
mail(1), mailq(1), newaliases(1), mailer.conf(5), periodic.conf(5), dma(8), sendmail(8)
go read the squad. iykyk. π«Ά
β¨ HISTORY β¨
The mailwrapper utility first appeared in NetBSD 1.4 and then FreeBSD 4.0. a real cross-platform glow-up. β
β¨ AUTHORS β¨
Perry E. Metzger <perry@piermont.com>
we stan. π
β¨ BUGS β¨
okay this is the part where the manpage gets brutally honest and honestly it's my favorite part π β the entire reason this program exists is a crock. 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 yeah: the page itself is out here calling the whole design questionable. respect the self-awareness. π₯
and that's the whole page bestie, mwah π β brought to you by Debian, dated October 29, 2014, filed under <bold>MAILWRAPPER(8)</bold>. go configure your MTA responsibly, ily πΈππ¦π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1998 Perry E. Metzger. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms