LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2010, 02:06 AM   #16
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled

Aah..Eric missed that point. Yes cron can send system mails. Thats was a good look Eric.
 
Old 08-10-2010, 02:44 AM   #17
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi Eric,

i got this:

Code:
nagios@ubuntu:~$ cat .forward
cat: .forward: No such file or directory
Oh okay, thats not from Nagios. Is from deamon (cron) to root user..
But why do they need to send to root user?

thank you
 
Old 08-10-2010, 02:46 AM   #18
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello Xanios,

You need to create that file. You could do it like this
Code:
echo "youremail@gmail.com" > .forward
when in your home directory.

The cat only shows you the contents of the file, since it's not there you get the error you posted.

Kind regards,

Eric
 
Old 08-10-2010, 02:47 AM   #19
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Quote:
Originally Posted by Xanios View Post
But why do they need to send to root user?
Quote:
Originally Posted by r3sistance View Post
It could be automatic log reports or some other services trying to send information to root.
The bold section would be my guess, I often get e-mails from the system with the title "Logwatch for <hostname> (Linux)" I suspect it will be a similar service that is running in cron or the such that you have been hit by. Mine sends directly to root@<domainname> however, so I suspect at some point I had reconfigured it.

Last edited by r3sistance; 08-10-2010 at 02:50 AM. Reason: showing what I am responding too
 
Old 08-10-2010, 02:49 AM   #20
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by Xanios View Post
Oh okay, thats not from Nagios. Is from deamon (cron) to root user..
But why do they need to send to root user?

thank you
Hello,

There are various system services and daemons that mail errors or warnings to the system user that runs them. Most of them just write to log files and it's up to you to check your logs, but there are some that mail to the local user. Since you have set up your system to relay all mail to your gmail account it's best to include also the system mails.

Kind regards,

Eric
 
Old 08-10-2010, 03:03 AM   #21
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Oh i see.
For a minute i thought something had gone wrong with my postfix again :X
Because Nagios have stopped sending email notifications to my gmail..
But i guess they have sent finish the mails so thats why they stopped sending..
 
Old 08-10-2010, 03:05 AM   #22
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by Xanios View Post
Oh i see.
For a minute i thought something had gone wrong with my postfix again :X
Because Nagios have stopped sending email notifications to my gmail..
But i guess they have sent finish the mails so thats why they stopped sending..
Hi,

If you doubt that postfix is functioning just look at the log for errors, send a test mail from the command line:
Code:
mail -s "Testmail from your server" yourname@gmail.com
press CTRL-D and enter to send the mail, and check the logs again to see if any problems arise.

Kind regards,

Eric
 
Old 08-10-2010, 07:24 AM   #23
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

i did what you have told me.

My last few lines in log file:

Code:
Aug 10 19:22:48 ubuntu postfix/smtp[2752]: 9A9BD40A81: to=<xanios@gmail.com>, relay=smtp.gmail.com[74.125.53.109]:587, delay=4.2, delays=0.13/0.1/2.1/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1281439381 33sm12606005wad.18)
Aug 10 19:22:48 ubuntu postfix/cleanup[2750]: DEBC340A83: message-id=<20100810112248.DEBC340A83@ubuntu>
Aug 10 19:22:48 ubuntu postfix/bounce[2755]: 9A9BD40A81: sender delivery status notification: DEBC340A83
Aug 10 19:22:48 ubuntu postfix/qmgr[2744]: 9A9BD40A81: removed
Aug 10 19:22:48 ubuntu postfix/qmgr[2744]: DEBC340A83: from=<>, size=1781, nrcpt=1 (queue active)
Aug 10 19:22:49 ubuntu postfix/smtp[2752]: certificate verification failed for smtp.gmail.com[74.125.53.109]:587: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Aug 10 19:22:53 ubuntu postfix/smtp[2752]: DEBC340A83: to=<xanios@server.com>, relay=smtp.gmail.com[74.125.53.109]:587, delay=4.2, delays=0.05/0/2.2/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1281439385 z1sm7657360wfd.15)
Aug 10 19:22:53 ubuntu postfix/qmgr[2744]: DEBC340A83: removed
I guess it should be okay? (:
 
Old 08-10-2010, 07:43 AM   #24
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Code:
Aug 10 19:22:53 ubuntu postfix/smtp[2752]: DEBC340A83: to=<xanios@server.com>, relay=smtp.gmail.com[74.125.53.109]:587, delay=4.2, delays=0.05/0/2.2/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1281439385 z1sm7657360wfd.15)
Aug 10 19:22:53 ubuntu postfix/qmgr[2744]: DEBC340A83: removed
The first line states that the message was sent correctly:
Code:
status=sent (250 2.0.0 OK 1281439385 z1sm7657360wfd.15)
and the last line removes it from the queue.

