Operating System - HP-UX
1752801 Members
5851 Online
108789 Solutions
New Discussion юеВ

Re: sending emails to multiple addresses in fbackup

 
Bruce Duff
Advisor

sending emails to multiple addresses in fbackup

I get a daily email via sendmail from fbackup to tell me how the previous evenings backup has performed.

Can anyone tell me how to send this notification to multiple email addresses. Does this get set in the crontab file for example.

Thanks in advance
Bruce
London Giddy London
4 REPLIES 4
Steve Steel
Honored Contributor

Re: sending emails to multiple addresses in fbackup

Hi

Do the following.

SAM adds a cron job which calls the /usr/sam/lbin/br_backup command.
Br_backup in turn calls 'mailx' to send out the email. Mailx accepts
multiple mail addresses separated by a comma. To send the email to
different users when adding a backup through SAM select 'Set Additional
Parameters' and add the user's email addresses separated by a comma.

To change the email after the backup was added edit
/var/spool/cron/crontabs/root and change the br_backup entry like in
this example :
00 17 * * 1 /usr/sam/lbin/br_backup DAT FULL Y /dev/rmt/0m
/etc/sam/br/graphDCAa04203 root@system1.com,oracle@system2.com Y
1 N > /var/tmp/SAM_br_msgs 2>&1 #sambackup


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Stefan Schulz
Honored Contributor

Re: sending emails to multiple addresses in fbackup

Hi,

you cold also set up a group in your /etc/mail/aliases file.

This would have the advantage of being reusable for several cronjobs.

E.g. you have 10 cronjobs which should send a eMail to the same group. One day this group changes. If you use an sendmail alias this is one configuration in one file.

If you configure each cronjob seperately this would make 10 seperate changes.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Sanjay_6
Honored Contributor

Re: sending emails to multiple addresses in fbackup

Hi Bruce,

These are the steps we normally follow.

1.) create an alias in /etc/mail/aliases for the users who are going to receive the mail. This is to be added under local aliases,

alias_name :mail_add_1, mail_add_2 ....

2.) Restart the sendmail daemon,

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

3.) send a test mail to the concerned users,

mailx -s "mail subject" alias_name < mail_message

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: sending emails to multiple addresses in fbackup

Hi Bruce,

you can add the mailx command in your script which is sending you the status of backup.

Hope this helps.

Regds