Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-31 Thread Arun Khan
On Wed, Aug 31, 2016 at 8:59 AM, Alexander Farber
 wrote:
> You should have provided more info initially.
>
> "goes out in text format" might mean several things.
>

I don't know what you mean by "several things"

In the context of logwatch the only options are HTML or TEXT.  Please see my OP.

Thanks for your assistance.

-- Arun Khan
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-31 Thread Alexander Farber
You should have provided more info initially.

"goes out in text format" might mean several things.

On Wed, Aug 31, 2016 at 5:31 PM, Arun Khan  wrote:

> On Wed, Aug 31, 2016 at 7:58 AM, Alexander Farber
>  wrote:
> > logwatch is run as cronjob.
>
> Let's take cron out of the picture.  Invoking logwatch from an
> interactive shell -- no joy.  The report still goes out in text
> format.
>
> -- Arun Khan
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-31 Thread Arun Khan
On Wed, Aug 31, 2016 at 7:58 AM, Alexander Farber
 wrote:
> logwatch is run as cronjob.

Let's take cron out of the picture.  Invoking logwatch from an
interactive shell -- no joy.  The report still goes out in text
format.

-- Arun Khan
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-31 Thread Alexander Farber
logwatch is run as cronjob.

On Wed, Aug 31, 2016 at 4:11 PM, Arun Khan  wrote:

> On Mon, Aug 29, 2016 at 10:24 PM, Alexander Farber
>  wrote:
> > No, I mean there is sometimes a variable for mail format too:
>
> The HTML formatting is a logwatch option, invoked through the
> logwatch.conf file.
>
> -- Arun Khan
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-31 Thread Arun Khan
On Mon, Aug 29, 2016 at 10:24 PM, Alexander Farber
 wrote:
> No, I mean there is sometimes a variable for mail format too:

The HTML formatting is a logwatch option, invoked through the
logwatch.conf file.

-- Arun Khan
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-29 Thread Alexander Farber
No, I mean there is sometimes a variable for mail format too:

# crontab -l
CONTENT_TYPE="text/plain; charset=utf-8"
MAILFROM=webmas...@xxx.de
MAILTO=alexander.far...@xxx.com
LANG=en_US.UTF-8
PGHOST=/tmp
#minute hourmdaymonth   wdaycommand


On Tue, Aug 30, 2016 at 3:37 AM, Arun Khan  wrote:

> On Sun, Aug 28, 2016 at 10:56 PM, Alexander Farber
>  wrote:
> > Maybe the format is set in
> >
> > sudo crontab -l
>
> You mean in the way it is invoked from the cron entry?
>
>
>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-29 Thread Arun Khan
On Sun, Aug 28, 2016 at 10:56 PM, Alexander Farber
 wrote:
> Maybe the format is set in
>
> sudo crontab -l

You mean in the way it is invoked from the cron entry?

-- Arun Khan
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-28 Thread Alexander Farber
Maybe the format is set in

sudo crontab -l

Am Montag, 29. August 2016 schrieb Arun Khan :

> CentOS 6 (amd64) up to date with latest security / bug fixes.
>
> The logwatch reports come in plain text even though the config states HTML.
>
> 
> mailer = "/usr/sbin/sendmail -t"
> TmpDir = /tmp
> MailFrom = logwa...@example.com 
> MailTo = admin1 admin2 admin3
> Range = yesterday
> Detail = Medium
> HostName = www.example.com
> Print = No
> Output = mail
> Format = html
> 
>
> The same settings in Debian/Ubuntu servers send the reports in HTML format.
>
> In my search, I did not come across any solution for CentOS 6.
>
> Any ideas on how to get logwatch to generate HTML reports?
>
> Thanks for your help.
>
> -- Arun Khan
> ___
> CentOS mailing list
> CentOS@centos.org 
> https://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] CentOS 6 - logwatch report not in HTML format

2016-08-28 Thread Arun Khan
CentOS 6 (amd64) up to date with latest security / bug fixes.

The logwatch reports come in plain text even though the config states HTML.


