LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Delivery Status Notification (Failure) (https://www.linuxquestions.org/questions/linux-newbie-8/delivery-status-notification-failure-825066/)

Xanios 08-09-2010 07:17 AM

Delivery Status Notification (Failure)
 
OMG, something went wrong with my email notifications in nagios.
Just when i thought i have successfully set it up..
Suddenly, just so suddenly it failed. x_x
HELP.

I got the mail below:

Code:

Delivery to the following recipient failed permanently:

    root@server.com

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 #5.1.0 Address rejected root@server.com (state 14).

----- Original message -----

Received: by 10.114.109.1 with SMTP id h1mr16785732wac.203.1281263841711;
      Sun, 08 Aug 2010 03:37:21 -0700 (PDT)
Return-Path: <layleng91@gmail.com>
Received: from ubuntu (bb119-74-182-12.singnet.com.sg [119.74.182.12])
      by mx.google.com with ESMTPS id s5sm7619999wak.12.2010.08.08.03.37.19
      (version=TLSv1/SSLv3 cipher=RC4-MD5);
      Sun, 08 Aug 2010 03:37:21 -0700 (PDT)
Received: by ubuntu (Postfix, from userid 0)
      id 15A0B40A6B; Sun,  8 Aug 2010 18:37:06 +0800 (SGT)
From: Anacron <xanios@gmail.com>
To: root@server.com
Subject: Anacron job 'cron.daily' on ubuntu
Message-Id: <20100808103707.15A0B40A6B@ubuntu>
Date: Sun,  8 Aug 2010 18:37:06 +0800 (SGT)

/etc/cron.daily/logrotate:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName


Do refer to my previous threads regarding me setting up of the email notifications.. Thanks..

r3sistance 08-09-2010 08:16 AM

Sounds to me like a DNS problem and potentially not even your end, do you get similar problems with other domains/e-mail addresses.

linuxlover.chaitanya 08-09-2010 09:00 AM

If you are relaying email using Gmail smtp server and sending to your internal mail account that you have setup on your internal mail server, it wont ever be relayed. How would gmail smtp know of your internal server when there is no proper DNS record set for it?
Send your notification to your gmail account and it should work.

Xanios 08-09-2010 09:08 AM

Hi r3sistance,

I just created a new gmail account and used that account to receive mails, and that was no problem. I'm able to receive mails. I wonder whats wrong with my previous email account. It was able to receive mails from 7th of august until yesterday. ):

Xanios 08-09-2010 09:10 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 4060658)
If you are relaying email using Gmail smtp server and sending to your internal mail account that you have setup on your internal mail server, it wont ever be relayed. How would gmail smtp know of your internal server when there is no proper DNS record set for it?
Send your notification to your gmail account and it should work.

Hi Chaitanya,

Sounds a little confusing, sorry >.<

What you mean by send my notification to my gmail account?

linuxlover.chaitanya 08-09-2010 09:14 AM

Read your previous post. That is what I meant. You would not be able to receive mails on root@server, which is your internal address. This is because you are using Gmail as relay. Gmail would not know about your internal server as you do not have DNS set up properly. But you can send to gmail address as gmail SMTP would be able to resolve it.

r3sistance 08-09-2010 09:18 AM

Ah, can't believe I missed that one. root@server, should have soon that one, guess I skimmed that part in error.

Xanios 08-09-2010 09:21 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 4060670)
Read your previous post. That is what I meant. You would not be able to receive mails on root@server, which is your internal address. This is because you are using Gmail as relay. Gmail would not know about your internal server as you do not have DNS set up properly. But you can send to gmail address as gmail SMTP would be able to resolve it.

Hi,

So you're saying i'm sending mails to my root@server? But, how could that be? I mean, i've defined the gmail address that i want email notifications to send to, where did that root@server popped out. x_x

r3sistance 08-09-2010 09:24 AM

Did you configure your server to relay ALL e-mail to gmail? It could be automatic log reports or some other services trying to send information to root.

Xanios 08-09-2010 09:31 AM

No i guess. I only defined my gmail address in sasl_password and in contacts.cfg. What else are there?

linuxlover.chaitanya 08-10-2010 01:08 AM

You will need to tell nagios where it needs to send mails to and from which smtp server.

Xanios 08-10-2010 01:54 AM

In contacts.cfg right? in define contact..there is a email, i gave my gmail.

Code:

define contact{
        contact_name            nagiosadmin           
        use                    generic-contact       
        alias                  Nagios Admin           
        email                  xanios@gmail.com 
        }


linuxlover.chaitanya 08-10-2010 01:57 AM

I do not know how to do that.

EricTRA 08-10-2010 02:03 AM

Hi Xanios,

It looks to me that this mail is a system mail that's being sent from a deamon (cron) to the root user on your server. Since you're relaying ALL your mail to GMail you're getting this error because GMail cannot resolve your domain/host. Normally the simplest way is to create a file named .forward in your root's home directory (and maybe also in your user home directory) containing your destination email address. Like this:
Code:

root@srvnagios:~# cat .forward
user@gmail.com

root@srvnagios:~#

Not sure if you should restart postfix but it wouldn't hurt. With this 'forward' file all mails to the root user will be automagically forwarded to your gmail address.

Kind regards,

Eric

EricTRA 08-10-2010 02:05 AM

Quote:

Originally Posted by Xanios (Post 4061405)
In contacts.cfg right? in define contact..there is a email, i gave my gmail.

Code:

define contact{
        contact_name            nagiosadmin           
        use                    generic-contact       
        alias                  Nagios Admin           
        email                  xanios@gmail.com 
        }


Hi Xanios,

Look at the mail you posted. It's not from Nagios!
Code:

From: Anacron <xanios@gmail.com>
To: root@server.com
Subject: Anacron job 'cron.daily' on ubuntu
Message-Id: <20100808103707.15A0B40A6B@ubuntu>
Date: Sun,  8 Aug 2010 18:37:06 +0800 (SGT)

/etc/cron.daily/logrotate:

Read my previous post and try that. If your postfix was working before then this should do the trick for your system messages.

Kind regards,

Eric


All times are GMT -5. The time now is 08:26 AM.