• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Webmail question

klapwi

New Pleskian
Hello,
need a quick fix/workaround for roundcube webmail

need to change webmail.domain.com to domain.com/mail

please provide answer

br, klawi
 
yes i have read it and change is but without any effect

copy /usr/local/psa/admin/conf/templates/default/domainWebmail.php
to
/usr/local/psa/admin/conf/templates/custom/domainWebmail.php

and change in file
"webmail.<?php echo $VAR->domain->asciiName ?>"
to
"<?php echo $VAR->domain->asciiName ?>/mail"

run than /usr/local/psa/admin/bin/httpdmng --reconfigure-all

but it takes no effect. on webmail.domain.com i have standard plesk website and on domain.com/mail i have 404
Not Found
 
got the same issue too.

the problem is the ServerAlias in the /usr/local/psa/admin/conf/templates/custom/domainWebmail.php file.

i have no idea how to fix that..
 
Please be aware that if you use NGINX as well, you should as well do the changes as described for the nginx - related templates.
 
im not using NGINX, im using apache 2.4.7.
we have one single domain ssl-cert and want to change webmail.domain.tld to domain.tld/webmail so it is secured with the single domain certificate..

regards
 
Hi Fabio_Hansen,

could to explain, WHERE do you have difficulties in changing the templates as suggested in the Plesk online documentation?
 
First thanks for the reply.
I'm having trouble changing the subdomain webmail.domain.com to domain.com/webmail.
I do not know where I change to work that way.
I amending:

ServerAlias "webmail. <? Php echo $ VAR> domain-> asciiName?>"
<? php foreach ($ VAR> domain-> mailAliases AS $ alias):>
ServerAlias "webmail. <? Php echo $ alias-> asciiName?>"
<? php endforeach; ?>

to

ServerAlias "<? Php echo $ VAR> domain-> asciiName?> / Webmail"
<? php foreach ($ VAR> domain-> mailAliases AS $ alias):>
ServerAlias "<? Php echo $ alias-> asciiName?> / Webmail"
<? php endforeach; ?>

But when I try to access domain.com/webmail gain in response server not found.

Where should I really change domain.com/webmail to work?
 
Hi Fabio_Hansen,

the correct usage would be:

ServerAlias "<? Php echo $ VAR> domain-> asciiName?>/webmail"
<? php foreach ($ VAR> domain-> mailAliases AS $ alias):>
ServerAlias "<? Php echo $ alias-> asciiName?>/webmail"
<? php endforeach; ?>

... and afterwards, please don't forget to re-build your domain configuration files with the commands:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain YOURDOMAIN.COM
/usr/local/psa/admin/sbin/httpdmng --reconfigure-server

Please be aware, that URLs can't have spaces at all and please don't forget, NOT to edit the standard templates, but instead use a "custom" folder at "/opt/psa/admin/conf/templates" for custom templates, as described in the mentioned documentation.



The changes should be made at the CUSTOM templates - folder for:

domainWebmail.php
nginxDomainWebmail.php

Edited 25.05.2016:
My apologies for this suggestion... it will not work at all, because slashes can't be used in "server_name". Pls. consider to use the suggestion at: https://talk.plesk.com/threads/change-webmail-domain-com-to-domain-com-mail.338156/#post-802451
 
Last edited by a moderator:
@Lloyd_mcse @UFHH01

I have to the following
cp /usr/local/psa/admin/conf/templates/default/nginxDomainWebmail.php /usr/local/psa/admin/conf/templates/custom/
cp /usr/local/psa/admin/conf/templates/default/domainWebmail.php /usr/local/psa/admin/conf/templates/custom/


edit the files:
Bildschirmfoto vom 2015-06-04 22:25:51.png Bildschirmfoto vom 2015-06-04 22:26:23.png

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

But nothing has changed? forgot something?
 
Hi omexlu12,

did you try to restart apache/nginx and php5-fpm ?
Did you experience any issue, while reconfiguring ( error - messages? ).
 
@UFHH01

I don't restart anything (php5-fpm for nginx not installed) and also don't get any error when reconfigure-all (or is there any logs for that?)

nginxDomainWebmail.php & domainWebmail.php is that all what must be changed or have i forgotten something? (i use apache/nginx combination)
 
Hi omexlu12,

the error message would be right after your command and should be as well logged in your "/var/log/sw-cp-server/error_log".

Please restart your webserver manually with the commands:

service apache2 restart ( On CentOS/Redhat.... please use httpd instead! )
service nginx restart
... and please report errors from the mentioned log or/and from the command line.
 
@UFHH01

The log has no entry but after restarting nginx i get these errormessages:
IMAGE REMOVED BECAUSE SENSIBLE DATA
 
Last edited:
Hi omexlu12,

I assume that you used "copy&paste" instead of TYPING the additional "/webmail". As you can see, your browser copied symbols and/or signs and/or spaces, which are unnecessary and which are only used to format forum posts. Please edit your copied templates again and please TYPE your changes, instead of copying them from the forum.
Afterwards, please reconfigure again with your previous command and ( if necessary ) restart apache and nginx again.
 
@UFHH01

I have repeat following:
cp /usr/local/psa/admin/conf/templates/default/nginxDomainWebmail.php /usr/local/psa/admin/conf/templates/custom/
cp /usr/local/psa/admin/conf/templates/default/domainWebmail.php /usr/local/psa/admin/conf/templates/custom/

edit the files with nano append /mail and remove webmail.

service apache2 restart
service nginx restart

same error as above. no copy/paste as befor.
 
Hi omexlu12,

and you did as well reconfigure the configuration files with:

/usr/local/psa/admin/bin/httpdmng --reconfigure-all
before you restarted the webservers?
 
@UFHH01

Yes Sir.

Steps:
cp /usr/local/psa/admin/conf/templates/default/nginxDomainWebmail.php /usr/local/psa/admin/conf/templates/custom/
cp /usr/local/psa/admin/conf/templates/default/domainWebmail.php /usr/local/psa/admin/conf/templates/custom/
nano /usr/local/psa/admin/conf/templates/custom/domainWebmail.php
nano /usr/local/psa/admin/conf/templates/custom/nginxDomainWebmail.php

edit manually with nano both files

/usr/local/psa/admin/bin/httpdmng --reconfigure-all
service apache restart
service nginx restart

I have give it i try multiple times but i receive always these erros after restarting nginx.
 
Last edited:
Back
Top