LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-26-2009, 01:10 AM   #1
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Rep: Reputation: 16
Script


Dear Friends

In my office i have one mail server. That mail server having imap error simultaneously. when imap error comes in my mail server. we login to that server , and restart the server. then the problem solved.

my need is if its possible to write script when the imap error comes in server, it automatically restart server.please tel me how to do this. because i dont know scripting language.

Thanks
 
Old 10-26-2009, 01:26 AM   #2
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
It would be better is you try to find out the issue by going through the logs. It would give the reason for imap error.
 
Old 10-26-2009, 06:19 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by saran_redhat View Post
Dear Friends

In my office i have one mail server. That mail server having imap error simultaneously. when imap error comes in my mail server. we login to that server , and restart the server. then the problem solved.

my need is if its possible to write script when the imap error comes in server, it automatically restart server.please tel me how to do this. because i dont know scripting language.

Thanks

The script can be written after knowing the error,so post the error by checking the log file.
 
Old 10-27-2009, 02:31 AM   #4
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Original Poster
Rep: Reputation: 16
script

Quote:
Originally Posted by divyashree View Post
The script can be written after knowing the error,so post the error by checking the log file.
Thanks for u r reply


The following is the log we found when error comes.

Oct 27 12:57:52 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:57:52 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:57:52 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=0, body=3944, time=0
Oct 27 12:57:54 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:57:54 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:57:54 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=7146, body=0, time=0
Oct 27 12:58:02 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:58:02 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:58:03 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=7883, body=0, time=1
Oct 27 12:58:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:58:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:40 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:40 ipfmail imapd: LOGIN, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:40 ipfmail imapd: LOGOUT, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
Oct 27 12:59:40 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:40 ipfmail imapd: LOGIN, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 13:00:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 13:00:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP


Please give some solutions

Thanks
 
Old 10-27-2009, 07:43 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,345

Rep: Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365Reputation: 2365
There's no errors there, just informational stuff. What is the exact error msg or symptoms?
 
Old 10-29-2009, 04:15 AM   #6
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by saran_redhat View Post
Thanks for u r reply


The following is the log we found when error comes.

Oct 27 12:57:52 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:57:52 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:57:52 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=0, body=3944, time=0
Oct 27 12:57:54 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:57:54 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:57:54 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=7146, body=0, time=0
Oct 27 12:58:02 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:58:02 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:58:03 ipfmail imapd: LOGOUT, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], headers=7883, body=0, time=1
Oct 27 12:58:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:58:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:40 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:40 ipfmail imapd: LOGIN, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 12:59:40 ipfmail imapd: LOGOUT, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
Oct 27 12:59:40 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 12:59:40 ipfmail imapd: LOGIN, user=saran@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Oct 27 13:00:09 ipfmail imapd: Connection, ip=[::ffff:127.0.0.1]
Oct 27 13:00:09 ipfmail imapd: LOGIN, user=syed@ipfonline.com, ip=[::ffff:127.0.0.1], protocol=IMAP


Please give some solutions

Thanks
There seems no error here,
 
  


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
Runs Multiple shell script inside a main script using crontab srimal Linux - Newbie 4 10-22-2009 06:19 PM
How to get full path to script file inside script itself? And in case of sym links? maggus Linux - Newbie 3 05-28-2009 08:40 AM
ssh - using variables in call to start remote script from local script babag Linux - Networking 2 06-03-2008 04:50 PM
set variables in a bash script; ansi PS1 color script donnied Programming 4 11-21-2007 11:33 AM
Shell Script: want to insert values in database when update script runs ring Programming 2 10-25-2007 10:48 PM


All times are GMT -5. The time now is 07:19 AM.

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