| #
d6c34d14
|
| 13-Mar-2025 |
Brooks Davis <brooks@FreeBSD.org> |
rc.d/sendmail: remove a obsolete upgrade seatbelt
This check was in place to aid the transition from sendmail pre-8.10. 8.10 was released in 2000. It's not possible to upgrade directly from such as
rc.d/sendmail: remove a obsolete upgrade seatbelt
This check was in place to aid the transition from sendmail pre-8.10. 8.10 was released in 2000. It's not possible to upgrade directly from such as system (Freebsd 3?) to FreeBSD 15 so we can drop this.
Reviewed by: gshapiro, jhb Differential Revision: https://reviews.freebsd.org/D49308
show more ...
|
| #
6b17d944
|
| 03-Dec-2024 |
Tijl Coosemans <tijl@FreeBSD.org> |
rc.d/sendmail: Fix error with some configurations
The sendmail startup script can run 4 daemons: sendmail, sendmail_submit, sendmail_outbound, and sendmail_msp_queue. Of the first 3 at most one can
rc.d/sendmail: Fix error with some configurations
The sendmail startup script can run 4 daemons: sendmail, sendmail_submit, sendmail_outbound, and sendmail_msp_queue. Of the first 3 at most one can be enabled. There's a run_rc_command call for each and the ones for sendmail and sendmail_msp_queue run unconditionally. For some rc commands this triggers warnings or errors when sendmail_enable="NO" or sendmail_msp_queue_enable="NO". Since d2e7bb630b83 these errors are propagated and the whole script fails.
Fix this by first determining which daemons are enabled, setting ${name} and ${rcvar} accordingly, and then always calling run_rc_command conditionally.
Also replace ${name}.cf with sendmail.cf because ${name} isn't always sendmail.
PR: 282585 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47757
show more ...
|
| #
d2e7bb63
|
| 21-Oct-2024 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
rc.d/sendmail: Return non-zero if the daemon fails to start or is not running
If you have a mail server that is running sendmail daemon (sendmail_enable=YES) and sendmail queue runner (sendmail_msp_
rc.d/sendmail: Return non-zero if the daemon fails to start or is not running
If you have a mail server that is running sendmail daemon (sendmail_enable=YES) and sendmail queue runner (sendmail_msp_queue=YES) and the sendmail daemon dies, /etc/rc.d/sendmail status does see the daemon is not running but returns 0 as the exit code. This prevents other programs (like puppet) from restarting sendmail to fix the issue.
Make sure that the exit code is propagated towards the end of the script if any of the sendmail services fail.
This patch does not call exit directly but instead just sets the exit status code by calling exit in a subshell. This way we do not exit the current shell in case the service script is sourced (e.g., when rc_fast_and_loose is active).
PR: 223132 MFC after: 2 weeks Reported by: pirzyk Discussed with: jilles, eugen Reviewed by: christos, gshapiro (previous version), markj Approved by: christos (mentor), markj (mentor) Differential Revision: https://reviews.freebsd.org/D46862 Co-authored-by: Jim Pirzyk <pirzyk@FreeBSD.org>
show more ...
|
| #
8751fbe3
|
| 04-Oct-2024 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
rc.d/sendmail: Fix stopping service during shutdown
The sendmail service script needs to be stopped during shutdown to ensure a clean shutdown of active SMTP connections (and writing any in memory q
rc.d/sendmail: Fix stopping service during shutdown
The sendmail service script needs to be stopped during shutdown to ensure a clean shutdown of active SMTP connections (and writing any in memory queue files).
rcorder(8) requires the rcorder block to be an uninterrupted sequence of REQUIRE, PROVIDE, BEFORE, and KEYWORD lines. Having a comment in between REQUIRE and KEYWORD makes rcorder stop parsing the block when it reaches the comment.
Fix that by moving the comment out from the rcorder block.
Reviewed by: bnovkov, christos, gshapiro, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46924
show more ...
|
| #
f99f0ee1
|
| 22-May-2024 |
Alexander Leidinger <netchild@FreeBSD.org> |
rc.d: add a service jails config to all base system services
This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic servic
rc.d: add a service jails config to all base system services
This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic service jail.
The sshd patch is important for the sshd-related functionality as described in the man-page in the service jails part.
The location of the added env vars is supposed to allow overriding them in rc.conf, and to hard-disable the use of svcj for some parts where it doesn't make sense or will not work.
Only a subset of all of the services are fully tested (I'm running this since more than a year with various services started as service jails). The untested parts should be most of the time ok, in some edge-cases more permissions are needed inside the service jail. Differential Revision: https://reviews.freebsd.org/D40371
show more ...
|
| #
d0b2dbfa
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
0696600c
|
| 17-Oct-2018 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Move the rc framework out of sbin/init into libexec/rc.
The reasons for this are forward looking to pkgbase: * /sbin/init is a special binary; try not to replace it with every package update bec
Move the rc framework out of sbin/init into libexec/rc.
The reasons for this are forward looking to pkgbase: * /sbin/init is a special binary; try not to replace it with every package update because an rc script was touched. (a follow-up commit will make init its own package) * having rc in its own place will allow more easy replacement of the rc framework with alternatives, such as openrc.
Discussed with: brd (during BSDCam), kmoore Requested by: cem, bz PR: 231522 Approved by: re (gjb)
show more ...
|
| #
1135e97b
|
| 28-Jul-2018 |
Brad Davis <brd@FreeBSD.org> |
Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from back during BSDCan.
Approved by: will (mentor) Differential Revision:
Move rc startup scripts from etc/ to sbin/init/
This keeps most startup scripts as CONFS per discussion on src-committers from back during BSDCan.
Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16466
show more ...
|
| #
64fe1b5e
|
| 06-Jun-2018 |
Brad Davis <brd@FreeBSD.org> |
Only create /var/log/sendmail.st if start sendmail.
For those of us that never use or start sendmail, it is unneeded.
Approved by: bapt (mentor)
|
| #
720046d6
|
| 12-Jun-2017 |
Gregory Neil Shapiro <gshapiro@FreeBSD.org> |
Fix 'restart' action: rc.subr only expects to restart one service, not two.
PR: 217393 Reported by: Martin Simmons MFC after: 1 week
|
| #
f2730d1d
|
| 01-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
etc: minor spelling fixes.
Mostly comments but these tend to be user-visible.
MFC after: 2 weeks
|
| #
6c1a5e83
|
| 23-Apr-2016 |
Lars Engels <lme@FreeBSD.org> |
- Add descriptions to most of the rc scripts. Those are mostly taken from their daemon's manpage and probably improved. - Consistently use "filesystem" not "file system".
Approved by: bapt, brueff
- Add descriptions to most of the rc scripts. Those are mostly taken from their daemon's manpage and probably improved. - Consistently use "filesystem" not "file system".
Approved by: bapt, brueffer Differential Revision: D452
show more ...
|
| #
ff14d523
|
| 19-Oct-2013 |
John-Mark Gurney <jmg@FreeBSD.org> |
Enable the automatic creation of a certificate (if one does not exists) and enable the usage by sendmail if sendmail is enabled. Include and document knobs to disable this feature and also set the C
Enable the automatic creation of a certificate (if one does not exists) and enable the usage by sendmail if sendmail is enabled. Include and document knobs to disable this feature and also set the Common Name of the certificate created.
As the certificate is signed w/ a discarded key, it only helps prevent Eve, but not Malory from knowing the contents of the emails.
This means that new installs (and people that use the updated freebsd.mc file) will automaticly have STARTTLS enabled allowing incoming email to be encrypted in most cases.
Reviewed by: gshapiro MFC after: 3 days Security: Yes, please.
show more ...
|
| #
da46bc05
|
| 17-Sep-2013 |
Hiroki Sato <hrs@FreeBSD.org> |
- Fix pidfile handling in sendmail_msp_queue. The pidfile was ignored and multiple instances were invoked by start/stop cycles.
- Remove redundant start_cmd rewrite.
Approved by: re (gjb) Tested
- Fix pidfile handling in sendmail_msp_queue. The pidfile was ignored and multiple instances were invoked by start/stop cycles.
- Remove redundant start_cmd rewrite.
Approved by: re (gjb) Tested by: jmg
show more ...
|
| #
8801556b
|
| 11-Sep-2012 |
David E. O'Brien <obrien@FreeBSD.org> |
Simply things so that "#REQUIRE: FILESYSTEMS" means the file systems are fully "ready to go".
'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted
Simply things so that "#REQUIRE: FILESYSTEMS" means the file systems are fully "ready to go".
'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted before starting." However, we have 'var' which is was run after 'FILESYSTEMS' and can mount /var if it already isn't mounted. Furthermore, several scripts cannot use /var until 'cleanvar' has done its thing. Thus "FILESYSTEMS" hasn't really meant all critical file systems are fully usable.
show more ...
|
| #
801c4383
|
| 14-Jan-2012 |
Doug Barton <dougb@FreeBSD.org> |
Prepare for the removal of set_rcvar() by changing the rcvar= assignments to the literal values it would have returned.
The concept of set_rcvar() was nice in theory, but the forks it creates are a
Prepare for the removal of set_rcvar() by changing the rcvar= assignments to the literal values it would have returned.
The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones.
During the discussion on freebsd-rc@ a preference was expressed for using ${name}_enable instead of the literal values. However the code portability concept doesn't really apply since there are so many other places where the literal name has to be searched for and replaced. Also, using the literal value is also a tiny bit faster than dereferencing the variables, and every little bit helps.
show more ...
|
| #
04f0f225
|
| 16-Jul-2008 |
Doug Barton <dougb@FreeBSD.org> |
Add the shutdown KEYWORD to those scripts that start persistent services to allow them to do a "clean" shutdown.
I purposely avoided making changes to network-related stuff since the system shutting
Add the shutdown KEYWORD to those scripts that start persistent services to allow them to do a "clean" shutdown.
I purposely avoided making changes to network-related stuff since the system shutting down is pretty conclusive, and there may be complicated dependencies on the network that I would rather not try to unravel.
I also skipped kerberos-related stuff for the reasons above, and because I have no way to test it.
show more ...
|
| #
e3c46a33
|
| 08-Dec-2007 |
Doug Barton <dougb@FreeBSD.org> |
Remove $NetBSD$ CVS tags. We no longer attempt to synch our rc.d files with theirs, so this information doesn't need to be in the live file. Having it in our CVS history is enough.
|
| #
2bc2025c
|
| 12-Jun-2007 |
Gregory Neil Shapiro <gshapiro@FreeBSD.org> |
Add a new rc.conf variable, sendmail_rebuild_aliases, which tells /etc/rc.d/sendmail whether or not to run newaliases if the database is missing or the aliases text file is newer than aliases.db.
In
Add a new rc.conf variable, sendmail_rebuild_aliases, which tells /etc/rc.d/sendmail whether or not to run newaliases if the database is missing or the aliases text file is newer than aliases.db.
In my opinion, the aliases file should never be automatically rebuilt. The current text form could represent a work in progress. Therefore, in FreeBSD 7.0, this new option will default to "NO". When this rc.d change is MFC'ed, it will need to remain "YES" to maintain backward compatibility.
PR: conf/86252 Approved by: re (kensmith) MFC after: 3 days
show more ...
|
| #
df19ed6a
|
| 28-Oct-2005 |
Yaroslav Tykhiy <ytykhiy@gmail.com> |
Use ${name} in pathnames where appropriate. The sendmail script already was on this way, but it didn't reach the end of it yet.
|
| #
125ffad4
|
| 30-Aug-2005 |
Gregory Neil Shapiro <gshapiro@FreeBSD.org> |
Be sure to execute sendmail_precmd() to check sendmail.cf conflicts and rebuild the aliases file if necessary.
PR: conf/72910 Submitted by: matteo@ MFC after: 3 days
|
| #
835e0fa3
|
| 16-Jan-2005 |
David E. O'Brien <obrien@FreeBSD.org> |
"REQUIRE: cleanvar" for all RC's writing into /var/run.
|
| #
337338ee
|
| 07-Oct-2004 |
Mike Makonnen <mtm@FreeBSD.org> |
Remove the requirement for the FreeBSD keyword as it no longer makes any sense.
Discussed with: dougb, brooks MFC after: 3 days
|
| #
d1fb385c
|
| 05-Aug-2004 |
Gregory Neil Shapiro <gshapiro@FreeBSD.org> |
Fix the startup logic for sendmail. If sendmail_enable=yes, don't start the submit and outbound daemon, else if sendmail_submit_enable=yes, don't start the outbound daemon. Only one daemon should b
Fix the startup logic for sendmail. If sendmail_enable=yes, don't start the submit and outbound daemon, else if sendmail_submit_enable=yes, don't start the outbound daemon. Only one daemon should be started.
Also, do not rebuild database maps at boot time. The code didn't pay attention to SENDMAIL_MAP_TYPE and assumed 'hash'. Also, admins may not want maps automatically rebuilt just because the back end database has changed. Finally, some maps are built with mode tools than just makemap (e.g., using cidrexpand on the access text file before sending it to makemap).
Noticed by: ache Reviewed by: ache
show more ...
|
| #
ca813d29
|
| 17-Apr-2004 |
Max Khon <fjoe@FreeBSD.org> |
sendmail_submit_enable and sendmail_outbound_enable checks were reverted.
Found by: Morten Rodal <morten@rodal.no>
|