mailer = "/usr/sbin/sendmail -t"
TmpDir = /tmp
MailFrom = logwa...@example.com
MailTo = admin1 admin2 admin3
Range = yesterday
Detail = Medium
HostName = www.example.com
Print = No
Output = mail
Format = html


The same settings in Debian/Ubuntu servers send the reports in HTML format.

In my search, I did not come across any solution for CentOS 6.

Any ideas on how to get logwatch to generate HTML reports?

Thanks for your help.

-- Arun Khan
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 Logwatch 7.3.6 behaviour

2015-09-21 Thread James B. Byrne
On Sat, September 19, 2015 06:51, Tony Mountifield wrote:
> In article
> ,
James B. Byrne  wrote:
>> After some experimenting I have observed that overriding settings from
>> /usr/share/logwatch/default.conf/logwatch.conf in
>> /etc/logwatch/conf/logwatch.conf does not produce consistent
>> results.
>> For example, if I replace the default detail configuration in
>> etc/logwatch/conf/logwatch.conf with:
>> Detail = High
>> It does indeed change the level of detail from the default Low set in
>> /usr/share/logwatch/default.conf/logwatch.conf.
>> However, if I comment out the line:
>> #Service = "-zz-sys" # Prevents execution of zz-sys service
in the overridden file then the fact that this line remains in the
default.conf version means that the sservice cannot be enabled to
run
>> by default without editing
>> /usr/share/logwatch/default.conf/logwatch.conf.  Of course doing that
>> means that any update clobbers the local changes.
> Can you just add it back in /etc/logwatch/conf/logwatch.conf with:
Service = "zz-sys"
> I haven't tried it, but it looks like Service lines are cumulative.


/usr/sbin/logwatch --range 'today' --mailto supp...@harte-lyne.ca
--service zz-runtime --service All
Wrong configuration entry for "Service", if "All" selected, only "-"
items are allowed


As shown above, if you pass '--service All' then any later '--service
X' option must be prefaced with a '-' ('--service -X').  In other
words, once All is selected then one can only remove selected
services.  In the config files this is the order used:

# The 'Service' option expects either the name of a filter
# (in /usr/share/logwatch/scripts/services/*) or 'All'.
# The default service(s) to report on.  This should be left as All for
# most people.
Service = All
# You can also disable certain services (when specifying all)
Service = "-zz-network" # Prevents execution of zz-network
service, which
# prints useful network configuration
info.
Service = "-zz-sys" # Prevents execution of zz-sys service, which
# prints useful system configuration info.
Service = "-eximstats"  # Prevents execution of eximstats service,
which
# is a wrapper for the eximstats program.

So, no, one cannot restore a service that is deleted from the run in
default.conf by adding it back to the local config file.

I can understand what is happening here.  The implementation of user
config files is conceived as being additive to the default
configuration.  Anything not specified in
/etc/logwatch/conf/logwatch.conf is picked up from
/usr/share/logwatch/default.conf/logwatch.conf.  Anything in
/usr/share/logwatch/default.conf/logwatch.conf is overridden by any
similar entry in an earlier config.

This implies that the order of processing is:

/etc/logwatch/conf/logwatch.conf
/usr/share/logwatch/dist.conf
/usr/share/logwatch/default.conf/logwatch.conf

This seems to be something that needs to be fixed in the
default.conf/logwatch.conf file.

-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3




___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 Logwatch 7.3.6 behaviour

2015-09-19 Thread Tony Mountifield
In article ,
James B. Byrne  wrote:
> After some experimenting I have observed that overriding settings from
> /usr/share/logwatch/default.conf/logwatch.conf in
> /etc/logwatch/conf/logwatch.conf does not produce consistent results.
> 
> 
> For example, if I replace the default detail configuration in
> etc/logwatch/conf/logwatch.conf with:
> 
> Detail = High
> 
> It does indeed change the level of detail from the default Low set in
> /usr/share/logwatch/default.conf/logwatch.conf.
> 
> However, if I comment out the line:
> 
> #Service = "-zz-sys" # Prevents execution of zz-sys service
> 
> in the overridden file then the fact that this line remains in the
> default.conf version means that the sservice cannot be enabled to run
> by default without editing
> /usr/share/logwatch/default.conf/logwatch.conf.  Of course doing that
> means that any update clobbers the local changes.

