CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 Platforms > Check Point SecurePlatform (SPLAT)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-08-28
Junior Member
 
Join Date: 2006-12-20
Posts: 20
Rep Power: 0
Gremlin has an average reputation (10+)
Default Sending email from scripts

Hi all,

I'm looking for a way to send email alerts from scripts. I have a R61 gateway that I've set up cron jobs on it. Those cron jobs are scripts and it may be helpful if they can send email on special occasions (such us something failed). The built-in sendmail doesn’t really help (I got the syntax right but it seems like you cannot run it from cli/scripts. It just gets stuck).

Is there any way I can send emails from splat and can it be used in a script?

Any suggestion will be appreciated,
Alex.
Reply With Quote
  #2 (permalink)  
Old 2007-08-29
Senior Member
 
Join Date: 2006-04-30
Location: Europe, Germany
Posts: 159
Rep Power: 3
dsb.nepo has an average reputation (10+)
Default Re: Sending email from scripts

try this script in a test cron with adjusted parameters

Code:
#!/bin/bash
. /root/.bashrc

cat << _EOF | sendmail -s 'test script ' -t MyMail Relay -f splat@MyDomain MyMail@myDomain

this is my script output from cron

this is the env.
$env
_EOF
To feed the (internal_)sendmail with content you have to pipe it.
Reply With Quote
  #3 (permalink)  
Old 2007-09-01
Junior Member
 
Join Date: 2006-12-20
Posts: 20
Rep Power: 0
Gremlin has an average reputation (10+)
Default Re: Sending email from scripts

Thank you very much,
It works perfect.

:-)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 09:55.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0