Logwatch + pb envoie mail

Logwatch + pb envoie mail - Divers - Linux et OS Alternatifs

Marsh Posté le 14-09-2006 à 15:07:09    

:hello:  
 
Je souhaite bénéficier de l'envoie d'alerte par mail à l'aide de l'utilitaire logwatch.
La machine Linux qui utilise logwatch dispose d'un serveur postfix... qui lui meme route les mails sur notre serveur de messagerie.
 
Enfin bref, lorsque je lance logwatch en root je voies ce message d'erreur dans mon /var/log/maillog
 

Code :
  1. Sep 14 11:15:03 STSMFE5D sendmail[11400]: k8E9F0Yt011400: to=cedric@toto.com ctladdr=root (0/0), delay=00:00:03, xdelay=00:00:00, mailer=relay, pri=33834, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]


 
 
Voici mon /usr/share/logwatch/default.conf/logwatch.conf
 

Code :
  1. ########################################################
  2. # This was written and is maintained by:
  3. #    Kirk Bauer <kirk@kaybee.org>
  4. #
  5. # Please send all comments, suggestions, bug reports,
  6. #    etc, to kirk@kaybee.org.
  7. #
  8. ########################################################
  9. # NOTE:
  10. #   All these options are the defaults if you run logwatch with no
  11. #   command-line arguments.  You can override all of these on the
  12. #   command-line.
  13. # You can put comments anywhere you want to.  They are effective for the
  14. # rest of the line.
  15. # this is in the format of <name> = <value>.  Whitespace at the beginning
  16. # and end of the lines is removed.  Whitespace before and after the = sign
  17. # is removed.  Everything is case *insensitive*.
  18. # Yes = True  = On  = 1
  19. # No  = False = Off = 0
  20. # Default Log Directory
  21. # All log-files are assumed to be given relative to this directory.
  22. LogDir = /var/log
  23. # You can override the default temp directory (/tmp) here
  24. TmpDir = /var/cache/logwatch
  25. # Default person to mail reports to.  Can be a local account or a
  26. # complete email address.
  27. MailTo = cedric@WWW.com
  28. # Default person to mail reports from.  Can be a local account or a
  29. # complete email address.
  30. MailFrom = logwatch@WWW.com
  31. # If set to 'Yes', the report will be sent to stdout instead of being
  32. # mailed to above person.
  33. Print = No
  34. # if set, the results will be saved in <filename> instead of mailed
  35. # or displayed.
  36. #Save = /tmp/logwatch
  37. # Use archives?  If set to 'Yes', the archives of logfiles
  38. # (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will
  39. # be searched in addition to the /var/log/messages file.
  40. # This usually will not do much if your range is set to just
  41. # 'Yesterday' or 'Today'... it is probably best used with
  42. # Archives = Yes
  43. # Range = All
  44. # The default time range for the report...
  45. # The current choices are All, Today, Yesterday
  46. Range = yesterday
  47. # The default detail level for the report.
  48. # This can either be Low, Med, High or a number.
  49. # Low = 0
  50. # Med = 5
  51. # High = 10
  52. Detail = Low
  53. # The 'Service' option expects either the name of a filter
  54. # (in /usr/share/logwatch/scripts/services/*) or 'All'.
  55. # The default service(s) to report on.  This should be left as All for
  56. # most people.   
  57. Service = All
  58. # You can also disable certain services (when specifying all)
  59. Service = "-zz-network"     # Prevents execution of zz-network service, which
  60.                             # prints useful network configuration info.
  61. # If you only cared about FTP messages, you could use these 2 lines
  62. # instead of the above:
  63. #Service = ftpd-messages   # Processes ftpd messages in /var/log/messages
  64. #Service = ftpd-xferlog    # Processes ftpd messages in /var/log/xferlog
  65. # Maybe you only wanted reports on PAM messages, then you would use:
  66. #Service = pam_pwdb        # PAM_pwdb messages - usually quite a bit
  67. #Service = pam             # General PAM messages... usually not many
  68. # You can also choose to use the 'LogFile' option.  This will cause
  69. # logwatch to only analyze that one logfile.. for example:
  70. #LogFile = messages
  71. # will process /var/log/messages.  This will run all the filters that  
  72. # process that logfile.  This option is probably not too useful to
  73. # most people.  Setting 'Service' to 'All' above analyizes all LogFiles
  74. # anyways...
  75. #
  76. # By default we assume that all Unix systems have sendmail or a sendmail-like system.
  77. # The mailer code Prints a header with To: From: and Subject:.
  78. # At this point you can change the mailer to any thing else that can handle that output
  79. # stream. TODO test variables in the mailer string to see if the To/From/Subject can be set
  80. # From here with out breaking anything. This would allow mail/mailx/nail etc..... -mgt  
  81. mailer = "sendmail -t"
  82. #
  83. # With this option set to 'Yes', only log entries for this particular host
  84. # (as returned by 'hostname' command) will be processed.  The hostname
  85. # can also be overridden on the commandline (with --hostname option).  This
  86. # can allow a log host to process only its own logs, or Logwatch can be
  87. # run once per host included in the logfiles.  
  88. #
  89. # The default is to report on all log entries, regardless of its source host.
  90. # Note that some logfiles do not include host information and will not be
  91. # influenced by this setting.
  92. #
  93. #HostLimit = Yes


 
 
