Re: Logrotate and mail

2006-03-14 Thread Foote, Bruce (OFT)
Sir,

Back in 5/2002 you wrote a question on a listserve that went with out
answer.  It was as follows:

'I have a question regarding the use of logrotate.

I rotate syslog, apache/error.log, and auth.log weekly. I would like to
have
the old logs e-mailed, then compressed.
As such, I am using the 'mail' command. However, can I use mail to mail
a
log to a system user? That is, a user
specified in /etc/passwd? Furthermore, might I be able to mail a log to
an
entire group (from /etc/group)? Or can the mail
command only be used to e-mail a log to an actual e-mail address? I've
searched online without luck.

One other question regarding logrotate. Suppose I have a set of rules
for
/var/log/apache/*, followed by a rule set
for /var/log/apache/error.log. Will both be applied, ala iptables style?
(first one, then the other) Or will only one be used,
while the other is discarded? What is the default behavior in these
cases?
Thanks!'

From 'http://lists.debian.org/debian-user/2002/05/msg00193.html'

I was doing a google search on logrotate and mail with the same
question.

Do you have an answer to the question above ?  specifically ' However,
can I use mail to mail a
log to a system user? That is, a user
specified in /etc/passwd?'  Please let me know if you ever received an
answer to this.

Thanks,

Bruce J. Foote
Computer Systems Programmer1
NYS Office For Technology

This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments.  Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.



Re: Logrotate and mail

2006-03-14 Thread Benjamin A'Lee
On Tue, 2006-03-14 at 17:41 -0500, Foote, Bruce (OFT) wrote:
 However, can I use mail to mail a log to a system user? That is, a
 user specified in /etc/passwd?' 

Yes, just send it to the username:  

$ cat /var/log/syslog | mail root

You might want to look at the logcheck package, if you just want reports
of important messages.

bma

-- 
Benjamin A'Lee http://benalee.co.uk/
Technical Officer, TermiSoc http://termisoc.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Logrotate and mail

2002-05-02 Thread Adar Dembo
I have a question regarding the use of logrotate.

I rotate syslog, apache/error.log, and auth.log weekly. I would like to have
the old logs e-mailed, then compressed.
As such, I am using the 'mail' command. However, can I use mail to mail a
log to a system user? That is, a user
specified in /etc/passwd? Furthermore, might I be able to mail a log to an
entire group (from /etc/group)? Or can the mail
command only be used to e-mail a log to an actual e-mail address? I've
searched online without luck.

One other question regarding logrotate. Suppose I have a set of rules for
/var/log/apache/*, followed by a rule set
for /var/log/apache/error.log. Will both be applied, ala iptables style?
(first one, then the other) Or will only one be used,
while the other is discarded? What is the default behavior in these cases?
Thanks!

Adar Dembo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]