Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2024 18:24:11 +0100
From:      Lexi Winter <lexi@le-fay.org>
To:        arch@freebsd.org
Subject:   mailwrapper behaviour if mailer.conf can't be opened
Message-ID:  <ZiFXOzm_Lq65hePj@ilythia.eden.le-fay.org>

next in thread | raw e-mail | index | archive | help

--KN3V09NECx4TDrFV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

hello,

i submitted this change request:

https://github.com/freebsd/freebsd-src/pull/969

which was rejected for needing more discussion, so i'd like to discuss
that.

the current behaviour is that if mailwrapper cannot open mailer.conf for
any reason, it calls back to _PATH_DEFAULTMTA.  i think this behaviour
is bad, because:

- if the default MTA has not been configured, it may not be able to
  deliver mail

- if the admin has configured a different MTA, mailwrapper should not
  fall back to a different MTA because of transient errors

- this may hide mail delivery errors from applications by delivering the
  mail to the wrong MTA instead of returning a failure

with my change, mailwrapper will fall back to _PATH_DEFAULTMTA if
mailer.conf doesn't exist, which preserves mail functionality if the
admin has deleted mailer.conf for some reason.  but if mailer.conf can't
be opened for any other reason, it will exit with EX_OSERR, returning an
error to the application.

this was previously discussed on the PR:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=25218

where the argument was made that it's better to make a 'last ditch'
attempt to deliver mail if mailer.conf can't be opened.  i disagree with
this, for the reasons above, and in addition because modern systems
generally do not rely on mail delivery to report serious errors -- they
are monitored by an external NMS.

--KN3V09NECx4TDrFV
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmYhVzkACgkQDHqbqZ41
x5n7ugv+JfAc7KEA8XQzMMBG5Xif+KeE7WehlO9ewO7BuatETsW5wgtqL74H9NwS
W1jt1UqwWxL9myFmw4fD88bLFNxXRZAahBfB5m27pm2FBxXnIqqSSwQb3fpVKhEv
jGkiI24YzWyRGmC7Da/rpW6wX0L72EvCxb+QoTzf1pp1dyEmFamPwQa72ErUr05W
tI2Teg/q/mbMzuHNGDH2cJ+TI/CIAK1Aa8bTAyFpVqvxUpyrd/Hq420YZvkDG2f6
b6cWmWIAnrJr/y3I+qAc6Yte4hXs/Zp+eUJwc8pPiBdSCOtS8DJWcGr7UYjAbBCl
Fi1HcO64yDxqSRx09zLksg2hxZXWxc89MhIBTT5kGIvki7O3sZB+4ypJIUE7Nayp
Nktr9I1f2b1pAWd0gLmV+E0QNTsMqjuX3MjGuB5D/5epBmuPV8D5KTlvX6RnnecI
gslBZVTyZIp/wJmxKEDk6sp/yTbD+K7jEdcWsZDWNzseJ/uYTEL9DBLAqYTLgFlD
S8AipxtS
=7/Im
-----END PGP SIGNATURE-----

--KN3V09NECx4TDrFV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZiFXOzm_Lq65hePj>