Why is Sendmail still around?
freebsd at edvax.de
Fri Mar 29 02:41:28 UTC 2019
On Fri, 29 Mar 2019 07:29:58 +0530, Mayuresh Kathe wrote:
> I am led to believe that Sendmail is still around in the install image
> as well as the base install because some need a way to send out mails
> without having to install a package/port.
No. The sendmail's primary (!) purpose on a UNIX system (and in
this case, on FreeBSD), is the "intra-system mail delivery", i. e.
the communication of programs to users. Things in /etc/periodic
as well as user cron entries typically use this mechanism to
inform the administrator or particular users. This mechanism
can be easily configured if you need something differing from
the default setup.
Sending mail out of the system ("inter-system mail delivery", to
follow the analogy opened above) is also possible, either using
a mail relay (the "SmartHost" feature) or acting as a real MTA.
This makes it easy for the user to send mail independently of
the program: mail, mailx, or a GUI client: The messages are
quickly (!) put into the system's queue, and the system takes
care of it. No annoying IMAP or SMTP interactive "waiting bar"
dialog that blocks your workflow, no waiting for some foreground
process to finish. This setup also reports back errors to the
user in case this should happen.
It's even possible to have automated mechanisms (programs and
shell scripts) use this facility: You can pipe anything to the
system mail program. For example,
% ls -laR /export | mail -s "Exported files" bob at example.com
can fulfill Bob's request for a list of all files currently in
the /export subtree. No need to take screenshots from a GUI file
manager, import them into a web mailer, wait for transfer encoding
and so on... :-)
As you can see, sendmail is a multi-purpose (!) tool.
Check /etc/defaults/rc.conf for sendmail options.
> Can't the same be achieved
> with "msmtp" which is lighter and easier to configure for simple tasks
> than Sendmail.
The question is: Can msmtp do everything that sendmail can? There
are still many sendmail installations online, even though today
today, postfix and exim are often considered superior, and I'd
even say they are therefore used more often.
> Hope FreeBSD isn't hanging on to Sendmail due to some
> political issue like being the baby of one of the lead developers /
No, I think it's the consideration of the implemented features and
the ability of integration into the system that keeps sendmail in
its current place.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions