Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Gwenael on July 13, 2001, 03:01:44 PM

Title: How to send mail report via mail
Post by: Gwenael on July 13, 2001, 03:01:44 PM
I want to schedule a task to send to an administrator the different qmail log (formated in the Web interface) via email. Bcse the esmith server have no contact with our network.

I need a script to write the report to a text file ( > report1.txt).

Anyone have a similar script?

Thanks,

Regards
Title: Re: How to send mail report via mail
Post by: Tim Haynes on July 13, 2001, 04:52:56 PM
I do a similar thing,

1. pipe all the info you require into a text file
2. run a cron job with command:
more textfile | mail joe@bloggs.com -s 'Subject line'

hope this helps.
Title: Re: How to send mail report via mail
Post by: Gwenael on July 13, 2001, 04:59:32 PM
Thks but it's the first part I need:
I need a script with the command "/bin/zoverall" (for example, a function of mail log analyses) to create a text file.

Thks,

Gwenael
Title: Re: How to send mail report via mail
Post by: Graeme Robinson on July 13, 2001, 05:22:40 PM
Thinking about the problem differently, why can't you  ssh in the network remotely with port forwarding as per the howto and access the console manager that way?  I do this with a client of mine and it works passably well, even though they only have a modem connection