Can you just add it back in /etc/logwatch/conf/logwatch.conf with:

Service = "zz-sys"

I haven't tried it, but it looks like Service lines are cumulative.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] CentOS-6 Logwatch 7.3.6 behaviour

2015-09-18 Thread James B. Byrne
After some experimenting I have observed that overriding settings from
/usr/share/logwatch/default.conf/logwatch.conf in
/etc/logwatch/conf/logwatch.conf does not produce consistent results.


For example, if I replace the default detail configuration in
etc/logwatch/conf/logwatch.conf with:

Detail = High

It does indeed change the level of detail from the default Low set in
/usr/share/logwatch/default.conf/logwatch.conf.

However, if I comment out the line:

#Service = "-zz-sys" # Prevents execution of zz-sys service

in the overridden file then the fact that this line remains in the
default.conf version means that the sservice cannot be enabled to run
by default without editing
/usr/share/logwatch/default.conf/logwatch.conf.  Of course doing that
means that any update clobbers the local changes.

I am not sure if this a bug or a design feature but it seems to me
that on should be able to override all of the default settings for
services.

The only way around this seems to be to specify '--service All' on the
command line.  But then the service entries in logwatch.conf seem to
be ignored entirely so that one must also specify the service
exclusions on the command line.

I also ran across a rather bizarre 'feature' with the 'DisplayOrder'
setting.  Evidently, if one gives the same DisplayOrder value to two
or more services (say zz-sys which has DisplayOrder = 0.4 and
zz-runtime which uses the default value of 0.5 otherwise) then only
the last service (ordered alphabetically) is reported.  No errors are
logged or conflict notices are given either.  The other service
reports just 'disappear'.  However, one can explicitly assign multiple
services a DisplayOrder value of 0.5 and all are reported nonetheless,
in alphabetic order, along with the other services which simply take
the implicit default value.

-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] CentOS-6 - LogWatch Cyrus-IMAPD script was CentOS-6 - LogWatch

2015-09-17 Thread James B. Byrne

On Mon, September 14, 2015 14:51, James B. Byrne wrote:
> The Logwatch imapd service script distributed with CentOS-6 does not
> generate anything when I run logwatch --service all on a cyrus-imapd
> host.  Is this expected behaviour?  Is there a separate script for
> cyrus-imapd or are their configuration options required to get the
> existing script to work.
>
> I have found an ancient (2004) logwatch service script for cyrus-imapd
> but I was sort of hoping that there was a more up-to-date and
> officially supported version available somewhere.
>
> Is there?
>
>

There was not, and so I wrote this.  Given I know little or nothing of
Perl beyond the bare fact of its existence no doubt there are better
ways to get the results I obtained.  But this is tested on CentOS-6
with
cyrus-imapd.2.3.16-13.el6_6,

It only handles IMAP logins so anyone using POP3 or Sieve needs to add
there own code for those.  And, because this is e-mail,
linewraps/breaks in the code below may not be exactly as required and
do need to be hand checked and corrected.


#!/usr/bin/perl
###
# logwatch script for cyrus-imapd-2.3.16
# looks for imaps and lmtpunix services in /var/log/maillog
###

###
# script: /etc/logwatch/scripts/services/cyrus-imapd
# author: James B. Byrne 
#   date: 2015-09-16
#   revision: v1.0.1 - 2015-09-17
#
#   requires: /etc/logwatch/conf/services/cyrus-imapd.conf
# containing>
#
# > Title = "CYRUS IMAPD"
# > LogFile = maillog
# > *OnlyService = (imaps|lmtpunix)
# > *RemoveHeaders =
#
#  based on Sebastian Hagedorn  2004
###

$Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'};

#
#  Process log file on stdin
#

