Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th March 2010, 23:59
linuxlover linuxlover is offline
Junior Member
 
Join Date: Mar 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default How to make squirrelmail to talk to courier on different machine

Hi
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 10.10.0.200. I have a production webserver on 10.10.0.54. The gateway for both these servers is at 10.10.0.51. 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 10.10.0.54.

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 10.10.0.54, so I can't just forward port 80 to the email server. I was thinking to install squirrelmail on the werbserver at 10.10.0.54. How will I configure it to connect to courier on 10.10.0.200 ?

Also, I have four websites running on my webserver, so i want all of them to access their mail by going to mail.domain.com. By default, squirrelmail is accessed by going to www.domain.com/webmail.
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.
Reply With Quote
Sponsored Links
  #2  
Old 12th March 2010, 10:38
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

Just point the imap and smtp configurations to the machine running the services
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 12th March 2010, 22:31
linuxlover linuxlover is offline
Junior Member
 
Join Date: Mar 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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

$domain = 'localhost';
$imapServerAddress = '10.10.0.200';
$imapPort = 143;
$useSendmail = true;
$smtpServerAddress = '10.10.0.200';
$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!
Reply With Quote
  #4  
Old 12th March 2010, 22:35
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

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.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #5  
Old 12th March 2010, 23:04
linuxlover linuxlover is offline
Junior Member
 
Join Date: Mar 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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

it seems like it logs me out automatically...
any suggestions?
Reply With Quote
  #6  
Old 12th March 2010, 23:14
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

That is normal behavior for a http client.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #7  
Old 12th March 2010, 23:38
linuxlover linuxlover is offline
Junior Member
 
Join Date: Mar 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #8  
Old 13th March 2010, 07:46
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

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.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #9  
Old 14th March 2010, 04:20
linuxlover linuxlover is offline
Junior Member
 
Join Date: Mar 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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 ?
Reply With Quote
  #10  
Old 14th March 2010, 08:46
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
 
Default

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.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10) keyslapper HOWTO-Related Questions 4 20th April 2010 15:46
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) Master One HOWTO-Related Questions 4 1st July 2009 15:38
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) VTCop HOWTO-Related Questions 9 9th April 2009 16:17
Virtual Users And Domains W/ Postfix, Courier and MySql + Squirrelmail prob nsurge HOWTO-Related Questions 10 23rd October 2006 17:43
Squirrelmail, dovecot IMAP and sendmail - how to make it work? webcho Server Operation 3 29th June 2006 16:14


All times are GMT +2. The time now is 23:21.


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