ssmtp and cron
Matthias Bobzien
bobzien@ikg.uni-bonn.de
Mon Jan 13 02:54:00 GMT 2003
Mark and Jason, thanks for the quick responses!
Harig, Mark A. wrote:
> You might try setting the 'MAILTO' environment
> variable in your crontab file. Please see the
> crontab(5) manual page for details about setting
> environment variables:
>
> $ man 5 crontab
>
I considered that before, sorry that I didn't mentioned it.
The header of my crontab file reads like this:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.2052 installed on Fri Jan 3 18:18:02 2003)
# (Cron version -- $Id: crontab.c,v 1.6 2001/09/19 17:09:55 corinna Exp $)
SHELL=/bin/bash
MAILTO=bobzien@ikg.uni-bonn.de
I tried
MAILTO="bobzien@ikg.uni-bonn.de"
as well, both failed.
Jason Tishler wrote:
>
> I have found that some SMTP servers do not accept mail with unqualified
> domain names. This may be your problem.
>
> In the past, I have patched cron to "send mail" via procmail. Now, I
> just use exim and configure it to accept unqualified domain names from
> localhost.
I'm not sure if I understand that correctly - can I use exim to run as a
SMTP-server on my machine? So could I change my ssmtp.conf to use my
machine as a SMTP-server and exim forwards it to the machine where my
mail is collected (a POP-server)? I'm a bit confused here. Usually I use
two servers to handle my mail: mailout.uni-bonn.de as SMTP-server for
outgoing mail and mail.ikg.uni-bonn.de as POP-server for incoming mail.
So is it possible to configure exim that way that I use it between cron
(or whatever) and the SMTP-server?
I thought the problem lies in the combination of cron and ssmtp. Both of
them work fine separately. For example the following command entered on
the command line
/usr/sbin/ssmtp.exe -fbobzien@ikg.uni-bonn.de bobzien@ikg.uni-bonn.de <
input.txt
with input.txt as an empty file sends an empty mail to myself. Putting
that line into crontab results with the errors
(can't open the smtp port (25) on mailout.uni-bonn.de..) and (unable to
connect to "mailout.uni-bonn.de" port 25..) in the event log.
Sorry for that lengthy posting but I'm a little bit lost with this problem.
Matthias
--
Matthias Bobzien
E-Mail: bobzien@ikg.uni-bonn.de
--
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/
More information about the Cygwin
mailing list