LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script (https://www.linuxquestions.org/questions/linux-newbie-8/script-764462/)

saran_redhat 10-26-2009 01:10 AM

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

linuxlover.chaitanya 10-26-2009 01:26 AM

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.

divyashree 10-26-2009 06:19 AM

Quote:

Originally Posted by saran_redhat (Post 3732535)
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.

saran_redhat 10-27-2009 02:31 AM

script
 
Quote:

Originally Posted by divyashree (Post 3732742)
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

chrism01 10-27-2009 07:43 PM

There's no errors there, just informational stuff. What is the exact error msg or symptoms?

divyashree 10-29-2009 04:15 AM

Quote:

Originally Posted by saran_redhat (Post 3733807)
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,


All times are GMT -5. The time now is 02:25 AM.