Commit graph

29 commits

Author SHA1 Message Date
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Emmanuel Vadot 431b9b6692 pkgbase: Put sendmail example in the sendmail package
Reviewed by:	bapt
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38297
2023-02-08 08:50:31 +01:00
Baptiste Daroussin a67b925ff3 mail: make The Dragonfly Mail Agent (dma) the default mta.
dma accepts mail from a local Mail User Agent (MUA) and delivers it
locally or to a smarthost for delivery. dma does not accept inbound
mail (i.e., it does not listen on port 25) and is not intended to
provide the same functionality as a full MTA like postfix or sendmail.
It is intended for use cases such as delivering cron(8) mail. which
is the default configuration and usage of sendmail in the default
setup of the base system.

In order to switch the default from sendmail to dma, we teach
mailwrapper to fallback on dma directly if the mailer.conf file cannot
be opened.
We install by default a mailer.conf file which points at dma
We install a mailer.conf file for sendmail in the examples.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D37035
2022-11-07 12:49:56 +01:00
Baptiste Daroussin 3467e28f3d mailwrapper: create mailwrapper symlinks for dma(8)
The Dragonfy Mail Agent (dma) can be used with mailwrapper as a
replacement for sendmail(8)

Even if mailwrapper and sendmail are disabled from the build but
dma is not create all the expect symlinks on mailwrapper and make
mailwrapper a symlink to dma, the same way it was done before when
mailwrapper is disabled by sendmail was not.

Discussed with:	emaste
2022-10-18 16:42:27 +02:00
Kyle Evans 70448a5414 mailwrapper: switch mailer.conf to CONFS
This matches what was already being done in dma(8), and should again make
this merge with etcupdate/mergemaster.

Reported by:	jhb
2020-06-29 18:06:00 +00:00
Kyle Evans cb99e93575 pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL
When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that
conflict, and hilarity ensues. There's currently three different places that
we might install mailer.conf:

- ^/etc/Makefile (package=runtime, contingent on MK_MAIL != no)
- ^/libexec/dma/dmagent/Makefile (package=dma, contingent on MK_SENDMAIL !=
no)
- ^/usr.sbin/mailwrapper/Makefile (package=utilities, contingent on
not-installed)

The mailwrapper installation will effectively never happen because the ^/etc
one will first.

This patch simplifies the whole situation; remove the ^/etc/Makefile version
and install it primarily in mailwrapper if MK_MAILWRAPPER != "no". The
scenarios covered in mailwrapper are:

- sendmail(8) is installed, dma(8) may or may not be installed
- neither sendmail(8) nor dma(8) is installed

In the first scenario, sendmail(8) is dominant so we can go ahead and
install the version in ^/etc/mail. In the unlisted scenario, sendmail(8) is
not installed but dma(8) is, we'll let ^/libexec/dma/dmagent do the
installation. In the second listed scenario, we still want to install an
example mailer.conf so just install the base sendmail(8) version.

Reviewed by:	bapt
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24924
2020-06-02 02:38:54 +00:00
Baptiste Daroussin 8b081eaa55 Revert r326844
There has been some fallout from the change. The change itself was not valueable
enough to spend time investigating the corner cases, let's just back it out.

Reported by:	flo
2018-01-02 16:50:57 +00:00
Baptiste Daroussin b37b09244c Replace usage of fparselen(3) by a getline(3)
This allow to remove the dependency on libutil
2017-12-14 08:57:37 +00:00
Rodney W. Grimes ce9f2d31b3 Convert absolute links to relative links.
Style.Makefile(9) has been ignored to produce minimal diffs.

Approved by:	grehan (mentor)
MFC after:	1 week
2017-03-07 05:10:38 +00:00
Enji Cooper 64a0982bee usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-04 11:38:03 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Warner Losh c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Mark Murray 4f6fbcd5db Create the /bin/rmail symlink (which mailers such as postfix
and Exim can use).

This is something I thought I committed MONTHS ago, but it appears
that I fatfingered it and made a local commit.

Pass the pointy hat, please.
2010-10-12 21:01:26 +00:00
Ed Schouten 71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Xin LI 8fe1b8c03e Cleanups for mailwrapper(8):
- K&R -> ANSI prototype [O]
 - Do not bother to do free right before exit() or execve() [O]
 - Remove some dead code in addarg()
 - Make additional parameters specified in mailer.conf(5)
   actually work and document the fact. [N]
 - Avoid using __progname but instead use getprogname()
   and setprogname() to provide more sensible messages. [O, N]
 - Update $OpenBSD$ and $NetBSD$ to reflect the fact that we
   have sync'ed with their code.
 - WARNS=6

Obtained from/Inspired by:	OpenBSD [O], NetBSD [N] (partially)
2006-06-06 05:01:12 +00:00
Ruslan Ermilov e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Ruslan Ermilov a5d15979f2 Replaced afterinstall: with FILES. 2004-10-18 17:20:29 +00:00
Johan Karlsson ef271e5858 Do not install SYMLINKS if both NO_MAILWRAPPER and
NO_SENDMAIL is defined.

PR:		57058
Reported by:	Henri Hennebert <hlh@cocoon.cercle.be>
		Melvyn Sopacua on current@
Submitted by:	ru@
MFC after:	2 weeks
2004-01-17 23:58:23 +00:00
Ruslan Ermilov d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Peter Wemm 2632dac829 If NO_MAILWRAPPER is set, and sendmail is still enabled, then install
a direct symlink to sendmail.
2002-07-24 22:17:22 +00:00
Gregory Neil Shapiro 5bcd1d05cf Add the missing hoststat and purgestat commands. These are normally
symlinks to the sendmail binary but in FreeBSD's case, they are
symlinks to mailwrapper.

Submitted by:	tisco
MFC after:	4 days
2002-04-05 04:25:14 +00:00
David E. O'Brien 90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Ruslan Ermilov 345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Tim Vanderhoek 0e61e4dd08 Install mailer.conf as ${BINOWN}, ${BINGRP}, rather than root:wheel. This
lets unprivileged installworld: almost work first try and always work second.

BINOWN isn't quite right for this, but it's not really worth creating
a MAILOWN for this.
2000-06-04 01:20:58 +00:00
Peter Wemm 1538c4ee35 Preempt one brucification - I was missing a ${DESTDIR}. I hate merging
two sets of changes from different trees.
1999-12-29 18:51:36 +00:00
Peter Wemm 44ba071e87 As a special case, deal with a missing mailer.conf at install time. I
don't particularly like doing this here, but the alternative (loosing mail)
is worse.
1999-12-29 18:27:35 +00:00
Peter Wemm 521cb9d2af Make mailwrapper build 1999-12-29 17:51:22 +00:00
Peter Wemm 3ae9291301 Import NetBSD's mailwrapper to redirect /usr/sbin/sendmail to the user's
chosen mailer.

Obtained from: NetBSD
1999-12-19 13:50:37 +00:00