Results 1 to 3 of 3

Thread: Cron job is sending mail to *wrong* email address.

  1. #1
    Join Date
    Apr 2008
    Beans
    189

    Cron job is sending mail to *wrong* email address.

    Every day
    I get an error mail from the server, about an email that could not be sent.
    The error mail is sent successfully by ssmtp.
    The mail that failed to get delivered, is failed because it's sent by the cron service to:
    andre@odin2 (no such email address exist)

    Technical details of permanent failure:
    DNS Error: Domain name not found

    I've tried to force all CRON email to go to correct email address to crontab like this

    MAILTO="andre****@gmail.com" (That did not help.)

    (in case you suggest a mail server, Procmail is installed, but not configured.)

    To me, it seems that the user's default email address needs to be entered somewhere.

  2. #2
    Join Date
    Apr 2008
    Location
    England
    Beans
    210
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cron job is sending mail to *wrong* email address.

    Have you tried creating an alias for that user in /etc/aliases?

    Code:
    andre : andre***@gmail.com
    You will need to run the following command after making any changes to /etc/aliases:

    Code:
     sudo newaliases
    Last edited by cj13579; January 3rd, 2013 at 02:28 PM. Reason: Missed necessary command
    Chris

    My blog

  3. #3
    Join Date
    Apr 2008
    Beans
    189

    Re: Cron job is sending mail to *wrong* email address.

    thanks, sudo newaliases said that ssmtp is not using aliases
    Then I found this info:
    http://raftaman.net/?p=591

    Once mail.rc & ssmtp revaliases was configured, it worked great.

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
  •