Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th January 2013, 02:43
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default Regarding mail ports

Just wondering how do you find out what the default ports the mail server is running on, like incomming and outgoing? And can they be changed?
Reply With Quote
Sponsored Links
  #2  
Old 5th January 2013, 11:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Smtp: 25
pop3: 110
imap: 143
imaps: 993
pop3s: 995
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 5th January 2013, 15:58
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default

Ok I see so they are defaulted, just wanted to be sure, so I installed roundcube on the mail server which responds to internal ip of 192.168.0.10/roundcube but it doesnt respond to the hostname of mail.example.com

I made these changes in ispconfig on the cpanel server: (ubuntu)

/usr/local/ispconfig/interface/web/mail/webmailer.php



isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
$http = 'http';
header('Location:' . $http . '://' . $serverData['server_name'] . '/roundcube');


now it redirects properly but doesn't pull up roundcube, rather I get page not found error.
Reply With Quote
  #4  
Old 5th January 2013, 21:37
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default

Also, would it have been better to install roundcube to the panel server and change the config files to connect to the mail server? Then make changes to ispconfig so it connects to roundcube on local host? Right now I am at a stand stil trying to make ispconfig load the roundcube off the mailserver and then giving it the ablity to access externally...
Reply With Quote
  #5  
Old 5th January 2013, 23:41
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
Default

I create my own apache webmail redirection - which uses the default created subdomain mail.

Quote:
#/etc/httpd/conf/sites-available/_default.conf
<VirtualHost *:80>
ServerName mail.mydomain.com
ServerAlias mail.*
DocumentRoot /opt/squirrelmail.devel

<Directory /opt/squirrelmail.devel>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>
</VirtualHost>

<VirtualHost *:443>
ServerName mail.mydomain.com
ServerAlias mail.*
DocumentRoot /opt/squirrelmail.devel
ServerAdmin me@mydomain.com

SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
ErrorLog /var/log/httpd/squirrelmail-error_log
CustomLog /var/log/httpd/squirrelmail-access_log common

<Directory /opt/squirrelmail.devel>
Options +FollowSymLinks
Order allow,deny
allow from all
</Directory>

</VirtualHost>
Then i create a symbolic link in /etc/httpd/conf/sites-enabled to the _default.conf

What it does - for any sub-domain (i host a few virtual domains) of mail it gets redirected to my squirrelmail ( i have used roundcube too but its slow compared to sqm) and ssl used. I prefer this to mydomain.com/squirrelmail.


OR you can just create a roundcube.conf like this:

Quote:
#/etc/httpd/conf.d/roundcube.conf

Alias /roundcube /opt/roundcubemail-0.8.0
Alias /rc /opt/roundcubemail-0.8.0

<Directory /opt/roundcubemail-0.8.0>
Options +FollowSymLinks
Order allow,deny
allow from all

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>
This will work when someone users youdomain.com/roundcube or youdomain.com/rc. Change /opt/roundcubemail-0.8.0 to the directory where you have installed it.

Remember to restart httpd to make changes take effect.

Last edited by tahunasky; 6th January 2013 at 03:52.
Reply With Quote
The Following User Says Thank You to tahunasky For This Useful Post:
kendel (6th January 2013)
  #6  
Old 6th January 2013, 10:05
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default

I think I understand a little bit, but there was no apache installation on my mailserver, so do I put the virtual host on the webserver and point it to the internal IP somehow?
Reply With Quote
  #7  
Old 6th January 2013, 19:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,763
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Quote:
Originally Posted by kendel View Post
Ok I see so they are defaulted, just wanted to be sure, so I installed roundcube on the mail server which responds to internal ip of 192.168.0.10/roundcube but it doesnt respond to the hostname of mail.example.com
All you have to do is to create a alias in apache for this type of access like I described in the PM and tahunasky explained in detail in his post. The setup is described in the perfect setup guide for squirrelmail and the setup for roundcube is similar, you just change the paths from squirrelmail to roundcube.

E.g. for debian, chapter 20.2:

http://www.howtoforge.com/perfect-se...ispconfig-3-p6
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 7th January 2013, 03:09
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default

How can I check for errors, I did everything you listed and it still does not work.

I created a DNS A record for webmail.example.com with internal IP.

then I did the Virtual host record on the mailserver (hostname mail.example.com)

then I followed the rest of steps for squirrelmail except replacing with roundcube.

Externally it still does not work.

I also realized that I made 2 modifications to roundcube.. first was

nano /etc/apache2/conf.d/roundcube.conf
which I added
<VirtualHost 1.2.3.4:80>
DocumentRoot /usr/share/roundcube
ServerName webmail.example.com
</VirtualHost>


The second I created through webmin a virtual host on the apache server for the directory of /var/www/roundcube
Reply With Quote
  #9  
Old 7th January 2013, 08:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,763
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Then you might have done the same configuration 3 times. Please check that you added just one vhost for roundcube, it does not matter if you do this on the shell or with webmin. Then check the apache error.log for errors.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 7th January 2013, 17:14
kendel kendel is offline
HowtoForge Supporter
 
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post
Default

Here is a list of things that I did, maybe you can tell me where I went wrong.
First, I installed roundcube on the email server.
(using roundcube.0.8.4 on ubuntu 12.04)
Code:
oundCube

apt-get -y install apache2

Reconfigure Roundcube

aptitude install roundcube roundcube-mysql

dpkg-reconfigure roundcube-core



Create Symlink for RoundCube

sudo ln -s /usr/share/roundcube /var/www/roundcube

restart apache

So far this part works.
I then followed the link and substituted everything for roundcube.
Code:
nano /etc/apache2/conf.d/roundcube.conf
(note: there was already a file in that location called roundcube and contained some information I left untouched)

<Directory /usr/share/roundcube>
  Options FollowSymLinks
  <IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_admin_flag allow_url_fopen Off
    php_value include_path .
    php_admin_value upload_tmp_dir /var/lib/roundcube/tmp
    php_admin_value open_basedir /usr/share/roundcube:/etc/roundcube:/var/lib/roundcube:/etc/hostname:/etc/mailname:/var/spool/roundcube
    php_flag register_globals off
  </IfModule>
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
  # access to configtest is limited by default to prevent information leak
  <Files configtest.php>
    order deny,allow
    deny from all
    allow from 127.0.0.1
  </Files>
</Directory>


Create the directory /var/lib/roundcube/tmp...

mkdir /var/lib/roundcube/tmp

... and make it owned by the user www-data:

chown www-data /var/lib/roundcube/tmp  (this command does not seem to work)

Reload Apache again:

/etc/init.d/apache2 reload
I then used Webmin on the email server to create the virtual host:
Code:
DocumentRoot /var/www/roundcube
ServerName mail.lampxserver.com
ServerAdmin webmaster@localhost
ServerAlias webmail.*
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Directory /var/www/roundcube>
allow from all
Options +Indexes
</Directory>
Finally I created the DNS records by attaching an "A" record Host: subdomain webmail.example.com. IP: 192.168.10.180 (internal ip).

Last edited by kendel; 7th January 2013 at 17:21.
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
mysql and mail problem viritech General 3 16th October 2012 12:54
mail recipient linux_red Installation/Configuration 6 9th March 2012 14:24
Sendig mail Error fisherofer Installation/Configuration 12 30th November 2011 07:56
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37


All times are GMT +2. The time now is 01:40.


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