SLUG Mailing List Archives
Re: [SLUG] E-mail logs.
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] E-mail logs.
- From: Robert Thorsby <robert@xxxxxxxxxxxxxx>
- Date: Tue, 22 Aug 2006 13:23:27 +1000
- Reply-to: robert@xxxxxxxxxxxxxx
On 2006.08.22 12:07 Peter Hodder wrote:
I'm in the process of setting up a IPCOP server for a
youth cafe. I was wondering if there is a easy way to
be able to e-mail the raw log files from squid to myself
and some other people so I can look at the log files daily.
And if someone could send me some info on getting
cron to rotate the squid log files daily that would be
great as well.
When I last looked at IPCop the developers had steadfastly refused to
provide an SMTP client (it's against their religion or something) and
they had aliased "mail" to /dev/null or "true" or whatever.
The easiest way to overcome these problems is to compile on another
machine, and then install on the IPCop firewall, a small standalone
SMTP client (ie, one that only sends a message from stdin off to a
"proper" mailserver). There are a multitude of such apps -- nbsmtp,
smtpclient and msmtp spring to mind. Either nbsmtp or smtpclient (I
forget which) strips to about 12K if space is a problem for you. Msmtp
has the advantage that you can include all sorts of additional headers
as part of the message -- if everything down to the first blank line in
the "body" is actually a header them msmtp will treat them as such. I
use msmtp as a "poor man's mailman" with a very small mailing list.
Basically, all these applets do the same thing -- take input from stdin
(or, usually, a pipe) and send it off in accordance with command line
arguments. But they all require an upstream/downstream mail host (ie,
mail.myisp.com.au or mail.mylan) that they can hand off the email to.
This host then does the real sending.
I suggest you install a couple of these client apps onto your
workstation and then play around with sending emails from the command
line. It's very easy to use them in shell scripts.