HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   HOWTO-Related Questions (
-   -   How to make squirrelmail to talk to courier on different machine (

linuxlover 12th March 2010 00:59

How to make squirrelmail to talk to courier on different machine
I followed this guide by falko:
[Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (CentOS 5.3 x86_64)]

Great guide!
I set up this mail server on I have a production webserver on The gateway for both these servers is at Above this gateway in the hierarchy is a firewall. For some reason, the gateway can't forward port 80 to the webserver and port 25 to the mail server. it is a one to one mapping. So whatever packets (be it http or smtp) arrive at the external ip, they are all forwarded to the webserver at

After I set up the mail server using the guide above, i was able to send out email, but not receive. Of course, because port 25 packets weren't reaching the email server. So I fixed this problem by using iptables prerouting and postrouting commands on the webserver. Basically I forwarded I port 25 packets arriving at the webserver to the email server.

Now my squirrelmail is installed on the mailserver as well. How to access this from the outside? There are websites from being served on the webserver at, so I can't just forward port 80 to the email server. I was thinking to install squirrelmail on the werbserver at How will I configure it to connect to courier on ?

Also, I have four websites running on my webserver, so i want all of them to access their mail by going to By default, squirrelmail is accessed by going to
I probably can set up a subdomain using apache virtual host directive. but i will need to change some setting in squirrelmail.conf under /etc/httpd/conf/cquirrelmail.conf. what would that be? I am a bit lost, please guide me.

I thank you all in advance for all ur help.

topdog 12th March 2010 11:38

Just point the imap and smtp configurations to the machine running the services

linuxlover 12th March 2010 23:31

So I installed squirrelmail on the webserver and edited /etc/squirrelmail/config.php and made the following changes.

$domain = 'localhost';
$imapServerAddress = '';
$imapPort = 143;
$useSendmail = true;
$smtpServerAddress = '';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';
$sendmail_args = '-i -t';
$pop_before_smtp = false;
$imap_server_type = 'courier';
$invert_time = false;
$optional_delimiter = '.';

Now, when I login from the squirrelmail web interface, I get a blank screen. Anything that I am missing? Any other setting that I need to change? Thanks guys!

topdog 12th March 2010 23:35

you are getting a blank screen because there is a typo in your config check the logs to see what is causing the fatal error.

linuxlover 13th March 2010 00:04

I am getting these logs on the mail server (/var/log/maillog)
Mar 12 16:51:27 mail1 imapd: Connection, ip=[::ffff:]
Mar 12 16:51:27 mail1 imapd: LOGIN,, ip=[::ffff:], port=[53566], protocol=IMAP
Mar 12 16:51:27 mail1 imapd: LOGOUT,, ip=[::ffff:], headers=0, body=0, rcvd=30, sent=238, time=0

it seems like it logs me out automatically...
any suggestions?

topdog 13th March 2010 00:14

That is normal behavior for a http client.

linuxlover 13th March 2010 00:38

Okay... but is it normal behavior for me to get a blank screen when i log in? Something must be wrong... Anyone else has any insight into this?

topdog 13th March 2010 08:46

I already told you the blank screen is due to a php fatal error, you need to check you httpd logs (not the maillog you posted back) to see what is causing it.

a web client does not connect to an imap server permanently it connects and then disconnects that's why i told you what you are seeing in the logs is normal behavior on the imap side.

linuxlover 14th March 2010 05:20

Sorry, i didn't know which logs to look for. This is the error I get in apache logs

[Sat Mar 13 20:13:50 2010] [error] [client 99.244.21*.***] File does not exist: /var/www/html/domain/favicon.ico
[Sat Mar 13 20:13:53 2010] [error] [client 99.244.21*.***] File does not exist: /var/www/html/domain/favicon.ico

Isn't favicon just a little image file that appears just before the url. Is this file that critical ?

topdog 14th March 2010 09:46

In that case turn on display_errors in your php.ini file and you will see the error in the screen instead of having a blank page.

All times are GMT +2. The time now is 03:45.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.