We use exchange as our smtp relay, so I edit /etc/mail/sendmail.cf and change line 101 under where it says "Smart" relay host, from DS to the DS plus the name of your mail relay server with no spaces:
# "Smart" relay host (may be null)
DSsmtp.example.com
Then restart sendmail doing 'service sendmail restart'
Just make sure your relay accepts mail from your avamar servers.
Another possibility is to involve SQL language from command line interface . I mean to build your custom sql queries, involve CRON to get reports and sent it then per mail ...
1.) to user PostgreSQL interface and connect on it .... # psql -p 5555 -U viewuser mcdb
<< snip >> root@dpn:~/#: su - admin admin@dpn:~/>: psql -p 5555 -U viewuser mcdb Welcome to psql 8.2.3, the PostgreSQL interactive terminal.
mcdb=>
Note: Please use "viewuser" (read only) account for your queries !
2.) Herre is the example for a simple SQL query, but you can build your own and export it as plain text . :))
SELECT * FROM "public"."v_clients"; SELECT v_clients.cid, v_clients.client_name, v_clients.client_addr,v_clients.os_type FROM "public"."v_clients";
forty_caliber
3 Posts
641
0
Posted March 2nd, 2010 13:00
You can use the mail command for this function.
Here is a sample script that emails the output of capacity.sh
#################################
#!/bin/bash
cd /home/admin
#
/root/capacity.sh >/home/admin/capacity.txt
mail -v -s "xxGRID01 Capacity.txt" user1@domain.com,user2@domain.com < /home/admin/capacity.txt
rm -f /home/admin/capacity.txt
#################################