Juche, > In one of your bacula servers, we need a set of jobs to send 2 kind of emails > for every job. The only > difference between mails os the subject. The differences are on the arguments > given to the "mailcommand" > entry, as we need one of the mails to have one kind of internal code for > automatic processing, and the other > mail having a normal combination of % parameters. How can I achieve this? Is > this possible? Why not write a wrapper script that you place into the Mailcommand Directive of the Messages Resource like:
Messages { mailcommand = "/bin/bash -c 'wrapper \"%j\" \"%r\" \"%d\" \"%e\"' " ... } Placve as much % Placeholder into that section as you need. You can access those from inside your script by using $1 $2 ... $x. But I assume that you know this. In the script the most important part will be that you redirect STDIN into a Variable that you can use for sending the mails: #!/bin/bash mail="$(cat)" echo "$mail" | /usr/sbin/bsmtp \ -h localhost -f "Bacula Backup $1 <$...@usw.at>" \ -s "Bacula: $2 $3 of $4 $5" echo "$mail" | /usr/sbin/bsmtp \ -h localhost -f "Bacula Backup $1 <$...@usw.at>" \ -s "My internal ID: $5" This way you can send as many emails as you like, you can eaven pipe $mail throug AWK first to change the content of the mail or play around with it. If you find a solution for your Problem please let us know, so that we can learn from your genius solutions. Hannes ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users