Results 1 to 7 of 7

Thread: Exim delivery failures for root

  1. #1
    Join Date
    May 2007
    Beans
    422

    Exim delivery failures for root

    I have set up exim to send the results of a few scripts (chkrootkit/rkhunter, nmap, scheduled nessus scans, etc.) to a gmail account. I can send mail fine from the command line, however I am receiving the following message when running the scripts from cron:

    PHP Code:
    This is an automatically generated Delivery Status Notification

    Delivery to the following recipient failed permanently
    :

         
    root@gmail.com

    Technical details of permanent failure

    Google tried to deliver your messagebut it was rejected by the recipient domainWe recommend contacting the other email provider for further information about the cause of this errorThe error that the other server returned was550 550 5.2.1 The email account that you tried to reach is disabled9si12533803qyk.80 (state 14). 
    I have tried to make an alias but that does not seem to help.

    PHP Code:
    blake@UbuntuDesktop:/etccat aliases 
    # Added by installer for initial user
    root:    <removed>@gmail.com 
    What needs to be done to ensure the message is sent to a valid account instead of root@gmail.com?

  2. #2
    Join Date
    Apr 2008
    Location
    UK
    Beans
    1,098

    Re: Exim delivery failures for root

    Quote Originally Posted by jba6511 View Post

    What needs to be done to ensure the message is sent to a valid account instead of root@gmail.com?
    Use the command which worked from the command line in the script specified in the crontab.

    /etc/aliases doesn't do what you think it does. See the exim4 documentation.
    Brian.

  3. #3
    Join Date
    May 2007
    Beans
    422

    Re: Exim delivery failures for root

    I Have tried modifying /etc/email-addresses to include root: <username>@gmail.com but this has not helped out. The only examples I can find are discussing using /etc/aliases in the following manner:
    root: <username>
    postmaster: <username>
    etc. Can someone point me to some documentation on this or post their configuration?

    also, I believe exim is setup correctly. echo "test" | mail -s test <username>@gmail.com will deliver the message fine. If I try echo "test" | mail -s test root the message is not delivered.

  4. #4
    Join Date
    Apr 2008
    Location
    UK
    Beans
    1,098

    Re: Exim delivery failures for root

    Quote Originally Posted by jba6511 View Post

    also, I believe exim is setup correctly. echo "test" | mail -s test <username>@gmail.com will deliver the message fine.
    So - why not use this in the crontab or the script run from it?

    If I try echo "test" | mail -s test root the message is not delivered.
    On my system:

    Code:
    less /usr/share/doc/exim4-base/README.Debian.gz
    Brian.

  5. #5
    Join Date
    May 2007
    Beans
    422

    Re: Exim delivery failures for root

    PHP Code:
    sub mail {

        
    # mail the results file to gmail account
        
    my $mailcall "/usr/bin/mail -s \"Rootkit Detection Results\" <username>\@gmail.com < /tmp/results.txt";
        
    system ("$mailcall");    


    Here is the subroutine that mails the results. This works fine from the command line.

  6. #6
    Join Date
    Apr 2008
    Location
    UK
    Beans
    1,098

    Re: Exim delivery failures for root

    Quote Originally Posted by jba6511 View Post

    Code:
    /usr/bin/mail -s "Rootkit Detection Results" <username>\@gmail.com < /tmp/results.txt
    This works ok here from a bash script.

    /etc/aliases:

    Code:
    root: brian
    delivers mail sent to root at this domain to brian.

    /etc/exim4/email-addresses:

    Code:
    brian: brian@example.com
    because some ISP's mail servers reject unresolvable domains like laptop.example.com.
    Brian.

  7. #7
    Join Date
    May 2007
    Beans
    422

    Re: Exim delivery failures for root

    thanks brian. adjusted the aliases and email-address files and know all it is working properly.

Tags for this Thread

Bookmarks

Posting Permissions

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