How to install Open Webmail 2.54 on CentOS Linux 8 ================================================== By Thomas Chung Last Update 2023.04.03 ## CentOS Linux Release Dates 2021.11.16 - CentOS Linux 8.5 (2111) released (This is the last CentOS Linux 8) https://lists.centos.org/pipermail/centos-announce/2021-November/048371.html 2021.06.03 - CentOS Linux 8.4 (2105) released https://lists.centos.org/pipermail/centos-announce/2021-June/048316.html 2020.12.08 - CentOS Project shifts focus to CentOS Stream (CentOS Linux 8 will be EOL on *Dec 2021*) https://blog.centos.org/2020/12/future-is-centos-stream/ 2020.12.07 - CentOS Linux 8.3 (2011) released https://lists.centos.org/pipermail/centos-announce/2020-December/035874.html 2020.06.15 - CentOS Linux 8.2 (2004) released https://lists.centos.org/pipermail/centos-announce/2020-June/035756.html 2020.01.15 - CentOS Linux 8.1 (1911) released https://lists.centos.org/pipermail/centos-announce/2020-January/035599.html 2019.09.24 - CentOS Linux 8.0 (1905) released https://lists.centos.org/pipermail/centos-announce/2019-September/023449.html ## Open Webmail 2.54 Patch for EL8 2023.04.03 - Update el8_openwebmail-send.pl.patch 2020.02.14 - Add el8_openwebmail-read.pl.patch 2020.01.19 - Add el8_openwebmail-abook.pl.patch 2019.11.05 - Rebuild Open Webmail 2.54 RPM pkgs for EL8 Build missing perl-Text-Iconv for EL8 Add 4 patches to be compatible with perl 5.26 for EL8 1) Install and Configure postfix and httpd ## Install postfix if not installed # yum -y install postfix # systemctl enable postfix && systemctl start postfix !!! WARNING !!! There may be a restriction for outgoing mail (SMTP port 25) by your ISP/Cloud Provider. Please check with them if you're not able to send mail due to their restriction. You can check with a simple telnet test to confirm: $ telnet remotehost 25 Trying {ip_address_of_remotehost}... Also you need to check following parameter to accept incoming mail: # postconf inet_interfaces inet_interfaces = all If you see "localhost", set it to "all" and restart postfix: # postconf -e "inet_interfaces = all" # systemctl restart postfix ## Install httpd if not installed # yum -y install httpd # systemctl enable httpd && systemctl start httpd ## Update firewall to accept smtp (port 25) and http (port 80) # firewall-cmd --permanent --zone=public --add-service=smtp --add-service=http # firewall-cmd --reload # firewall-cmd --list-services 2) Install "Development Tools" group if not installed # yum -y groupinstall "Development Tools" 3) Configure openwebmail repository for EL8 # yum -y install yum-utils !! New Repo as of 2022.04.02 !! # yum-config-manager --add-repo https://openwebmail.org/repo/el8/openwebmail-el8.repo 4) Install openwebmail pkgs for EL8 # yum -y install openwebmail (this may install over 100+ perl packages) 5) Run openwebmail-tool to initialize # /usr/local/bin/openwebmail-tool --init The version of Perl on your system (5.026003) does not support set user id. Attempting to wrap the openwebmail perl files in a C wrapper to enable set user id capability... Found C compiler /usr/bin/cc wrapping file: openwebmail-abook.pl...done wrapping file: openwebmail-advsearch.pl...done wrapping file: openwebmail-cal.pl...done wrapping file: openwebmail-folder.pl...done wrapping file: openwebmail-main.pl...done wrapping file: openwebmail-prefs.pl...done wrapping file: openwebmail-read.pl...done wrapping file: openwebmail-saprefs.pl...done wrapping file: openwebmail-send.pl...done wrapping file: openwebmail-spell.pl...done wrapping file: openwebmail-tool.pl...done wrapping file: openwebmail-vdomain.pl...done wrapping file: openwebmail-viewatt.pl...done wrapping file: openwebmail-webdisk.pl...done wrapping file: openwebmail.pl...done creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done. creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done. creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done. Creating UTF-8 locales... langconv ar_AE.CP1256 -> ar_AE.UTF-8 langconv ar_AE.ISO8859-6 -> ar_AE.UTF-8 langconv bg_BG.CP1251 -> bg_BG.UTF-8 langconv ca_ES.ISO8859-1 -> ca_ES.UTF-8 langconv cs_CZ.ISO8859-2 -> cs_CZ.UTF-8 langconv da_DK.ISO8859-1 -> da_DK.UTF-8 langconv de_DE.ISO8859-1 -> de_DE.UTF-8 langconv el_GR.ISO8859-7 -> el_GR.UTF-8 langconv en_US.ISO8859-1 -> en_US.UTF-8 langconv es_AR.ISO8859-1 -> es_AR.UTF-8 langconv fi_FI.ISO8859-1 -> fi_FI.UTF-8 langconv fr_FR.ISO8859-1 -> fr_FR.UTF-8 langconv he_IL.CP1255 -> he_IL.UTF-8 langconv hr_HR.ISO8859-2 -> hr_HR.UTF-8 langconv hu_HU.ISO8859-2 -> hu_HU.UTF-8 langconv id_ID.ISO8859-1 -> id_ID.UTF-8 langconv it_IT.ISO8859-1 -> it_IT.UTF-8 langconv ko_KR.eucKR -> ko_KR.UTF-8 langconv lt_LT.CP1257 -> lt_LT.UTF-8 langconv nl_NL.ISO8859-1 -> nl_NL.UTF-8 langconv no_NO.ISO8859-1 -> no_NO.UTF-8 langconv pl_PL.ISO8859-2 -> pl_PL.UTF-8 langconv pt_BR.ISO8859-1 -> pt_BR.UTF-8 langconv pt_PT.ISO8859-1 -> pt_PT.UTF-8 langconv ro_RO.ISO8859-2 -> ro_RO.UTF-8 langconv ru_RU.KOI8-R -> ru_RU.UTF-8 langconv sk_SK.ISO8859-2 -> sk_SK.UTF-8 langconv sl_SI.CP1250 -> sl_SI.UTF-8 langconv sr_CS.ISO8859-2 -> sr_CS.UTF-8 langconv sv_SE.ISO8859-1 -> sv_SE.UTF-8 langconv th_TH.TIS-620 -> th_TH.UTF-8 langconv tr_TR.ISO8859-9 -> tr_TR.UTF-8 langconv uk_UA.KOI8-U -> uk_UA.UTF-8 ...done. Welcome to the OpenWebMail! This program is going to send a short message back to the developer, so we could have the idea that who is installing and how many sites are using this software, the content to be sent is: OS: Linux 4.18.0-80.11.2.el8_0.x86_64 x86_64 Perl: 5.026003 WebMail: OpenWebMail 2.54 20141206 Send the site report?(Y/n) Y sending report... 6) Run it again to fix permission # /usr/local/bin/openwebmail-tool --fix Permission and Ownership for openwebmail files have been fixed! 7) Disable selinux and reboot # vi /etc/selinux/config SELINUX=disabled # reboot ... # sestatus 7.5) Reload httpd (if you haven't rebooted) # systemctl reload httpd 8) Open a Browser and login to webmail URL with non-root user account http://{hostname}/webmail ## Possible Error Messages "Please execute '/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init' on server first!" ==> You may have skipped to run openwebmail-tool with init option # /usr/local/bin/openwebmail-tool --init "'/var/www/cgi-bin/openwebmail/.openwebmail.pl' must setuid to root" ==> You may have skipped to run openwebmail-tool with fix option # /usr/local/bin/openwebmail-tool --fix ## If all fails, you may need to perform a clean install # yum -y remove openwebmail # rm -rf /var/www/cgi-bin/openwebmail/ # rm -rf /var/www/data/openwebmail/ # yum -y install openwebmail # /usr/local/bin/openwebmail-tool --init # /usr/local/bin/openwebmail-tool --fix