Je ne comprends pas pourquoi cela ne marche pas.
Je ne pense pas qu'il y est de toute maniere besoin d'un serveur de messagerie pour cela... une simple commande mail devrait suffir à envoyer un mail.
 
 
Merci de votre aide pour ces éclaircissements.
 
 :jap:


Message édité par madsurfer le 29-09-2006 à 17:12:44
Reply

Marsh Posté le 14-09-2006 à 15:07:09   

Reply

Marsh Posté le 15-09-2006 à 10:32:15    

[:macfly_fr]

Reply

Marsh Posté le 19-09-2006 à 11:09:40    

[:macfly_fr]

Reply

Marsh Posté le 19-09-2006 à 11:12:54    

Tu ne px pas utiliser un vrai MTA plutot que sendmail? (postfix...)

Reply

Marsh Posté le 19-09-2006 à 11:21:01    

Je viens de lire le message complet... Es tu sur d'avoir un MTA ?
 

telnet 127.0.0.1 25


 
Tu es sur quelle distrib?

Reply

Marsh Posté le 29-09-2006 à 17:08:54    

Bingo ! Je suis un ane !! Le serveur postfix ne tournait pas !  :o  
 
Et pour couronné le tout j'avais mon /etc/postfix/canonical
 
Merci Bcp !  
 
 
Un dernier détail.... voilà mon rapport recu par mail :
 

Code :
  1. ################### Logwatch 7.2.1 (01/18/06) ####################
  2.         Processing Initiated: Fri Sep 29 17:03:08 2006
  3.         Date Range Processed: yesterday
  4.                               ( 2006-Sep-28 )
  5.                               Period is day.
  6.       Detail Level of Output: 0
  7.               Type of Output: unformatted
  8.            Logfiles for Host: XXXXX
  9.   ##################################################################
  10. --------------------- httpd Begin ------------------------
  11. Requests with error response codes
  12.     404 Not Found
  13.        /favicon.ico: 1 Time(s)
  14. ---------------------- httpd End -------------------------
  15. --------------------- XNTPD Begin ------------------------
  16. Total synchronizations 2 (hosts: 2)
  17. ---------------------- XNTPD End -------------------------
  18. --------------------- Disk Space Begin ------------------------
  19. Filesystem                            Size   Used  Avail Use%  Mounted on
  20. /dev/sda1                             6.9G   3.7G   2.9G  57%  /
  21. /dev/shm                              193M      0   193M   0%  /dev/shm
  22. ---------------------- Disk Space End -------------------------
  23. ###################### Logwatch End #########################


 
 
Requests with error response codes
    404 Not Found
       /favicon.ico: 1 Time(s)
 
 
 Requests with error response codes
    404 Not Found
       /favicon.ico: 1 Time(s)

 
C'est quoi ce message ?
 
 
 
--------------------- XNTPD Begin ------------------------  
 
 
 Total synchronizations 2 (hosts: 2)
 
 ---------------------- XNTPD End -------------------------  

 
 
Ca veut dire quoi ?  :p

Message cité 1 fois
Message édité par madsurfer le 29-09-2006 à 17:13:20
Reply

Marsh Posté le 03-10-2006 à 16:12:02    

madsurfer a écrit :

Bingo ! Je suis un ane !! Le serveur postfix ne tournait pas !  :o  
 
Et pour couronné le tout j'avais mon /etc/postfix/canonical
 
Merci Bcp !  
 
 
Un dernier détail.... voilà mon rapport recu par mail :
 

Code :
  1. ################### Logwatch 7.2.1 (01/18/06) ####################
  2.         Processing Initiated: Fri Sep 29 17:03:08 2006
  3.         Date Range Processed: yesterday
  4.                               ( 2006-Sep-28 )
  5.                               Period is day.
  6.       Detail Level of Output: 0
  7.               Type of Output: unformatted
  8.            Logfiles for Host: XXXXX
  9.   ##################################################################
  10. --------------------- httpd Begin ------------------------
  11. Requests with error response codes
  12.     404 Not Found
  13.        /favicon.ico: 1 Time(s)
  14. ---------------------- httpd End -------------------------
  15. --------------------- XNTPD Begin ------------------------
  16. Total synchronizations 2 (hosts: 2)
  17. ---------------------- XNTPD End -------------------------
  18. --------------------- Disk Space Begin ------------------------
  19. Filesystem                            Size   Used  Avail Use%  Mounted on
  20. /dev/sda1                             6.9G   3.7G   2.9G  57%  /
  21. /dev/shm                              193M      0   193M   0%  /dev/shm
  22. ---------------------- Disk Space End -------------------------
  23. ###################### Logwatch End #########################


 
 
Requests with error response codes
    404 Not Found
       /favicon.ico: 1 Time(s)
 
 
 Requests with error response codes
    404 Not Found
       /favicon.ico: 1 Time(s)

 
C'est quoi ce message ?
Tu dois avoir un serveur apache qui tourne car il fait référence à une "image favori" (je ne sais pas comment l'appeler) Si tu utilises Firefox, lorsque tu tapes une url, juste à la gauche de cet url apparaît une image/icône.
Pour forum hardware, l'image/icône est une sorte de lettre H.

 
--------------------- XNTPD Begin ------------------------  
 
 
 Total synchronizations 2 (hosts: 2)
 
 ---------------------- XNTPD End -------------------------  

 
 
Ca veut dire quoi ?  :p

Synchronisation de l'heure effectuée 2 fois sur ton serveur.




Message édité par sellin20 le 03-10-2006 à 16:13:13
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed