UNSOLVED

seesa1

updated

17 years ago

S

seesa1

1 Rookie

•

18 Posts

0

1738

February 27th, 2010 20:00

Is sendmail enabled in Avamar?

Hello,

I would like to have a couple of reports executed through a cron and have them emailed out to me.

Is sendmail an option that I can use?

Has anyone used it on the Avamar grids so far?

Any help would be appreciated.

  • 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

    #################################

  • pmusolino

    2 Posts

    641

    0

    Posted March 19th, 2010 08:00

    It is turned on.

    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.

  • rpervan

    266 Posts

    641

    0

    Posted March 29th, 2010 06:00

    Hello Seesa,

    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";

    regards,

    Rej