LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-14-2009, 02:26 AM   #1
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Rep: Reputation: 15
Hiding host name in Squirrelmail error pages


Hi Guys,

Is there any way to prevent squirrelmail from displaying the host name on the error pages?

When user is trying to logging to the squirrelmail server, if the user name or password is wrong, or server is refusing the connection, like wise squirrelmail is displaying those error including the host name.

Thanks a lot...
 
Old 07-14-2009, 07:09 PM   #2
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
If it's not in the config file maybe you can look the the php file that processes login. I'm not sure what it is maybe index.php?
 
Old 07-17-2009, 01:16 AM   #3
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Original Poster
Rep: Reputation: 15
Hello friend,

Thank you for your response.

I'm not finding that in the files you mentioned. Also I have checked all the suspected files. But I cant find anywhere. My problem is when server is unreachable or not ready to receive connections, squirrelmail is showing error like:
connection refused by the server "MY SERVER NAME"... Here I dont want it to display my hostname....

Please help me to find out the solution.
 
Old 07-17-2009, 01:52 AM   #4
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Does it mention anywhere on the page "apache" is this the server you are using? And are you accessing the site via http://hostname/ ? Please post the entire error and maybe a snippet from error_log
 
Old 07-17-2009, 02:39 AM   #5
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Original Poster
Rep: Reputation: 15
Hi,

Users are accessing the webmail server using the registered host name.

The error that divulging the host name of my incoming mail server is only occurring if my imap server is not available. And the exact error is:

Webmail ERROR:

Error connecting to IMAP server: <imap server host name>
111: Connection refused

Go to login page


And no where in the page mentioned about apache.
 
Old 07-17-2009, 02:40 AM   #6
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Original Poster
Rep: Reputation: 15
Hi,

Users are accessing the webmail server using the registered host name.

The error that divulging the host name of my incoming mail server is only occurring if my imap server is not available. And the exact error is:

Webmail ERROR:

Error connecting to IMAP server: <imap server host name>
111: Connection refused

Go to login page


And no where in the page mentioned about apache.
 
Old 07-17-2009, 08:59 PM   #7
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Quote:
Originally Posted by haariseshu View Post
Hi,

Users are accessing the webmail server using the registered host name.
OK. I think this is a built-in variable "$SERVER_NAME" so you will have to change this in the config to have it have another value. Say in virtual host section (ServerName) or if you are using the default server you will need to change the hostname on the whole machine.

Or you can find the file thats spitting the error (just look at the file name in your browser) and open that file. And find the part where is output's servename in php I think it's:
Code:
$_SERVER['SERVER_NAME']
Quote:
Error connecting to IMAP server: <imap server host name>
111: Connection refused
This looks to be as if your IMAP server is not running. Can you access it without squirrelmail? look for a running process:
Code:
ps waux | grep imap

Last edited by micxz; 07-17-2009 at 08:59 PM. Reason: spelling
 
Old 07-18-2009, 01:28 AM   #8
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Original Poster
Rep: Reputation: 15
Hi,

Thank you for your response.

In the error page, url pointing redirect.php file. But in that file I'm unable to find any parameter similar to the one you told, i.e. "SERVER_NAME or $_SERVER_NAME" etc."

And as I told you, I know that this error occurs because of the non-availability of the IMAP server. To avoid this error page, I can stop the httpd service if my IMAP is not available so that users will get some other error page like "Page cannot be displayed" etc...

But only thing if we are unaware of the non-availability of the IMAP server then my Squirrelmail is going to divulge the IMAP server information like this.

So only I want to know is there any way to change the error page that Squirrelmail is displaying by default.
 
Old 07-18-2009, 02:07 AM   #9
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Quote:
Originally Posted by haariseshu View Post
I know that this error occurs because of the non-availability of the IMAP server.
Quote:
Originally Posted by haariseshu View Post
But only thing if we are unaware of the non-availability of the IMAP server then my Squirrelmail is going to divulge the IMAP server information like this.
I'm lost. "I know"/"unaware"
 
Old 07-18-2009, 02:12 AM   #10
haariseshu
Member
 
Registered: Jan 2008
Location: Noida, India
Distribution: RHEL
Posts: 81

Original Poster
Rep: Reputation: 15
Hey,

I'm sorry. What I mean is if suppose my IMAP server is going to down as unplanned, like server crash or similar to that end user will get the error page holding the server information. Isn't it.
 
Old 07-18-2009, 12:41 PM   #11
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Correct unless as I explained above you are able to find the file which produces this output.
 
  


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
Squirrelmail Error talat Linux - Software 0 11-27-2007 02:04 AM
After sign out squirrelmail shows previouly visited pages when using IE browser back kumar.craja Linux - Server 12 05-26-2007 01:58 AM
Squirrelmail shows previously visited pages after signing out kumar.craja Linux - Software 1 05-25-2007 01:35 PM
i m getting the error unknown host while im pinging with the host name gunjan thakkar Linux - General 2 12-14-2004 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:06 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