Destination was xanios@server.com, so I assume you've set up the .forward file holding your 'real' email address in it?

So it should be OK. Did you receive the message correctly?

Kind regards,

Eric
 
Old 08-10-2010, 07:58 AM   #25
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Ya, i did set up the .forward file holding your 'real' email address in it(:

And yup, i received the test mail in my gmail


Just wondering..how come it removes it from the queue?
 
Old 08-10-2010, 08:24 AM   #26
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

So that confirms that it works! Great!

Now, for your question. That's the way Postfix works with queues,
hold
incoming
active
deferred

and the qmgr daemon takes care of those queues, moving the messages from one to another if undeliverable to try later, moving them to hold if you tell the qmgr to do so using the postqueue command, and so on.

Better description from the man page of qmgr:
Code:
MAIL QUEUES
       The qmgr(8) daemon maintains the following queues:

       incoming
              Inbound mail from the network, or mail picked up by the local pickup(8) daemon from the maildrop directory.

       active Messages  that  the queue manager has opened for delivery. Only a limited number of messages is allowed to enter the active queue (leaky
              bucket strategy, for a fixed delivery rate).

       deferred
              Mail that could not be delivered upon the first attempt. The queue manager implements exponential backoff by doubling the  time  between
              delivery attempts.

       corrupt
              Unreadable or damaged queue files are moved here for inspection.

       hold   Messages that are kept "on hold" are kept here until someone sets them free.
Look at the man pages for:
Code:
man postsuper
man postqueue
man qmgr
Kind regards,

Eric
 
Old 08-10-2010, 09:20 AM   #27
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
hey thank you for the clear explanation!(:

everytime i saw the 'removed from queue', i thought it was something bad, like the send email couldn't be sent etc. haha(:


this:

Code:
Aug 10 19:22:49 ubuntu postfix/smtp[2752]: certificate verification failed for smtp.gmail.com[74.125.53.109]:587: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
is nothing important i suppose? sorry keep asking questions >.< but i'm just doubtful..kept saw this everytime i sent a test mail. :X


in Nagios, once all notifications of downed services/hosts have been sent, it would stop sending right? because in my gmail i no longer receives any email notifications from nagios, even though those services are still down.

thank you once again!
 
Old 08-11-2010, 01:18 AM   #28
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by Xanios View Post
hey thank you for the clear explanation!(:

everytime i saw the 'removed from queue', i thought it was something bad, like the send email couldn't be sent etc. haha(:


this:

Code:
Aug 10 19:22:49 ubuntu postfix/smtp[2752]: certificate verification failed for smtp.gmail.com[74.125.53.109]:587: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
is nothing important i suppose? sorry keep asking questions >.< but i'm just doubtful..kept saw this everytime i sent a test mail. :X


in Nagios, once all notifications of downed services/hosts have been sent, it would stop sending right? because in my gmail i no longer receives any email notifications from nagios, even though those services are still down.

thank you once again!
Hello,

I wouldn't say that the certification error is not important. If you receive mails from your system then you can solve that error without any pressure. I'm not sure however why you get that error.

About the Nagios notifications not going out, if the services are down then you should receive the notifications. If you don't then that's bad.
Is Nagios running OK? To what address and as what user do you send the notifications? Force a notification and check the log right after that to see if it gets send out by postfix.

Kind regards,

Eric
 
Old 08-11-2010, 01:31 AM   #29
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

I don't think Nagios is running OK? Because most of the services are still down, and i no longer receives email notifications from nagios. I wonder why. They simply just sent once and after that stopped?

How to force a notification?

Thank you.
 
Old 08-11-2010, 01:48 AM   #30
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

It's been some time since I used the 'plain' version of Nagios (I have Groundwork installed which is build around Nagios since my coworkers don't have Linux experience) so I'm not sure how to force notifications with it.

Are you sure you set your notification and check periods correctly so that checks are performed at regular intervals?

I believe you can check if Nagios is running with:
Code:
/etc/init.d/nagios status
or whatever your startup script is named.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delivery status notification from Cron. glore2002 Debian 4 10-12-2009 06:43 PM
Delivery status notification- Using Postfix 2.2.7 on Clarkconnect Enterprise 4.2 cgreen6911 Linux - Enterprise 0 03-26-2009 05:39 PM
How to disable delivery status notification courier sci3ntist Linux - Server 0 01-15-2008 07:35 AM
delivery failure notification pansarevaibhav Linux - Newbie 1 12-16-2006 04:21 AM


All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration