Mailing List CGatePro@mail.stalker.com Message #101352
From: Nicolas Hatier <nicolas.hatier@niversoft.com>
Subject: Re: Perl scripting for PIPE
Date: Mon, 10 Jan 2011 23:15:45 -0500
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>
myusername@pipe ? Where does that come from? To you have special router instructions related to PIPE? Note that you don't need any specific router entry for my example to work. If you tried to configure some PIPE-specific router entries to make that work, remove or disable them.

Nicolas

On 2011-01-10 23:00, Dan Pratt wrote:
No luck. Below is what I get in the logs. 

BTW, I had a router entry of: 
<myusername@gmail.com> = execmyusername@pipe


21:45:45.001 4 ROUTER Input(Mail): <myusername@gmail.com>
21:45:45.001 5 ROUTER PARSER: '<myusername@gmail.com>' -> 'myusername' at 'gmail.com'
21:45:45.001 4 ROUTER Alias: -> 'myusername@pipe'
21:45:45.001 5 ROUTER SYSTEM: -> 'myusername@pipe'
21:45:45.001 5 ROUTER PARSER: 'myusername@pipe' -> 'execmyusername' at 'pipe'
21:45:45.001 1 ROUTER PIPE: '<myusername@gmail.com>' rejected. Error Code=External Applications Directory is not specified
21:45:45.001 1 DEQUEUER [9064558] SYSTEM()<myusername@gmail.com> failed: External Applications Directory is not specified


*************


From:	Nicolas Hatier <nicolas.hatier@niversoft.com>
Subject:	Re: Perl scripting for PIPE
Date:	Mon, 10 Jan 2011 21:53:15 -0500
To:	CommuniGate Pro Discussions <CGatePro@mail.stalker.com>

You don't absolutely need a Perl script.

All you have to do is put a message in the PIPE directory - usually /var/Communigate/Submitted
In the file, you can put a normal email message with headers, such as
To: myusername@gmail.com
From: Root
Subject: Nightly backup 

Nightly backup $NOWDATE completed

CGP will process it and send it to the To address. You can include an Envelope-To: header if you want the recipient to be something else than the To: header.

Name your file something.tmp while you're writing it, then rename it something.sub. CGP processes *.sub every 15 seconds by default. 

Nicolas


On 2011-01-10 18:16, Daniel Pratt wrote:
I have a shell script that runs every morning at 3am backing up the /var/CommuniGate directory to a second volume. Works great. New file every night date stamped correctly. At the end of the script I want it to send me an email notification to my gmail account.

So I did:

    echo "Nightly backup $NOWDATE completed" | mail -s "Nightly Backup" 
myusername@gmail.com


However, that won't work as the installer renames the /usr/bin/mail program to /usr/bin/LegacyMail.

So now my messages end up in the Submitted folder as .sub files. Researching this I need to get a Perl script for the PIPE Application Directory setting to trigger to get my simple email notification to go out.

I'm not up on Perl scripting (obviously should be). Has someone already created a script to do this?

Should I approach this differently?

Thanks.



- Dan Pratt
v5.3.10
Mac OS X (10.6.4) / MacMini SnowLeopard Server
/var/Communigate directory on Promise SmartStor DS4600 RAID Tower
#############################################################
This message is sent to you because you are subscribed to
  the mailing list 
<CGatePro@mail.stalker.com>
.
To unsubscribe, E-mail to: 
<CGatePro-off@mail.stalker.com>

To switch to the DIGEST mode, E-mail to 
<CGatePro-digest@mail.stalker.com>

To switch to the INDEX mode, E-mail to 
<CGatePro-index@mail.stalker.com>

Send administrative queries to  
<CGatePro-request@mail.stalker.com>

    

--

Nicolas Hatier, ing. <nicolas.hatier@niversoft.com>
Niversoft idées logicielles - http://www.niversoft.com

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster