wait you updated snappymail? so if i run this version update on the server it should work?
Welcome @Murex Happy you are here
if you do not have any technical ability I do not advice you upgrade snappymail if it works perfectly with standard cyberpanel installation.
The upgrade will not cause any issues unless there are unknown issues with latest release. Also I advice my clients not use any latest releases of any software for production.
hello, iâm getting the same issues the OP, and trying to solve it , so far only webmailDOTdomainDOTcom/snappymail redirects properly and iâm trying to remove that last bit , tried another redirect from webmail.domain.com to webmailDOTdomainDOTcom/snappymail
and forsome strange reason it will not work! so i was wondering if this is only because the cyberpanel version of snappy has an issue .
CyberPanelâs version of snappymail is downloaded straight from the source during installation and it is not a modified version or anything.
I recommend that you guys donât try to reverse proxy snappymail.
I figured it out . after looking into the log I realized that the redirect link keeps going into snappymail/snappymail which is creating all the problems , the solution was editing the intial redirect to https to add /snappymail , like that .
RewriteRule ^/?(.*) https://%{SERVER_NAME}/snappymail/$1 [R,L]
so when the Proxy is taking the server name it applies snappymail right away hence
RewriteRule ^(.*)$ HTTP://cyberpanel/$1 [P]
this way it works and logs in
hope it helps the others.
@Murex no that would not work. See this
This should work. This is the solution.
Thanks a lot for your time! iâve never seen such awesome support and community before!
your solution works like a redirect. basically people will put their mail. address and then get redirected to the cyberpanel main address with snappy
meaning if they put mailDOTdomainDOTcom they will see on the address bar
CyberpanelDOTserverdomainDOTcom/snappymail/
which is not the intended outcome.
i was thinking of setting up another proxy to mask the cyberpanel main domain page . however the solution i provided earlier is satisfying , i dont want the server domain to show up.
thats why iâm still using the proxy that was set up to cover the 8090 port
@Murex post your rewrite rules I revert if it works as intended
hello again, thanks again for all your help
so i set up the rewrite rules as so
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/snappymail/$1 [R,L]
RewriteCond %{HTTP_HOST} ^webmail.domainname.com$
RewriteRule ^(.*)$ HTTP://cyberpanel/$1 [P]
keep in mind that the above code handles everything, because I changed the rewrite code from cyber panel
these ones
Rewrite Rules Added by CyberPanel Rewrite Rule Generator
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
End CyberPanel Generated Rules.
keep in mind that I followed this tutorial before remove port 8090
My friend this part will redirect to admin panel:
RewriteCond %{HTTP_HOST} ^webmail.domainname.com$
RewriteRule ^(.*)$ HTTP://cyberpanel/$1 [P]
it wont because i already kept snappymail in the original redirect .here
RewriteRule ^/?(.*) https://%{SERVER_NAME}/snappymail/$1 [R,L]
so . webmail.domainname.com is redirecting to https webmail domainname com / snappymail
then its checks http_host for webmail.domainname.com and proxy it with the cyberpanelproxy which we set up server side
and so it takes you to webmail.domainname.com/snappymail
its working as intended ⌠iâm using it as we speak
Hey, I followed the tutorial you linked here. it works. but at the end of the day, redirects your address bar url to mydomain.com/snappymail. is there any way to keep the 301 rule and keep the address in the address bar to webmail.domain.com
Here is the log that shows this errorâŚ
[2022-12-19 19:34:25.660][af79299e] INFO[DATA]: [DATE:2022-12-19 UTC][SM:2.15.3][IP:192.168.15.254][PID:92997][LiteSpeed][litespeed][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3]
[2022-12-19 19:34:25.660][af79299e] REQUEST[NOTE]: [GET] https://mail.mydomain.com/snappymail/
[2022-12-19 19:34:25.689][af79299e] INFO[MEMORY]: Memory peak usage: 2MB
[2022-12-19 19:34:25.689][af79299e] INFO[TIME]: Time delta: 0.07535195350647
[2022-12-19 19:34:27.169][b0f025b2] INFO[DATA]: [DATE:2022-12-19 UTC][SM:2.15.3][IP:192.168.15.254][PID:92997][LiteSpeed][litespeed][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3]
[2022-12-19 19:34:27.169][b0f025b2] REQUEST[NOTE]: [GET] https://mail.mydomain.com/snappymail/?/AppData/0/17282663328686265/
[2022-12-19 19:34:27.171][b0f025b2] APPDATA[DATA]: rl.initData({âAuthâ:false,âAccountHashâ:ââ,âAccountSignMeâ:false,âMailToEmailâ:ââ,âEmailâ:ââ,âDevEmailâ:ââ,âDevPasswordâ:ââ,âTitleâ:âSnappyMail Webmailâ,âLoadingDescriptionâ:âSnappyMailâ,âFaviconUrlâ:ââ,âLoginDefaultDomainâ:ââ,âhideSubmitButtonâ:false,âDetermineUserLanguageâ:true,âDetermineUserDomainâ:true,âSieveAllowFileintoInboxâ:false,âContactsIsAllowedâ:false,âAdminâ:,âCapaâ:,âPluginsâ:,âSystemâ:{âversionâ:â2.15.3â,âadminâ:false,âtokenâ:âae193d0888b7f9a0aebe8aa0abff51f46d6ccfd4â,âinIframeâ:false,âallowHtmlEditorBitiButtonsâ:false,âallowCtrlEnterOnComposeâ:true,âuseImapThreadâ:true,âallowAppendMessageâ:false,âfolderSpecLimitâ:50,âlistPermanentFilteredâ:false,âthemesâ:[âDefaultâ,âAâ,âBlurredâ,âDarkShineâ,âLinenâ,âLoveâ,âSnowâ,âSnowDarkV1â,âSquaresâ,âSquaresDarkâ,âStripesâ,âWoodâ,âXvâ,âClearâ],âlanguagesâ:[âar-SAâ,âbg-BGâ,âcs-CZâ,âda-DKâ,âde-DEâ,âel-GRâ,âenâ,âen-USâ,âes-ESâ,âet-EEâ,âfa-IRâ,âfi-FIâ,âfr-FRâ,âhu-HUâ,âid-IDâ,âis-ISâ,âit-ITâ,âja-JPâ,âko-KRâ,âlt-LTâ,âlv-LVâ,ânb-NOâ,ânl-NLâ,âpl-PLâ,âpt-BRâ,âpt-PTâ,âro-ROâ,âru-RUâ,âsk-SKâ,âsl-SIâ,âsv-SEâ,âtr-TRâ,âuk-UAâ,âzh-CNâ,âzh-TWâ],âlanguagesAdminâ:[âcs-CZâ,âda-DKâ,âde-DEâ,âenâ,âes-ESâ,âfa-IRâ,âfi-FIâ,âfr-FRâ,âhu-HUâ,âid-IDâ,âit-ITâ,âja-JPâ,âlt-LTâ,ânb-NOâ,ânl-NLâ,âpl-PLâ,âpt-BRâ,âru-RUâ,âsk-SKâ,âsl-SIâ,âsv-SEâ,âzh-CNâ],âattachmentsActionsâ:[âzipâ],âcustomLogoutLinkâ:ââ},âNewMoveToFolderâ:true,âAllowLanguagesOnSettingsâ:true,âAllowLanguagesOnLoginâ:true,âAttachmentLimitâ:2097152,âSignMeâ:âDefaultOffâ,âUseLocalProxyForExternalImagesâ:true,âViewHTMLâ:true,âShowImagesâ:false,âRemoveColorsâ:false,âMessagesPerPageâ:20,âMessageReadDelayâ:5,âSoundNotificationâ:true,âNotificationSoundâ:ânew-mailâ,âDesktopNotificationsâ:true,âLayoutâ:1,âEditorDefaultTypeâ:âHtmlâ,âUseCheckboxesInListâ:true,âAutoLogoutâ:30,âUseThreadsâ:false,âAllowDraftAutosaveâ:true,âReplySameFolderâ:false,âContactsAutosaveâ:true,âHideUnsubscribedâ:false,âMainEmailâ:ââ,âKolabContactFolderâ:ââ,âUserBackgroundNameâ:ââ,âUserBackgroundHashâ:ââ,âAdditionalLoginErrorâ:ââ,âThemeâ:âDefaultâ,âLanguageâ:âen-USâ,âUserLanguageâ:âen-USâ,âPluginsLinkâ:ââ,âStaticLibsJsâ:â/snappymail/snappymail/v/2.15.3/static/js/min/libs.min.jsâ});
[2022-12-19 19:34:27.171][b0f025b2] INFO[MEMORY]: Memory peak usage: 2MB
[2022-12-19 19:34:27.171][b0f025b2] INFO[TIME]: Time delta: 0.0051159858703613
Welcome @saidearly Happy you are here
Run
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
If using a sudo user rather than root, try this:
sudo su - -c "sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)"
Already on the latest release. I have even done fresh installation couple times. But the error is the same.
Run
$ rm -rf /usr/local/CyberCP/public/snappymail
$ rm -rf /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs
# RUN CYBERPANEL UPGRADE AS IT WILL DO EVERYTHING FOR YOU
# run the rest if you want to personalize (not recommended for beginners)
$ wget https://github.com/the-djmaze/snappymail/releases/download/v2.17.0/snappymail-2.17.0.zip
$ unzip snappymail-2.17.0.zip -d /usr/local/CyberCP/public/snappymail
$ cd /usr/local/CyberCP/public/snappymail
$ find . -type d -exec chmod 755 {} \;
$ find . -type f -exec chmod 644 {} \;
$ mkdir -p /usr/local/lscp/cyberpanel/rainloop/data
$ mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/
$ mkdir snappymail configs
$ cat << EOF >> /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini
[labs]
imap_folder_list_limit = 0
autocreate_system_folders = On
EOF
$ cat << EOF >> /usr/local/CyberCP/public/snappymail/snappymail/v/2.17.0/include.php
$sCustomDataPath = '/usr/local/lscp/cyberpanel/rainloop/data';
EOF
# you will need to comment out any other $sCustomDataPath = before the one we appended above
$ cat << EOF >> /usr/local/CyberCP/public/snappymail/_include.php
define('APP_DATA_FOLDER_PATH', '/usr/local/lscp/cyberpanel/rainloop/data/');
EOF
$ cat << EOF >> /usr/local/CyberCP/public/snappymail/include.php
define('APP_DATA_FOLDER_PATH', '/usr/local/lscp/cyberpanel/rainloop/data/');
EOF
$ mkdir snappymail configs
$ sed -i 's|autocreate_system_folders = Off|autocreate_system_folders = On|g' 2.17.0
Followed your direction with Cyberpanel upgrade. Results = same error after upgrade.
Then I tried manual process following you steps
and getting the errors at the end
root@trahezy:/usr/local/CyberCP/public/snappymail# mkdir snappymail configs
mkdir: cannot create directory âsnappymailâ: File exists
mkdir: cannot create directory âconfigsâ: File exists
root@trahezy:/usr/local/CyberCP/public/snappymail# sed -i âs|autocreate_system_folders = Off|autocreate_system_folders = On|gâ 2.17.0
sed: canât read 2.17.0: No such file or directory
I switched into the directory v where 2.17.0 directory is located and got this
root@trahezy:/usr/local/CyberCP/public/snappymail/snappymail/v# sed -i âs|autocreate_system_folders = Off|autocreate_system_folders = On|gâ 2.17.0
sed: couldnât edit 2.17.0: not a regular file
Did you remove the previous snappymail installation v2.18.6 as i advised above?
Yes. I did. I just repeated again the process and after cyberpanel upgrade. i did snappymail version change to 2.17.0.
Got same error
Have you seen this Error 500 on webmail.example1.net