After cron starts a scheduled task, it always starts a [Sendmail] process solution. After each cron task, msmtp. Log always records a log of failed sending.

Source: Internet
Author: User

When a task is automatically compiled on the recently configured server, after each cron task is executed, the msmtp log file in the home root directory contains a failed log, the receiver is the user name used to execute the cron task. In fact, the cron task is output to a large number of standard devices. Therefore, Sendmail of the system wants to send the output information to the user as an email, this user does not have a mailbox, so msmtp records the log of failed sending. The process of trying to send the mail is the [Sendmail] <defunct> process, if you delete the soft link from Sendmail to msmtp, the process will become [cron] <defunct>.

Therefore, the solution to this problem is to direct the cron task output to an empty device: 1>/dev/null 2> & 1

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.