
5th January 2013, 02:43
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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?
|

5th January 2013, 11:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
Smtp: 25
pop3: 110
imap: 143
imaps: 993
pop3s: 995
|

5th January 2013, 15:58
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 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
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.
|

5th January 2013, 21:37
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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...
|

5th January 2013, 23:41
|
|
Member
|
|
Join Date: Jul 2012
Location: Buenos Aires
Posts: 54
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
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.
|
|
The Following User Says Thank You to tahunasky For This Useful Post:
|
|

6th January 2013, 10:05
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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?
|

6th January 2013, 10:33
|
|
Member
|
|
Join Date: Jul 2012
Location: Buenos Aires
Posts: 54
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Quote:
|
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
|
If you dont have apache installed how does roundcube work, as it needs a webserver running - either apache, nginx or something else !
Quote:
|
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?
|
I would suggest you install apache or nginx as if you try to run from another server, its going to be slower and more complicated to setup - and will be harder to learn/understand whats going on.
Unless its a large user base there really is no point. I have in the past had separate boxes running smtp and imap/webmail, but that was for a 1000 plus users, but most setups i do are for 20 to 100 users and i only ever have 1 box running postfix/dovecot/webmail, and the only other box i need is a backup mx, which is shared between several companies.
Last edited by tahunasky; 6th January 2013 at 10:38.
|

6th January 2013, 13:57
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 Post
|
|
Sorry I was mistaken it does have apache, I just wasn't using it as an apache server.
|

6th January 2013, 19:02
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
Originally Posted by kendel
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
|

7th January 2013, 03:09
|
|
HowtoForge Supporter
|
|
Join Date: Aug 2010
Posts: 131
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 21:59.
|
|
Recent comments
20 hours 37 min ago
1 day 1 hour ago
1 day 6 hours ago
1 day 7 hours ago
1 day 22 hours ago
1 day 22 hours ago
2 days 3 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 11 hours ago