LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2010, 04:57 AM   #1
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Rep: Reputation: 18
logwatch not sending emails -" no mail"


Hi I'm trying to get logwatch to email me.

I think my logwatch.conf file is okay. I have postfix installed.
The mailer as far as I can tell is set correctly ("usr/bin/mail"). Can anyone confirm that's correct?

When I run logwatch - I get "no mail for aubrey"

Does anyone know how to fix this problem?

Heres my logwatch.conf file:
Code:
linux-qwkb:/home/aubrey # edit /usr/share/logwatch/default.conf/logwatch.conf
########################################################
# This was written and is maintained by:
#    Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
#    etc, to kirk@kaybee.org.
#
########################################################

# NOTE:
#   All these options are the defaults if you run logwatch with no
#   command-line arguments.  You can override all of these on the
#   command-line.

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

# this is in the format of <name> = <value>.  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

# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log

# You can override the default temp directory (/tmp) here
TmpDir = /var/cache/logwatch

# Default person to mail reports to.  Can be a local account or a
# complete email address.  Variable Print should be set to No to
# enable mail feature.
MailTo = aubrey@splashportal.net bourke.aubrey@gmail.com
# WHen using option --multiemail, it is possible to specify a different
# email recipient per host processed.  For example, to send the report
# for hostname host1 to user@example.com, use:
#Mailto_host1 = user@example.com
# Multiple recipients can be specified by separating them with a space.

# Default person to mail reports from.  Can be a local account or a
# complete email address.
MailFrom = Logwatch

# If set to 'Yes', the report will be sent to stdout instead of being
# mailed to above person.
Print = No

# if set, the results will be saved in <filename> instead of mailed
# or displayed.
#Save = /tmp/logwatch

# Use archives?  If set to 'Yes', the archives of logfiles
# (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will
# be searched in addition to the /var/log/messages file.
# This usually will not do much if your range is set to just
# 'Yesterday' or 'Today'... it is probably best used with
# By default this is now set to Yes. To turn off Archives uncomment this.
#Archives = No
# Range = All

# The default time range for the report...
# The current choices are All, Today, Yesterday
Range = Today

# The default detail level for the report.
# This can either be Low, Med, High or a number.
# Low = 0
# Med = 5
# High = 10
Detail = 5

# 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.
# If you only cared about FTP messages, you could use these 2 lines
# instead of the above:
#Service = ftpd-messages   # Processes ftpd messages in /var/log/messages
#Service = ftpd-xferlog    # Processes ftpd messages in /var/log/xferlog
# Maybe you only wanted reports on PAM messages, then you would use:
#Service = pam_pwdb        # PAM_pwdb messages - usually quite a bit
#Service = pam             # General PAM messages... usually not many

# You can also choose to use the 'LogFile' option.  This will cause
# logwatch to only analyze that one logfile.. for example:
#LogFile = messages
# will process /var/log/messages.  This will run all the filters that
# process that logfile.  This option is probably not too useful to
# most people.  Setting 'Service' to 'All' above analyzes all LogFiles
# anyways...

#
# By default we assume that all Unix systems have sendmail or a sendmail-like MTA.
# The mailer code prints a header with To: From: and Subject:.
# At this point you can change the mailer to anything that can handle this output
# stream. TODO: test variables in the mailer string to see if the To/From/Subject
# can be set from here without breaking anything. This would allow mail/mailx/nail
# etc..... -mgt
mailer = "/usr/bin/mail"

#
# With this option set to 'Yes', only log entries for this particular host
# (as returned by 'hostname' command) will be processed.  The hostname
# can also be overridden on the commandline (with --hostname option).  This
# can allow a log host to process only its own logs, or Logwatch can be
# run once per host included in the logfiles.
#
# The default is to report on all log entries, regardless of its source host.
# Note that some logfiles do not include host information and will not be
# influenced by this setting.
#
#HostLimit = Yes

# vi: shiftwidth=3 tabstop=3 et
 
Old 06-08-2010, 06:51 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by abourke View Post
Hi I'm trying to get logwatch to email me.

I think my logwatch.conf file is okay. I have postfix installed.
The mailer as far as I can tell is set correctly ("usr/bin/mail"). Can anyone confirm that's correct?

When I run logwatch - I get "no mail for aubrey"

Does anyone know how to fix this problem?

Heres my logwatch.conf file:
Code:
linux-qwkb:/home/aubrey # edit /usr/share/logwatch/default.conf/logwatch.conf
########################################################
# This was written and is maintained by:
#    Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
#    etc, to kirk@kaybee.org.
#
########################################################

