delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/26/11:26:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 26 Apr 2002 11:33:35 -0400
From: Jason Tishler <jason AT tishler DOT net>
Subject: Re: Cron & ssmtp timeouts
In-reply-to: <5.1.0.14.2.20020426135343.00bd1c90@pophost.marble.be>
To: cygwin AT cygwin DOT com
Mail-followup-to: cygwin AT cygwin DOT com
Message-id: <20020426153335.GD1644@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.3.24i
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020426135343 DOT 00bd1c90 AT pophost DOT marble DOT be>

--Boundary_(ID_Jo5+Apcqk7HKOrtajfFf0A)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

Gerrit,

On Fri, Apr 26, 2002 at 02:03:56PM +0200, Gerrit Cap wrote:
> I have a few batch jobs that I would like to schedule using cron and have 
> the output e-mailed. For small jobs this works fine but for jobs that run 
> for a period of time no e-mail is being sent. Instead after snooping around 
> I found this error message in /var/log/cron.log:
> /usr/sbin/ssmtp: connection lost in the middle of processing, exiting.

I had similar problems.

> Any ideas how to solve this ?

Yes, if you are willing to use procmail and read the cron mail (only)
locally, see the attached patch.  I have patched my cron to deliver mail
via procmail instead of ssmtp in order to:

    o solve the above problem 
    o prevent mail servers from removing the X-Cron-Env header fields
    o remove the dependency of multiple mail hops just to send mail
      to myself

Jason

--Boundary_(ID_Jo5+Apcqk7HKOrtajfFf0A)
Content-type: text/plain; charset=us-ascii; NAME=cron.patch
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=cron.patch

--- config.h.orig	Tue Jan  8 10:22:06 2002
+++ config.h	Tue Jan  8 10:24:25 2002
@@ -41,8 +41,11 @@
 			 * (hint: MAILTO= was added for this reason).
 			 */
 
-#define MAILCMD _PATH_SENDMAIL					/*-*/
-#define MAILARGS "%s -FCronDaemon -odi -oem %s"			/*-*/
+#define MAILCMD "/usr/local/bin/procmail"
+#define MAILARGS "%s -d %s"
+
+/* #define MAILCMD _PATH_SENDMAIL					-*/
+/* #define MAILARGS "%s -FCronDaemon -odi -oem %s"			-*/
 			/* -Fx	 = set full-name of sender
 			 * -odi	 = Option Deliverymode Interactive
 			 * -oem	 = Option Errors Mailedtosender


--Boundary_(ID_Jo5+Apcqk7HKOrtajfFf0A)
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--Boundary_(ID_Jo5+Apcqk7HKOrtajfFf0A)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019