Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2003
    Posts
    324

    send mail error in logwatch

    In my logwatch email i received this email:

    --------------------- sendmail Begin ------------------------


    ERROR: Could not open /etc/mail/local-host-names

    ERROR: Could not open /etc/mail/access


    Message Size Distribution:
    Range # Msgs KBytes
    0 - 10k 0 0
    10k - 20k 0 0
    20k - 50k 0 0
    50k - 100k 0 0
    100k - 500k 0 0
    500k - 1Mb 0 0
    1Mb - 2Mb 0 0
    2Mb - 5Mb 0 0
    5Mb - 10Mb 0 0
    10Mb+ 0 0
    ----------------------------------
    TOTAL 0 0

    ---------------------- sendmail End -------------------------


    I verified the two above files it can't access, don't exist.. are they suppose to?

    This is a RHE/Cpanel System.

    Thank you in advance for all replies

  2. #2
    Greetings:

    I could be wrong, but doesn't cpanel use exim for email?

    Thank you.
    ---
    Peter M. Abraham
    LinkedIn Profile

  3. #3
    Join Date
    Nov 2003
    Posts
    324
    Yeah, but i wasn't sure if i should ignore those errors or do something about it.

    Thank you

  4. #4
    Join Date
    Mar 2004
    Location
    TN, USA
    Posts
    35
    pico -w /etc/log.d/logwatch.conf

    go to the line (probably line# 79) where you selected
    'Service = All' (you will see the following line)
    # You can also disable certain services (when specifying all)
    now, you need to uncomment the option below
    and disable the sendmail since the default MTA for cPanel is EXIM

    Service = -sendmail

    then

    CTRL + X

    then type

    Y
    Enter

  5. #5
    Join Date
    Jan 2004
    Posts
    445
    Might be more correct to say that disabling sendmail for logwatch as shown is the way to eliminate the error, sendmail is still symlinked to exim.

  6. #6
    Join Date
    Mar 2004
    Location
    TN, USA
    Posts
    35
    right you are...

  7. #7
    Originally posted by sawbuck
    Might be more correct to say that disabling sendmail for logwatch as shown is the way to eliminate the error, sendmail is still symlinked to exim.

    agreed!!

  8. #8
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,294
    Maybe it interperets it different?
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  9. #9
    Join Date
    Mar 2004
    Location
    TN, USA
    Posts
    35
    This is not the only way to eliminate sendmail error messages in logwatch. There are other ways to eliminate the error and get the desired output in the logwatch. Let me explain if you it is worth doing. Exim and Sendmail both of them are MTAs. But for cPanel users - Exim is the default MTA that replaces Sendmail - in other words it replaces some of the options of the Sendmail. So, probably it is fair to say that Sendmail merges with Exim.

    Sendmail is the original and popular MTA. It is not very user friendly or easy to configure. On the other hand, Exim is very easy to configure and also provide a better security. There is an Exim command for almost every critical Sendmail command with the same name that executes a same action. So, the scripts based on Sendmail will work perfectly with Exim and the scripts won't even know the difference. The directory structure and the files of Exim & Sendmail are same or similar or they both use the same file and directory structure. For example: /usr/lib/sendmail or /usr/sbin/sendmail or /etc/aliases.

    The Exim configuration file is located in: /etc/exim/exim.conf or /etc/exim.conf - which is equivalent to sendmail.cf. The configuration file for Sendmail (sendmail.cf) is supposed to be in the directory /etc/sendmail.cf or /etc/mail/sendmail.cf. These files are not in the respective directories since Exim is the default MTA which uses Exim configuration file ('exim.conf'). The Exim users will see a file: 'submit.cf.bak' or something similar in the directory /etc/mail/ which is basically the Sendmail configuration file. This configuration file (sendmail.cf) can also be copied from the directory: /usr/share/sendmail-cf/cf/generic-linux.cf. The Sendmail package will work as a mailer by default without any configuration.

    If you want to define rules with Sendmail then you need to add a list of rules - mostly under the directory /etc/mail/.

    In this case, the Sendmail configuration file for logwatch is looking for your rules for relay hosts in the file /etc/mail/access. This configuration file is located in - /etc/log.d/conf/services/sendmail.conf. You can also type: 'pico -w /etc/log.d/scripts/services/sendmail' to view more details and understand how it works.

    Anyway, these files (access & local-host-names) are non-existent. However, you can create the files and define the rules. For example:

    pico -w /etc/mail/access

    localhost.localdomain RELAY
    localhost RELAY
    127.0.0.1 RELAY
    your-domain.com RELAY

    CTRL + X
    Y
    ENTER


    'host_accept_relay' option does exactly the same thing in the case of Exim.

    The other file that gives the Error message in logwatch is: 'local-host-names' - where you need to list the domains for which Sendmail is going to receive mail. This is also equivalent to the 'local_domains' option of Exim. You can create the file as follows:

    pico -w /etc/mail/local-host-names

    your.domain another.domain

    CTRL + X
    Y
    ENTER


    You will find more details about these files in the following links:

    sendmail features
    local-host-names
    access db

    You need to run the command:

    cd /etc/
    make -I mail


    After you configure or create any files under the directory /etc/mail/ to rebuild lookup tables for those files. You can also define different sets of rules for Sendmail under this directory (/etc/mail/). Probably, these rules are already defined in your Exim configuration file or Exim offers every option or even better choices that you can do here. In fact, the security is better with Exim.

    So, my point is that it's not worth creating or configuring files for Sendmail to eliminate logwatch error messages rather it is a good idea to disable the Sendmail logging in logwatch configuration file. I hope you guys will agree with me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •