Using ssmtp called in a script called by a crontab entry...
Hello, I have a need for ssmtp to send out a *job completed* email from within a script that is called as an entry in a cron table. I've read all I can from the *Installing and configuring ssmtp* man pages as well as the Knowledgebase and FAQ's on the cygwin site. From what I gather it should be possible to do this. Admittedly, I am not even close to an expert with sendmail. However, as sendmail is included on my UNIX/linux boxes, I'm stymied on how to get the same functionality out of ssmtp on cygwin. I've run ssmtp-config and accepted the defaults where indicated. However, when I type *mail* at the command prompt I get *command could not be found*. All of my single line scripts from linux for simply mailing completion and initilization of processes don't work. I'm getting very confused with the esoteric discussion of ssmtp, it's configuration and getting it to work with something called mutt (?). All I need is a simple, line by line checklist of things to do to emulate the functionality of sendmail as I described above. Briefly, the scenario is a cron table entry that calls a script. The script runs a few scp's and then exits. I want it to then send out a *completion* email and exit. Your time and consideration is appreciated and valued. Blaine Miller -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Using ssmtp called in a script called by a crontab entry...
- Original Message - From: Blaine Miller To: cygwin Sent: Friday, August 20, 2010 17:51 | Hello, | | I have a need for ssmtp to send out a *job completed* email from within | a script that is called as an entry in a cron table. I've read all I can | from the *Installing and configuring ssmtp* man pages as well as the | Knowledgebase and FAQ's on the cygwin site. From what I gather it should | be possible to do this. Seen from the cron point of view, if the cron job produces any output on stdout or stderr, the output will be placed in an e-mail sent to you (you can configure the address in the MAILTO variable). As as recall, the ssmtp-config script will ask you if you want sendmail to point to ssmtp. If you answer yes, cron will use ssmtp to send the e-mail. Pierre -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Using ssmtp called in a script called by a crontab entry...
Pierre, First of all, let me thank you for your very quick response. I believe we're getting closer. when I execute: */usr/sbin/ssmtp blaine.mil...@smithmicro.com* I get this for a response... ssmtp: Cannot open exchange.smsi.com:25 I would guess that either I've got the wrong mailhub name, the wrong port, both are wrong or the mailhub doesn't allow forwarding??? I won't be able to check with the person who runs our mail system until next Wednesday, the 25th. I'd like to check in with you then just to see if it all works once I have the kinks ironed out. Thanks for your time, patience and speedy responses... Blaine Pierre A. Humblet wrote: - Original Message - From: Blaine Miller To: cygwin Sent: Friday, August 20, 2010 17:51 | Hello, | | I have a need for ssmtp to send out a *job completed* email from within | a script that is called as an entry in a cron table. I've read all I can | from the *Installing and configuring ssmtp* man pages as well as the | Knowledgebase and FAQ's on the cygwin site. From what I gather it should | be possible to do this. Seen from the cron point of view, if the cron job produces any output on stdout or stderr, the output will be placed in an e-mail sent to you (you can configure the address in the MAILTO variable). As as recall, the ssmtp-config script will ask you if you want sendmail to point to ssmtp. If you answer yes, cron will use ssmtp to send the e-mail. Pierre -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Using ssmtp called in a script called by a crontab entry...
Blaine Miller wrote: [snip] I've run ssmtp-config and accepted the defaults where indicated. However, when I type *mail* at the command prompt I get *command could not be found*. There is no mail on the package ssmtp. Try first 'man ssmtp' and see if the description is enough to do what you want, typically something like 'ssmtp my_recipi...@my_domain.com -f my_addr...@my_domain.com EOF Subject: This is a test This is the message contents. EOF' is enough. I you want something more complicated then perhaps you need to install email. -- René Berber -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple