Writing directly to email

Jason Munro jason at stdbev.com
Wed Apr 28 21:17:22 EDT 2004


On 6:53:18 pm 04/28/04 noel at rescommunes.ca wrote:
> I was wondering if it was at all possible to pipe text form something
> like logging into an email file with out screwing things up for Cyrus.
>
> For example, say i have a crown tab that appends new mail.err data to
> the file /var/spool/imap/m/user/me/1. with just simple stdout
> redirection >>.
> And what about properly inserted mime encoded info or just completely
> rewriting an email file all together?
>
> I realize that this is maybe a bad choice of tools. But, I am curious
> about the possibility. I think it would be incredibly useful/simple
> tool for myself.

Would it not be simpler to just use a script + cron job to mail it to
yourself? For example I have a job that rsyncs a file system every 5
minutes. It appends its output to a text file (temp.log). After an hour of
this another job runs that sends me the contents of the file in a message
then blanks out temp.log for the next round with a tiny script like so:

#!/bin/sh
cat /path_to_log/temp.log | mail -s "rsync status report" me at mydomain.com
echo '' > /path_to_log/temp.log


\__ Jason Munro
 \__ jason at stdbev.com
  \__ http://hastymail.sourceforge.net/


---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list