while ( defined( $ThisLine =  ) ) {
  chomp( $ThisLine );

use feature "switch";

  given( $ThisLine ) {

when ( /accepted connection/ ) {
  # Ignore
}

when ( /^badlogin: (.+) \[(.+)\] (\w+) (.+) (SASL.*authentication
failure:.+)/ ) {
  #print( "Bad Login: " . $ThisLine . "\n" );
  #$ThisLine =~ /^badlogin: (.+) \[(.+)\] (\w+) (.+)
(SASL.*authentication failure:.+)/;
  #print( "BAD LOGIN PARSE: " . $1 . " : " . $2 . " : " . $3 . " :
" . $4 . " : " . $5 . "\n");
  $IMAPbadlogin++;
  $IMAPbadmech{$3}++;
  $IMAPbadip{$2}++;
  $IMAPbaduser{$4}++
}

when ( /DBMSG:/ ) {
  # Ignore
}

when ( /Delivered:/ ) {
  # Ignore
}

when ( /dupelim:/ ) {
  # Ignore
}

when ( /duplicate_check:/ ) {
  # Ignore
}

when ( /duplicate_mark:/ ) {
  # Ignore
}

when ( /executed/ ) {
  # Ignore
}

when ( /Expunged/ ) {
  # Ignore
}

when ( /imapd:Loading hard-coded DH parameters/ ) {
  # Ignore
}

when ( /lmtp connection preauth/ ) {
  # Ignore
}

when ( /^login: (.+) \[(.+)\] (\w+) (.+) User logged in/ ) {
#  print( "LOGIN PARSE: " . $1 . " : " . $2 . " : " . $3 . " : " .
$4 . "\n");
  $IMAPlogin++;
  $IMAPmech{$4}++;
  $IMAPuser{$3}++;
  $IMAPip{$2}++;
}

when ( /IOERROR: fstating sieve script/ ) {
  # Ignore
}

when ( /mystore: committing txn/ ) {
  $LMTPStore++;
}

when ( /mystore: starting/ ) {
  # Ignore
}

when ( /open: / ) {
  # Ignore
}

when ( /seen_db: / ) {
  # Ignore
}

when ( /skiplist: checkpointed/ ) {
  # Ignore
}

when ( /SQUAT/ ) {
  # ignore
}

when ( /SSL_accept/ ) {
  # ignore
}

when ( /starttls/ ) {
$IMAPTLS++;
}

# Save this till the end
when ( /ERROR/ ) {
  push @ErrorList, "$ThisLine\n";
}

default {
  # Report any unmatched entries...
  push @OtherList, "$ThisLine\n";
}
  }

  # Process next stdin
  next;
}


# Report


if ( $LMTPStore ) {
print "   Mails stored: " . $LMTPStore . "\n";
}


if ( $IMAPlogin ) {
print "\n   IMAP:\n";
print " Number of logins: " . $IMAPlogin . "\n";
  if ( %IMAPmech ) {
print( "\n   By mechanism\n" );
  }
foreach $mech ( sort ( keys %IMAPmech ) ) {
  print( "   . . . using " . $mech . ": " . "$IMAPmech{$mech}\n" );
  }
  if ( %IMAPuser ) {
print( "\n   By user\n" );
  }
  foreach $user ( sort ( keys %IMAPuser ) ) {
print( "   . . . from " . $user . ": " . $IMAPuser{$user} .
"\n" );
  }
  if ( %IMAPip ) {
print( "\n   By origin\n" );
  }
  foreach $addr ( sort ( keys %IMAPip ) ) {
print( "   . . . from " . $addr . ": " . $IMAPip{$addr} . "\n" );
  }

  if ( $IMAPbadlogin ) {
  print "\n Number of failed logins: " . $IMAPbadlogin . "\n";
  if ( %IMAPbaduser ) {
print( "\n   By user\n" );
  }
foreach $user ( sort ( keys %IMAPbaduser ) ) {
   

Re: [CentOS] CentOS-6 - LogWatch

2015-09-15 Thread Always Learning

On Tue, 2015-09-15 at 10:28 -0400, James B. Byrne wrote:


> Does anyone know of a current Logwatch script for cyrus-imapd? And
> where it can be obtained?

Tampering with an existing Logwatch script may seem daunting but, as I
have no Perl skills, it was relative easy to produced a more useful
display. Note the amended script should be placed
in /etc/logwatch/scripts/services/your-choice-of-file-name

(1)  If your cyrus-imap is similar to the Exim script, there are 2 main
parts:-

(a)  identifying the information and accumulating it; and

(b)  printing the data.


(2)  In the standard Exim script I located lines like:-

> elsif ( $ThisLine =~ /[Rr]ecipient verify fail/)
{$RecipVerify{$ThisLine}++;}

> elsif ( $ThisLine =~ /[Ss]ender verify fail/ )
{$SendVerify{$ThisLine}++;}

and inserted my own tests like these (I was testing on error messages I
created which were prefixed with a self-chosen code)


elsif ($ThisLine =~ /A02\]/)
{ $a02++;
  $temp1 = substr($ThisLine,0,20).": ";# date

  $temp2 = index($ThisLine," H="); # sender's host
  $temp2+= 3;
  $temp2 = substr($ThisLine,$temp2);

  $temp3 = index($temp2,":");
  $temp1 = $temp1 . substr($temp2,0,$temp3);

  @a02   = (@a02, $temp1."\n");
  $temp1 = '';
  $temp2 = '';
  $temp3 = '';
}


The Perl seems similar to PHP. $a = a variable; @a = an array

The second main part prints the data. In the original Exim script it
looks like this


> if ( %SmtpConnection ) {
>  print "\n--- SMTP Connection Issues \n";
>  foreach $ThisOne (keys %SmtpConnection) {
> $bb = $SmtpConnection{$ThisOne};
> print "  $ThisOne: $bb Time(s)\n";
>  }
>   }

My inserted coding is this ...

if(@c01) {print "\n--- C01 : Spam rejected = $c01\n @c01";}
if(@c02) {print "\n--- C02 : Senders denied = $c02\n";}

The first line prints a heading and a total, new line and then lists the
examples. The second line prints only a heading and a total.

If your script is similar to the standard Exim script then it should be
possible to, using the log file for guidance, to construct your own
script.

You can ignore unwanted log file lines by testing like this ...

> elsif ($ThisLine =~ /xxx/) {}


-- 
Regards,

Paul.
England, EU.  England's place is in the European Union.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 - LogWatch

2015-09-15 Thread James B. Byrne

On Mon, September 14, 2015 21:28, Always Learning wrote:
>
> On Mon, 2015-09-14 at 14:51 -0400, James B. Byrne wrote:
>
>> The Logwatch imapd service script distributed with CentOS-6 does not
>> generate anything when I run logwatch --service all on a cyrus-imapd
>> host.  Is this expected behaviour?  Is there a separate script for
>> cyrus-imapd or are their configuration options required to get the
>> existing script to work.
>
> 1. Check there is data in the log file(s).

Yes.  We have cyrus-imapd logging to /var/log/maillog.  This appears
to be the default setting as I can find no explicit reference to
maillog in either /etc/imapd.conf or /etc/cyrus.conf and none to imapd
in /etc/rsyslog.conf.

>
> 2. Ensure Logwatch has the correct location and names of your log
> files.
>
> Check:  /usr/share/logwatch/default.conf/logfiles/ - there should be a
> 'imapd' file there. I don't use imapd and there is no such file on my
> instances of C6.

I do not have one either.

yum provides /usr/share/logwatch/default.conf/logfiles/imapd.conf
Loaded plugins: etckeeper, fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: centos.mirror.rafal.ca
 * epel: mirror.steadfast.net
 * extras: less.cogeco.net
 * updates: mirror.netflash.net
No Matches found

The Logwatch related files that reference imapd are these:

find /usr/share/logwatch -type f | xargs grep -l imapd
/usr/share/logwatch/default.conf/services/imapd.conf
/usr/share/logwatch/default.conf/services/secure.conf
/usr/share/logwatch/scripts/services/secure
/usr/share/logwatch/scripts/services/cron
/usr/share/logwatch/scripts/services/courier
/usr/share/logwatch/scripts/services/imapd


Maillog is referenced in
/usr/share/logwatch/default.conf/services/imapd.conf:

cat /usr/share/logwatch/default.conf/services/imapd.conf
###
#

###

# You can put comments anywhere you want to.  They are effective for the
# rest of the line.

# this is in the format of  = .  Whitespace at the beginning
# and end of the lines is removed.  Whitespace before and after the =
sign
# is removed.  Everything is case *insensitive*.

# Yes = True  = On  = 1
# No  = False = Off = 0

Title = "IMAP"

# Which logfile group...
LogFile = maillog

# Only give lines pertaining to courier...
# I'm not sure if this is complete, especially for the new webmail
daemon in 0.44.1
#but you will get at least all currently supported logs
*OnlyService = (imapd|imapd-ssl|imapsd)

*RemoveHeaders =

# vi: shiftwidth=3 tabstop=3 et


The only executable(sic) script available in
/usr/share/logwatch/scripts/services/ referred to in
/usr/share/logwatch/default.conf/services/imapd.conf is imapd and that
script is specifically tailored to courier-imap.  Which is likely the
reason that it reports nothing.

Which brings me back to my original question.  Where can one find a
current Logwatch script for cyrus-imap log analysis?  The cyrus-imapd
specific logwatch script that I have found and have placed into
/etc/logwatch/scripts/services/imapd is old and has errors.  I can
probably fix the errors but my Perl skills are inadequate to do
anything more.

Does anyone know of a current Logwatch script for cyrus-imapd? And
where it can be obtained?


-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 - LogWatch

2015-09-14 Thread Always Learning

On Mon, 2015-09-14 at 14:51 -0400, James B. Byrne wrote:

> The Logwatch imapd service script distributed with CentOS-6 does not
> generate anything when I run logwatch --service all on a cyrus-imapd
> host.  Is this expected behaviour?  Is there a separate script for
> cyrus-imapd or are their configuration options required to get the
> existing script to work.

1. Check there is data in the log file(s).

2. Ensure Logwatch has the correct location and names of your log files.

Check:  /usr/share/logwatch/default.conf/logfiles/ - there should be a
'imapd' file there. I don't use imapd and there is no such file on my
instances of C6.

Using my /usr/share/logwatch/default.conf/logfiles/exim.conf as an
example (I don't use any of these entries):-

> # Which logfile group...
> LogFile = exim/main.log
> LogFile = exim/mainlog
> LogFile = exim4/mainlog
> Archive = exim/main.log.*
> Archive = archiv/exim/main.log.*
> Archive = exim/mainlog.*
> Archive = exim4/mainlog.*
> Archive = exim/main.log-*
> Archive = archiv/exim/main.log-*
> Archive = exim/mainlog-*
> Archive = exim4/mainlog-*

User changes should be in: /etc/logwatch/conf/logfiles

My /etc/logwatch/conf/logfiles/eximlog.conf has:-

> # Server 4
> # This is : /etc/logwatch/conf/logfiles/eximlog.conf
> # Referenced by : /etc/logwatch/conf/services/exim.conf
> 
> LogFile = exim/m4.main
> Archive = /data/logs.old/exim/m4.main.*


3. The name I use 'eximlog.conf' is defined
in /etc/logwatch/conf/services/exim.conf


4. Check for a script in: /usr/share/logwatch/scripts/services/imapd

5. Put modifications (whole replacement scripts)
in /etc/logwatch/scripts/services/imapd


6. You can then test Logwatch by logging-on to the server and typing

logwatch --print --service imapd  --range today

The range can also be: yesterday or even '-21 days' (with apostrophes)

The problem with log watch is far too many names identical or almost
identical.

Good Luck.


-- 
Regards,

Paul.
England, EU.  England's place is in the European Union.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] CentOS-6 - LogWatch

2015-09-14 Thread James B. Byrne
The Logwatch imapd service script distributed with CentOS-6 does not
generate anything when I run logwatch --service all on a cyrus-imapd
host.  Is this expected behaviour?  Is there a separate script for
cyrus-imapd or are their configuration options required to get the
existing script to work.

I have found an ancient (2004) logwatch service script for cyrus-imapd
but I was sort of hoping that there was a more up-to-date and
officially supported version available somewhere.

Is there?


-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos