Thanks, Martin! I was hoping it would be OK. Sometimes I never know what's going to break when I start messing with things.<br><br>I uninstalled postfix, installed and configured ssmtp for gmail, edited the mail group for root (requires reboot), installed mutt with no further configuration (the simple mail command doesn't handle attachments), and downloaded and installed the sarg rpm (it's not in the repos).<br>
<br>This hacky, crappy, inelegant script sends the recipient a simple email with the daily squid access report. I tested it in crontab just to make sure. The files are in zip archive for the Windows folks. They do have to unzip it and manage to open the index.html file. But if folks want to see where the kids are going on the internetz, this seems like an easy way to provide that data right in their inboxes.<br>
<br>#!/bin/bash<br>recipient=<a href="mailto:example@example.com">example@example.com</a><br>today='date +%0e-%m-%Y';<br>mkdir /root/squid<br>sarg -l /var/log/squid/access.log -o /root/squid -z -d $today<br>zip -r internetlog.zip squid/<br>
echo "This is the Internet activity log for $HOSTNAME" |mutt -a internetlog.zip -s "$HOSTNAME Internet Log" $recipient<br>#Cleanup<br>rm -rf /root/squid<br>exit<br><br>Since I know this is a crappy script, you won't hurt my feelings if you point out how awful it is.<br>
<br>Anna Schoolfield<br>Birmingham<br><br><div class="gmail_quote">On Thu, Jan 28, 2010 at 7:49 PM, Martin Langhoff <span dir="ltr"><<a href="mailto:martin.langhoff@gmail.com">martin.langhoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thu, Jan 28, 2010 at 7:35 PM, Anna <<a href="mailto:aschoolf@gmail.com">aschoolf@gmail.com</a>> wrote:<br>
> On a test XS 0.6 box, I installed ssmtp and set up Gmail as the smtp server<br>
> (which is dead simple, btw). In order to send mail, I had to uninstall<br>
> postfix, otherwise I got this error message:<br>
><br>
> postdrop: warning: unable to look up public/pickup: No such file or<br>
> directory<br>
<br>
</div>You can have them both installed, (Fedora/RedHat are very good at<br>
avoiding rpm conflicts) but I am sure that if you have them both<br>
*running* with default configs they'll conflict over port 25 and<br>
various other things.<br>
<br>
So yes, uninstallign postfix is recommended. Probably disabling it is<br>
enough (chkconfig --level 345 postfix off).<br>
<div class="im"><br>
> Is it going to break anything having uninstalled postfix or will I otherwise<br>
> run into unexpected issues? Sometimes the XS is kinda weird about stuff<br>
> like that.<br>
<br>
</div>We're weird, true. But removing postfix is ok.<br>
<br>
cheers,<br>
<br>
<br>
m<br>
<font color="#888888">--<br>
<a href="mailto:martin.langhoff@gmail.com">martin.langhoff@gmail.com</a><br>
<a href="mailto:martin@laptop.org">martin@laptop.org</a> -- School Server Architect<br>
- ask interesting questions<br>
- don't get distracted with shiny stuff - working code first<br>
- <a href="http://wiki.laptop.org/go/User:Martinlanghoff" target="_blank">http://wiki.laptop.org/go/User:Martinlanghoff</a><br>
</font></blockquote></div><br>