[WBEL-users] setting mail to relay

Nerdskool nerd.skool at wdc.zapto.org
Tue Mar 22 07:59:20 CST 2005


I apologize if this post shows up more than once... I forgot which email 
address I used to subscribe to this list.


Anywho, you need to convert the attachment.  I use uuencode for this and 
pipe it to the mail command, but you can use mutt to send your report as 
a MIME attachment as well.  You can create a shell script & drop it into 
cron.daily or wherever you like (see example below... season to taste):


#!/bin/bash
/usr/sbin/tripwire -m c > /etc/tripwire/report.txt
uuencode /etc/tripwire/report.txt /etc/tripwire/report.txt | mail 
me at mail.com -s "Web Report"
rm -rf /etc/tripwire/report.txt



If you prefer a MIME attachment, use something like this (make sure you 
install mutt first):

#!/bin/bash
/usr/sbin/tripwire -m c > /etc/tripwire/report.txt
mutt -s "Web Report" -a /etc/tripwire/report.txt me at email.com
rm -rf /etc/tripwire/report.txt



Use this site for reference (other options, etc):

http://www.shelldorado.com/articles/mailattachments.html


       Regards,

       Sean



Vic wrote:

>>0 2 * * * /usr/sbin/tripwire -m c > /etc/tripwire/report.txt | mail -s
>>"Web Report" me at email.com
>>    
>>
>
>I think you need to tee that to get two "destinations" for your report :
>
>0 2 * * * /usr/sbin/tripwire -m c | tee /etc/tripwire/report.txt | mail -s
>"Web Report" me at email.com
>
>N.B. I haven't tested this!
>
>HTH
>
>Vic.
>
>_______________________________________________
>Whitebox-users mailing list
>Whitebox-users at beau.org
>http://beau.org/mailman/listinfo/whitebox-users
>  
>


More information about the Whitebox-users mailing list