This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
ssmtp and cron
- From: Uwe Mayer <merkosh at hadiko dot de>
- To: cygwin at cygwin dot com
- Date: Sun, 6 Oct 2002 18:54:20 +0200
- Subject: ssmtp and cron
- Reply-to: Uwe Mayer <merkosh at hadiko dot de>
Can somebody enlighten me how ssmtp and cron work together, please?
F.e. what is the /etc/ssmtp/revaliases file for (which looks for me):
admin:merkosh@hadiko.de:smtp.hadiko.de:25
merkosh:merkosh@hadiko.de:smtp.hadiko.de:25
As far as I understood this, if mails are send *to* merkosh
ssmtp would get the destination e-mail and smtp host from this file -
right?
But calling "/usr/sbin/ssmtp merkosh" from the command line won't
work. (after supplying a dummy body)
Then to the /etc/ssmtp/ssmtp.conf file (which looks for me):
root=admin
mailhub=smtp.hadiko.de
rewriteDomain="Uwe Mayer" #or: rewriteDomain=m111.hadiko.de
hostname=m111.hadiko.de
FromLineOverride=YES
admin is the login name of the administrator. So mails to root
should be send to user "admin" and his e-mail is looked up in
/etc/ssmtp/revaliases ??
Then the "sending mails from crontabs":
My crontab contained:
SHELL=/bin/bash
MAILTO=merkosh
* * * * * /usr/bin/date
And I expected mails send to user "merkosh" (<- as in man 5 crontab)
who's e-mail is looked up from /etc/ssmtp/revaliases...?
This didn't work. I get a letter.dead file in my home folder and the
following line in /var/log/cron.log:
/usr/sbin/ssmtp: smtp server didn't accept MAIL From, replied "553 5.5.4 <root>... Domain name required for sender address root".
What works is:
* * * * * /usr/bin/date | /usr/sbin/ssmtp merkosh@hadiko.de
which is unsattisfying, because it should work without the pipe... :(
Any ideas?
Ciao
Uwe
--
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/