Mail Archives: cygwin/2002/10/06/15:36:02
Hi,
How about starting over... backup your config files first with an extension
like .bak.
1. run /usr/bin/ssmtp-config
[root AT w3:~] # ssmtp-config
Please enter the full qualified hostname (foo.bar.baz) of your box:
haringayyouth-2.dsl.easynet.co.uk
Please enter the "mail name" of your system. This is the hostname
portion of the address to be shown on outgoing news and mail messages.
The default is haringayyouth-2.dsl.easynet.co.uk, your system's host
name.
Mail name [haringayyouth-2.dsl.easynet.co.uk]:
Please enter the full qualified hostname of your mail hub: localhost
Please enter the smtp port number [25]:
Please check the configuration file /etc/ssmtp/ssmtp.conf for
correctness.
2. edit your /etc/ssmtp/revaliases file to look something along these lines
[root AT w3:/etc/ssmtp] # cat revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login AT your DOT domain:mailhub.your.domain:[port]
# where [port] is an optional port number that defaults to 25.
root:emcb_exposure AT hotmail DOT com:localhost:25
admin:ops AT exposure DOT org DOT uk:localhost:25
elfyn:home AT elfyn-local DOT net:localhost:25
3. edit your crontab(s)...
[root AT w3:/etc/ssmtp] # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.816 installed on Sun Oct 6 20:31:50 2002)
# (Cron version -- $Id: crontab.c,v 1.6 2001/09/19 17:09:55 corinna Exp
$)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
SHELL=/bin/sh
MAILTO=root
* * * * * /usr/bin/date
* * * * * /lost/bin/cleanroot.sh
WHAT HAPPENS, you ask...
When the cron daemon see's the MAILTO envvar it knows to send all output
from your tab to that local user, in this case root which was defined in my
revaliases file. So all mail for local user root will goto
emcb_exposure AT hotmail DOT com... This is done via ssmtp.
Remember, when your setting up to use your own hosts.
Elfyn
----- Original Message -----
From: "Uwe Mayer" <merkosh AT hadiko DOT de>
To: <cygwin AT cygwin DOT com>
Sent: Sunday, October 06, 2002 5:54 PM
Subject: ssmtp and cron
> 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 AT hadiko DOT de:smtp.hadiko.de:25
> merkosh:merkosh AT hadiko DOT 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 AT hadiko DOT 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/
>
--
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 -