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 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: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:49 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
Open Source Consulting | Domain Registration