Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-26-2009, 07:21 AM   #1
LQ Newbie
Registered: Oct 2008
Location: Hyderabad
Posts: 26

Rep: Reputation: 15
could not find the mail in mail queue


I hav two ethernet interface cards to my machine eth0 and eth1.through eth1 i can access public network and mail server.where as eth1 is used to access internal network.I wrote a script to monitor eth0 interface.Whenever it goes down it sends mail to administrator.I thought since eth0 is down,I expected the mail to be in mail queue and when the eth0 gets up it will send the mail.But to my pleasant surprise i could find the mail in mail queue when eth0 is down and after eth0 goes up i could not get any mail.Can any expert say why,And what might be the possible reason?

surya prakash
Old 03-26-2009, 07:27 AM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
do you see anything in the logfiles?
perhaps you can show us the script.
Old 03-26-2009, 07:34 AM   #3
LQ Newbie
Registered: Oct 2008
Location: Hyderabad
Posts: 26

Original Poster
Rep: Reputation: 15
ethtool eth0|grep "Link detected"| cut -d ':' -f2

I used the above command to know the Ethernet interface status in a script called eth1linkstatus if status is "Yes" am writing the process id to /var/run/ if status is "No" i am removing the file /var/run/ . In the monit script i made the following configuration

check process SERVICE_26 with pidfile /var/run/
start program = "/etc/init.d/eth1linktest start"
stop program = "/etc/init.d/eth1linktest stop"
if 3 restarts within 3 cycles then exec "/usr/local/monit/bin/timeout SERVICE_26"
mode active
group local

if monit fails to restart the service in 3 attempts i am calling a script called timeout . timeout will call a php script to sent the mail.And i am using sendmail client .


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
queue mail Gran_Maestre Linux - Server 4 09-30-2008 03:14 PM
exim mail queue alexr186 Linux - Server 1 01-03-2007 07:00 AM
Mail Queue failures Ziggie Linux - General 3 12-06-2005 09:51 AM
qmail mail queue bluestorm Linux - Software 0 10-06-2003 06:52 AM
Mail Queue... shibata Linux - Networking 1 11-24-2001 08:58 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 PM.

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