# NOTE:
#   All these options are the defaults if you run logwatch with no
#   command-line arguments.  You can override all of these on the
#   command-line.

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

# this is in the format of <name> = <value>.  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

# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log

# You can override the default temp directory (/tmp) here
TmpDir = /var/cache/logwatch

# Default person to mail reports to.  Can be a local account or a
# complete email address.  Variable Print should be set to No to
# enable mail feature.
MailTo = aubrey@splashportal.net bourke.aubrey@gmail.com
# WHen using option --multiemail, it is possible to specify a different
# email recipient per host processed.  For example, to send the report
# for hostname host1 to user@example.com, use:
#Mailto_host1 = user@example.com
# Multiple recipients can be specified by separating them with a space.

# Default person to mail reports from.  Can be a local account or a
# complete email address.
MailFrom = Logwatch

# If set to 'Yes', the report will be sent to stdout instead of being
# mailed to above person.
Print = No

# if set, the results will be saved in <filename> instead of mailed
# or displayed.
#Save = /tmp/logwatch

# Use archives?  If set to 'Yes', the archives of logfiles
# (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will
# be searched in addition to the /var/log/messages file.
# This usually will not do much if your range is set to just
# 'Yesterday' or 'Today'... it is probably best used with
# By default this is now set to Yes. To turn off Archives uncomment this.
#Archives = No
# Range = All

# The default time range for the report...
# The current choices are All, Today, Yesterday
Range = Today

# The default detail level for the report.
# This can either be Low, Med, High or a number.
# Low = 0
# Med = 5
# High = 10
Detail = 5

# 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.
# If you only cared about FTP messages, you could use these 2 lines
# instead of the above:
#Service = ftpd-messages   # Processes ftpd messages in /var/log/messages
#Service = ftpd-xferlog    # Processes ftpd messages in /var/log/xferlog
# Maybe you only wanted reports on PAM messages, then you would use:
#Service = pam_pwdb        # PAM_pwdb messages - usually quite a bit
#Service = pam             # General PAM messages... usually not many

# You can also choose to use the 'LogFile' option.  This will cause
# logwatch to only analyze that one logfile.. for example:
#LogFile = messages
# will process /var/log/messages.  This will run all the filters that
# process that logfile.  This option is probably not too useful to
# most people.  Setting 'Service' to 'All' above analyzes all LogFiles
# anyways...

#
# By default we assume that all Unix systems have sendmail or a sendmail-like MTA.
# The mailer code prints a header with To: From: and Subject:.
# At this point you can change the mailer to anything that can handle this output
# stream. TODO: test variables in the mailer string to see if the To/From/Subject
# can be set from here without breaking anything. This would allow mail/mailx/nail
# etc..... -mgt
mailer = "/usr/bin/mail"

#
# With this option set to 'Yes', only log entries for this particular host
# (as returned by 'hostname' command) will be processed.  The hostname
# can also be overridden on the commandline (with --hostname option).  This
# can allow a log host to process only its own logs, or Logwatch can be
# run once per host included in the logfiles.
#
# The default is to report on all log entries, regardless of its source host.
# Note that some logfiles do not include host information and will not be
# influenced by this setting.
#
#HostLimit = Yes

# vi: shiftwidth=3 tabstop=3 et


how can you tell the default mail path??


Code:
which mail
 
Old 06-08-2010, 10:15 AM   #3
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
Ok thanks, but it already is configured to use the default mail. The output of "which mail" gives me:
Code:
/usr/bin/mail
Any other ideas?
 
Old 06-08-2010, 10:20 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What happens if you set the output to stout?
Do you get some output?
Logwatch only sents mail, if there are changes in the logfiles.
 
Old 06-08-2010, 11:13 AM   #5
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
yes, If I set the output to print in the config - it is working correctly. It prints the log file summary.

However when I change the settings in:
edit /usr/share/logwatch/default.conf/logwatch.conf
and
edit /usr/sbin/logwatch
It never sends a mail.

I think logwatch is working fine. The problem seems to be postfix. I tried to mail myself a test message but its not working.

Any advice as to what to do with postfix to send mails?
 
Old 06-08-2010, 11:26 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Are you using Postfix only to relay your mails to an 'outside' account? If so, have you configured it as such (to relay). To what destination are you mailing (GMail, Yahoo, ...)? Are you behind a dynamic IP or a fixed?

Kind regards,

Eric
 
Old 06-08-2010, 11:34 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
I think logwatch is working fine. The problem seems to be postfix. I tried to mail myself a test message but its not working.
Any pointers in the logfiles?
 
Old 06-08-2010, 11:38 AM   #8
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
Im using opensuse 11.3 - It has a yast module called "mail" where you set up your outgoing and incoming (smtp & pop3). It obviously isn't set up correctly - because I don't see any messages when I try to mail myself (Gmail a/c). It just says "no mail for aubrey" at the end.

Think I will write my own program to send the mail. I think I can hopefully save the output to a file using Logwatch. Then I'll get Java to send the mail to myself.

If you think you know where Im going wrong, pls leave a message. It seems there are a few people with the same problem.

Regards
Aubrey.
 
Old 06-08-2010, 11:40 AM   #9
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
do you know where I can find the logfiles?
 
Old 06-08-2010, 11:42 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Not familiar with OpenSUSE but /var/log would be a good place to start I think. Normally if using Postfix then relevant messages would show up in /var/log/messages (if that's the same on OpenSUSE).

Kind regards,

Eric
 
Old 06-08-2010, 11:46 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
* BTW you should never (need to) edit /usr/sbin/logwatch (unless you're a developer fixing things). You should never (need to) edit /usr/share/logwatch/default.conf/logwatch.conf: edit /etc/logd/conf/.* files instead.
 
Old 06-08-2010, 11:49 AM   #12
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
Yes, thats right.

Heres the output of /var/log/mail:
Code:
Jun  8 17:15:44 linux-qwkb postfix/qmgr[2328]: AE17142B24: removed
Jun  8 17:15:45 linux-qwkb postfix/smtp[9073]: C1A2442AF3: to=<aubrey@splashportal.net>, orig_to=<root@linux-qwkb.localdomain>, relay=splashportal.net[207.182.135.5]:25, delay=0.72, delays=0.07/0/0.5/0.15, dsn=4.4.2, status=deferred (lost connection with splashportal.net[207.182.135.5] while sending MAIL FROM)
Jun  8 17:24:34 linux-qwkb postfix/qmgr[2328]: 3D63842B14: from=<root@linux-qwkb.localdomain>, size=489, nrcpt=2 (queue active)
Jun  8 17:24:34 linux-qwkb postfix/trivial-rewrite[9925]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:24:34 linux-qwkb postfix/qmgr[2328]: C1A2442AF3: from=<>, size=2511, nrcpt=1 (queue active)
Jun  8 17:24:34 linux-qwkb postfix/qmgr[2328]: AFCBA42971: from=<root@linux-qwkb.localdomain>, size=10378, nrcpt=1 (queue active)
Jun  8 17:24:35 linux-qwkb postfix/smtp[9926]: 3D63842B14: lost connection with gmail-smtp-in.l.google.com[74.125.43.27] while sending MAIL FROM
Jun  8 17:24:36 linux-qwkb postfix/smtp[9927]: C1A2442AF3: to=<aubrey@splashportal.net>, orig_to=<root@linux-qwkb.localdomain>, relay=splashportal.net[207.182.135.5]:25, delay=531, delays=530/0.33/0.61/0.15, dsn=4.4.2, status=deferred (lost connection with splashportal.net[207.182.135.5] while sending MAIL FROM)
Jun  8 17:24:36 linux-qwkb postfix/smtp[9928]: AFCBA42971: to=<aubrey@splashportal.net>, orig_to=<root>, relay=splashportal.net[207.182.135.5]:25, delay=2113, delays=2112/0.3/0.6/0.17, dsn=4.4.2, status=deferred (lost connection with splashportal.net[207.182.135.5] while sending MAIL FROM)
Jun  8 17:24:36 linux-qwkb postfix/smtp[9926]: 3D63842B14: to=<bourke.aubrey@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[209.85.222.2]:25, delay=534, delays=531/0.83/1.4/0.2, dsn=4.4.2, status=deferred (lost connection with alt1.gmail-smtp-in.l.google.com[209.85.222.2] while sending MAIL FROM)
Jun  8 17:34:34 linux-qwkb postfix/qmgr[2328]: 3D63842B14: from=<root@linux-qwkb.localdomain>, size=489, nrcpt=2 (queue active)
Jun  8 17:34:35 linux-qwkb postfix/trivial-rewrite[9982]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:34:35 linux-qwkb postfix/qmgr[2328]: C6644429F8: from=<>, size=2513, nrcpt=1 (queue active)
Jun  8 17:34:35 linux-qwkb postfix/qmgr[2328]: C1A2442AF3: from=<>, size=2511, nrcpt=1 (queue active)
Jun  8 17:34:35 linux-qwkb postfix/qmgr[2328]: 66DC942684: from=<root@linux-qwkb.localhost.tld>, size=52886, nrcpt=1 (queue active)
Jun  8 17:34:35 linux-qwkb postfix/qmgr[2328]: 0B97342A59: from=<root@linux-qwkb.localdomain>, size=491, nrcpt=2 (queue active)
Jun  8 17:34:36 linux-qwkb postfix/smtp[9983]: 3D63842B14: lost connection with gmail-smtp-in.l.google.com[74.125.43.27] while sending MAIL FROM
Jun  8 17:34:36 linux-qwkb postfix/smtp[9986]: 66DC942684: lost connection with gmail-smtp-in.l.google.com[74.125.43.27] while sending MAIL FROM
Jun  8 17:34:36 linux-qwkb postfix/smtp[9987]: 0B97342A59: lost connection with gmail-smtp-in.l.google.com[74.125.43.27] while sending MAIL FROM
Jun  8 17:34:36 linux-qwkb postfix/smtp[9985]: C1A2442AF3: to=<aubrey@splashportal.net>, orig_to=<root@linux-qwkb.localdomain>, relay=splashportal.net[207.182.135.5]:25, delay=1131, delays=1130/0.17/0.58/0.15, dsn=4.4.2, status=deferred (lost connection with splashportal.net[207.182.135.5] while sending MAIL FROM)
Jun  8 17:34:36 linux-qwkb postfix/smtp[9984]: C6644429F8: to=<aubrey@splashportal.net>, orig_to=<root@linux-qwkb.localdomain>, relay=splashportal.net[207.182.135.5]:25, delay=2243, delays=2242/0.14/0.59/0.15, dsn=4.4.2, status=deferred (lost connection with splashportal.net[207.182.135.5] while sending MAIL FROM)
Jun  8 17:34:36 linux-qwkb postfix/smtp[9983]: 3D63842B14: to=<bourke.aubrey@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[209.85.222.97]:25, delay=1134, delays=1132/0.4/1.4/0.2, dsn=4.4.2, status=deferred (lost connection with alt1.gmail-smtp-in.l.google.com[209.85.222.97] while sending MAIL FROM)
Jun  8 17:34:37 linux-qwkb postfix/smtp[9987]: 0B97342A59: to=<bourke.aubrey@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[209.85.222.97]:25, delay=2246, delays=2244/0.02/1.4/0.2, dsn=4.4.2, status=deferred (lost connection with alt1.gmail-smtp-in.l.google.com[209.85.222.97] while sending MAIL FROM)
Jun  8 17:34:37 linux-qwkb postfix/smtp[9986]: 66DC942684: to=<bourke.aubrey@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[209.85.222.97]:25, delay=7519, delays=7518/0.05/1.4/0.2, dsn=4.4.2, status=deferred (lost connection with alt1.gmail-smtp-in.l.google.com[209.85.222.97] while sending MAIL FROM)
linux-qwkb:/home/aubrey #
 
Old 06-08-2010, 11:52 AM   #13
abourke
Member
 
Registered: Dec 2006
Distribution: Fedora
Posts: 118

Original Poster
Rep: Reputation: 18
Heres some of the output from "mail.warn":
Code:
Jun  8 17:04:35 linux-qwkb postfix/trivial-rewrite[8683]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:14:34 linux-qwkb postfix/trivial-rewrite[9071]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:15:43 linux-qwkb postfix/cleanup[9106]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:15:43 linux-qwkb postfix/local[9107]: warning: database /etc/aliases.db is older than source file /etc/aliases
Jun  8 17:15:43 linux-qwkb postfix/local[9107]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Jun  8 17:24:34 linux-qwkb postfix/trivial-rewrite[9925]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun  8 17:34:35 linux-qwkb postfix/trivial-rewrite[9982]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logwatch not sending mail, but "mail" works thedoobie Linux - Server 1 07-10-2009 03:32 PM
Logwatch not sending emails bclear4 Linux - Server 1 05-11-2009 08:56 AM
How to check "incorrect mails" before sending it through my mail server? nishith Linux - Server 2 04-21-2009 07:47 AM
Sending mail with some attached files using "mail" command? zahadumy Linux - Software 3 05-27-2006 10:43 PM
How to stop the redhat sending me e-mail called "LogWatch" automatically? chuanweizuo Red Hat 2 03-08-2005 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration