Features/NoMTA

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(This feature is about making the MTA optional, not removing it)
(Owner)
Line 8: Line 8:
  
 
<!-- Include you email address that you can be reached should people want to contact you about helping with your feature, status is requested, or  technical issues need to be resolved-->
 
<!-- Include you email address that you can be reached should people want to contact you about helping with your feature, status is requested, or  technical issues need to be resolved-->
* email: maxamillion [AT] gmail.com
+
* email: maxamillion [AT] fedoraproject.org
  
 
== Current status ==
 
== Current status ==

Revision as of 17:11, 23 March 2010

Contents

No MTA

Summary

Make the MTA (i.e. /usr/sbin/sendmail) optional.

Owner

  • email: maxamillion [AT] fedoraproject.org

Current status

  • Targeted release: Fedora 13
  • Last updated: 23 March 2010
  • Percentage of completion: 90%

Working:

  • Everything as designed (Aside from messages that would normally be sent via a MTA)

Done:

  • Patch Package-x-generic-16.pngcronie to redirect messages that would be sent to a MTA to syslog in the event a MTA is not present.
    • Patch submitted in RHBZ #548843, applied to cronie-1.4.4, currently in F13.
  • Add sendmail to comps to ensure it is still installed by default, as expected
    • sendmail is listed in the base group.
    • This is for compatibility purposes and should be removed in a future release

TODO:

  • Add comment to /etc/sysconfig/crond that shows how to use syslog instead of sendmail:
# To send cron output to syslog instead of local mail, set CRONDARGS to:
#CRONDARGS="-s -m off"
  • Remove cronie's hard requirement on /usr/sbin/sendmail
  • Patch the default configuration for logwatch to not send mail, but to send messages to stdout and then verify the patch to cronie is reporting logwatch messages to syslog accordingly.
  • Verify there are no other packages that will require a patch to function without a MTA

Detailed Description

The presence of a Mail Transfer Agent (MTA) like sendmail has long been the de facto standard. But most systems that aren't mail servers do not specifically need to keep local mail queues or transfer mail to other systems. For the vast majority of users this is simply wasted resources and wasted disk space for the packages installed.

cron is the only thing in a default Fedora install that still uses local mail to report its status. The cron syslog facility exists for this purpose, and our current cron setup already uses it[1] to log some messages[2] to /var/log/cron.

This feature allows cron to optionally use syslog instead of email to report job status, thus making the presence of an MTA completely optional.

Benefit to Fedora

One less required package in the critical path, and we clear the way for removing the MTA from the default install.

Scope

Packages that may require changes:

cronie

cronie is the only package in a default Fedora install that requests the use of an MTA. If /usr/sbin/sendmail is not present, it will simply stop sending mail. Therefore, if we modify cronie to send job output to a log file, we can remove the requirement for an MTA with no loss of functionality.

Required changes:

  1. Modify cronie to send job output to the cron syslog facility if sendmail is missing
  2. Remove Requires: /usr/sbin/sendmail from Package-x-generic-16.pngcronie's spec file

crontabs

crontabs need to be examined to be sure none of them depend on local mail being sent.

logwatch

logwatch needs to be examine to see if it actually depends on cron sending email, and patched to use stdout/syslog if so.

How To Test

  1. Ensure you have cronie-1.4.4-1.fc13 or higher installed.
  2. Edit /etc/sysconfig/crond and set CRONDARGS="-s -m off"
  3. service crond restart
  4. yum remove sendmail (or whichever package is providing your /usr/sbin/sendmail)
    • This step won't work yet - cronie-1.4.4-1.fc13 still requires /usr/sbin/sendmail. Skip it for now.
  5. Verify that all output from cron jobs shows up in /var/log/cron

User Experience

Transparent to most users. System administrators or integrators who were relying on the implicit dependency on /usr/bin/sendmail may need to update their kickstart files etc. to explicitly install their chosen MTA.

Dependencies

none

Contingency Plan

Do Nothing.

Documentation

  • None

Release Notes

  • None

References

  1. /usr/bin/run-parts runs all the cron jobs in /etc/cron.{hourly,daily,weekly,monthly} - see /etc/cron.d/0hourly (which runs the jobs in /etc/cron.hourly) and /etc/anacrontab (which launches the daily/weekly/monthly jobs.)
  2. In fact, our current setup does not log the output of cron jobs to /var/log/cron - this feature would fix that.

Comments and Discussion