delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/20/05:25:16

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
Message-ID: <3E7996FF.8010009@isg.de>
Date: Thu, 20 Mar 2003 11:25:03 +0100
From: Tino Lange <tino DOT lange AT isg DOT de>
Organization: IS Innovative Software AG
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: de, en-us, en, fr
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Cc: a12 <a12 AT swipnet DOT se>
Subject: Re: Mail from cron yields error
References: <3E798C51 DOT 6CC51E AT swipnet DOT se>
In-Reply-To: <3E798C51.6CC51E@swipnet.se>

Hi!

If you use blat, then you don't have to care about the ssmtp settings, 
if you use ssmtp then you don't have to care about the blat settings. 
These are different approaches to send mail.

The MAILTO Variable inside crontab is only used by cron to invoke the 
default mailer (which might be ssmtp on a cygwin istallation) if your 
cron-job has output to stdout/stderr.

Since you're sending with blat you're missing the "-t" or "-to" to blat.exe!

Try adding -t $MAILTO

HTH
Best regards

Tino

--------------


a12 wrote:
> Hi gurus,
> 
> In the process of mailing messages using cron, I have created
> /var/cron/tabs/sysaccount:
> SHELL=/bin/sh
> # mail any output to 'sysaccount', no matter whose crontab this is
> MAILTO=sysaccount
> #
> 0 * * * * /cygdrive/h/blat/blat.exe ssmtp -f magr40 AT fake DOT se -f
> sysaccount AT rrback -server mail.fake.se -s "Subject"
> 
> However no mail is sent.
> 
> I have tested blat manually and it sends mail as expected.
> 
> /etc/ssmtp/revaliases contains comments only.
> /etc/ssmtp/ssmtp.conf contains:
> root=postmaster
> mailhub=mail.fake.se
> hostname=rrback
> 
> Windows Event Log contains the following entries:
> Source: sSMTP mail
> User:   RRBACK\sysaccount
> Computer: RRBACK
> Description: The description for Event ID (0) in Source (sSMTP
> mail) cannot be found. The local computer may not have the
> necessary registry information or message DLL files to display
> messages from a remote computer. The following information is
> part of the event: sSMTP mail: PID 856: /usr/sbin/ssmtp sent
> mail for sysaccount.
> Source: /USR/SBIN/CRON
> User:   NT AUTHORITY\SYSTEM
> Computer: RRBACK
> Description: The description for Event ID (0) in Source
> (USR/SBIN/CRON) cannot be found. The local computer may not
> have the necessary registry information or message DLL files to
> display messages from a remote computer. The following
> information is part of the event: /USR/SBIN/CRON: PID 1012:
> (sysaccount) MAIL (mailed 124 bytes of output but got status:
> 0xffffffff).
> 
> What have I missed ?


--
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/

- Raw text -


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