How to install Open Webmail 2.54 on CentOS 8

2024-04-24 15:48
文章标签 install open centos webmail 2.54

本文主要是介绍How to install Open Webmail 2.54 on CentOS 8,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 1.安装

参考官文指导文件
How to install Open Webmail 2.54 on CentOS 8
============================================
By Thomas Chung <tchung@openwebmail.org>
Last Update 2020.12.10## Open Webmail 2.54 Test for CentOS 82020.12.07 - CentOS 8.3-2011 releasedhttps://lists.centos.org/pipermail/centos-announce/2020-December/035874.html2020.06.15 - CentOS 8.2-2004 releasedhttps://lists.centos.org/pipermail/centos-announce/2020-June/035756.html2020.01.15 - CentOS 8.1-1911 releasedhttps://lists.centos.org/pipermail/centos-announce/2020-January/035599.html2019.09.24 - CentOS 8.0-1905 releasedhttps://lists.centos.org/pipermail/centos-announce/2019-September/023449.html## Open Webmail 2.54 Patch for CentOS 82020.02.14 - Add el8_openwebmail-read.pl.patch2020.01.19 - Add el8_openwebmail-abook.pl.patch2019.11.05 - Rebuild Open Webmail 2.54 RPM pkgs for EL8Build missing perl-Text-Iconv for EL8Add 4 patches to be compatible with perl 5.26 for EL80. Install postfix and httpd if not installed# dnf install postfix
# systemctl enable postfix && systemctl start postfix# dnf install httpd
# systemctl enable httpd && systemctl start httpd# firewall-cmd --permanent --zone=public --add-service=smtp
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --reload
# firewall-cmd --list-services1. Download repo file for EL8# curl -s ftp://openwebmail.org/pub/openwebmail/el8/openwebmail-el8.repo -o /etc/yum.repos.d/openwebmail-el8.repo2. Install openwebmail for EL8# dnf install openwebmail3. Install gcc if not installed# dnf install gcc4. Run openwebmail-tool# /usr/local/bin/openwebmail-tool --initThe 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/ccwrapping file: openwebmail-abook.pl...donewrapping file: openwebmail-advsearch.pl...donewrapping file: openwebmail-cal.pl...donewrapping file: openwebmail-folder.pl...donewrapping file: openwebmail-main.pl...donewrapping file: openwebmail-prefs.pl...donewrapping file: openwebmail-read.pl...donewrapping file: openwebmail-saprefs.pl...donewrapping file: openwebmail-send.pl...donewrapping file: openwebmail-spell.pl...donewrapping file: openwebmail-tool.pl...donewrapping file: openwebmail-vdomain.pl...donewrapping file: openwebmail-viewatt.pl...donewrapping file: openwebmail-webdisk.pl...donewrapping file: openwebmail.pl...donecreating 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 20141206Send the site report?(Y/n) Y
sending report...# /usr/local/bin/openwebmail-tool --fixPermission and Ownership for openwebmail files have been fixed!5. Disable selinux and reboot# vi /etc/selinux/config
SELINUX=disabled6. Reload httpd# systemctl reload httpd7. Login to webmail URL with non-root user accounthttp://{hostname}/webmail

2.配置

修改配置文件

vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

  1. domainnames auto 改为 tsmt.com
  2. default_language en 改为 zh_CN.GB2312
  3. default_iconset Cool3D.English 改为支持中文 Cool3D.Chinese.Simplified

 3.启动

    service httpd restart

4.帐号

openwebmail是以系统用户和密码作为登录验证的

5.访问

以root用户名和密码登录,出现以下错误:

OpenWebMail ERROR:

无法写入 /var/log/openwebmail.log! (Permission denied)

查看该文件夹及文件权限,没有问题,甚至用CHMOD(chmod 777 /var/log/openwebmail.log)修改了一下,问题仍在。

通过编辑该文件:

vi /var/log/openwebmail.log

Sat Jan 23 22:22:51 2021 - [42810] (127.0.0.1) UNKNOWNUSER - send message - trying to connect to smtp server 127.0.0.1:25
Sat Jan 23 22:22:51 2021 - [42810] (127.0.0.1) UNKNOWNUSER - send message - connected to smtp server 127.0.0.1:25

得知,该错误是因为没有邮箱用户造成的。

列出用户列表:#cat /etc/passwd

找到邮箱用户:postfixuser:x:1006:1007::/home/postfixuser:/bin/bash

                         注册名:有密码:usrid:groopid::usrdir:命令解释程序

以该用户登录,问题依然如故。

命令执行chown postfixuser:postfixuser /var/log/openwebmail.log无效;

6.登录问题解决

#groupadd  mymailuser   //建立新组 mymailuser
#useradd tsmusr
#passwd tsmusr
#usermod -a -G mymailuser tsmusr (加入新建组)
#cd /home
#mkdir tsmusr
#cd tsmusr
#mkdir mymail
#chmod 777 mymail
#cd /
#chown -R tsmusr:mymailuser /home/tsmusr

  重新启动系统,以tsmusr用户登录,出现以下画面,成功。测试成功后,只要是centos下的帐户(不一定要加入特定组),均可登录成功。

7. 上述工作完成后,只能发送邮件,但不能接收邮件,我已经完成的工作如下:

    postfix,dns,openwebmail有了上面这三个工作基础,我可以在自己的邮件服务器上创建邮箱帐号,如:tsmusr@tsmt.com,并可通过:http://mail.tsmt.com/webmail来发送邮件了。

    下面我们继续安装一个工具Dovecot,就可以接收邮件了,至于邮件列表,需要安装mailman,我暂时不需要,就不介绍了,以后若需要,再来更新此篇文章。

     Dovecot的安装没有新意,我的机器已安装好,这里就不介绍了。下面说说如何配置:

     # vi /etc/dovecot/dovecot.conf

     找到下面这行,去掉前面的注释和最后一个单词

       protocols = imap pop3 lmtp  

       listen = *

       login_trusted_networks = 192.168.1.0/24

        # vi /etc/dovecot/conf.d/10-ssl.conf

      将  ssl = required 改为  ssl = no

     #vi /etc/dovecot/conf.d/10-auth.conf

     把disable_plaintext_auth = yes改为disable_plaintext_auth = no

     #vi /etc/dovecot/conf.d/10-master.conf

       修改这一部分如下:

       # Postfix smtp-auth
          unix_listener /var/spool/postfix/private/auth {
               mode = 0666
               user = postfix
               group = postfix
             }

     设定邮件存放位置

      # vi /etc/dovecot/conf.d/10-mail.conf

      mail_location = maildir:~/Maildir(与postfix相同)

      重启系统

       service dovecot reload或service dovecot start或service dovecot restart

       上述工作完成后,postfix与dovecot是可以正常收发邮件了,但openwebmail仍然只能发邮件,不能收邮件。

        8.问题解决

修改openwebmail 的一些配置文件[root@ser defaults]#  vim /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf 
dbm_ext                 .db
dbmopen_ext             .db
dbmopen_haslock         yes
smtpserver  192.168.1.202
[root@ser defaults]#  vim openwebmail.conf
domainnames             tsmt.com
smtpserver              192.168.1.202
authpop3_server         192.168.1.202
再次初始化openwebmail
[root@ser defaults]#/usr/local/bin/openwebmail-tool --init出现Y/N 时,按Y。把Postfix+Dovecot+Openwebmail 三者个格式统一下就行了
1.postfix 配置 main.cf
# vi /etc/postfix/main.cf
mail_spool_directory = /var/spool/mail
home_mailbox = /var/spool/mail/user
proxy_interfaces = 0.0.0.0
2.Dovecot 配置 10-mail.conf
vi /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
3.Openwebmail.confvi /var/www/cgi-bin/openwebmail/etc/openwebmail.confmailspooldir /var/spool/mail

         注:main.cf的配置还是有问题,更新中

    

 

 

    

 

 

这篇关于How to install Open Webmail 2.54 on CentOS 8的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/932157

相关文章

idea npm install很慢问题及解决(nodejs)

《ideanpminstall很慢问题及解决(nodejs)》npm安装速度慢可通过配置国内镜像源(如淘宝)、清理缓存及切换工具解决,建议设置全局镜像(npmconfigsetregistryht... 目录idea npm install很慢(nodejs)配置国内镜像源清理缓存总结idea npm in

CentOS 7 YUM源配置错误的解决方法

《CentOS7YUM源配置错误的解决方法》在使用虚拟机安装CentOS7系统时,我们可能会遇到YUM源配置错误的问题,导致无法正常下载软件包,为了解决这个问题,我们可以替换YUM源... 目录一、备份原有的 YUM 源配置文件二、选择并配置新的 YUM 源三、清理旧的缓存并重建新的缓存四、验证 YUM 源

CentOS和Ubuntu系统使用shell脚本创建用户和设置密码

《CentOS和Ubuntu系统使用shell脚本创建用户和设置密码》在Linux系统中,你可以使用useradd命令来创建新用户,使用echo和chpasswd命令来设置密码,本文写了一个shell... 在linux系统中,你可以使用useradd命令来创建新用户,使用echo和chpasswd命令来设

解决Maven项目idea找不到本地仓库jar包问题以及使用mvn install:install-file

《解决Maven项目idea找不到本地仓库jar包问题以及使用mvninstall:install-file》:本文主要介绍解决Maven项目idea找不到本地仓库jar包问题以及使用mvnin... 目录Maven项目idea找不到本地仓库jar包以及使用mvn install:install-file基

Python 中的 with open文件操作的最佳实践

《Python中的withopen文件操作的最佳实践》在Python中,withopen()提供了一个简洁而安全的方式来处理文件操作,它不仅能确保文件在操作完成后自动关闭,还能处理文件操作中的异... 目录什么是 with open()?为什么使用 with open()?使用 with open() 进行

CentOS 7部署主域名服务器 DNS的方法

《CentOS7部署主域名服务器DNS的方法》文章详细介绍了在CentOS7上部署主域名服务器DNS的步骤,包括安装BIND服务、配置DNS服务、添加域名区域、创建区域文件、配置反向解析、检查配置... 目录1. 安装 BIND 服务和工具2.  配置 BIND 服务3 . 添加你的域名区域配置4.创建区域

Centos环境下Tomcat虚拟主机配置详细教程

《Centos环境下Tomcat虚拟主机配置详细教程》这篇文章主要讲的是在CentOS系统上,如何一步步配置Tomcat的虚拟主机,内容很简单,从目录准备到配置文件修改,再到重启和测试,手把手带你搞定... 目录1. 准备虚拟主机的目录和内容创建目录添加测试文件2. 修改 Tomcat 的 server.X

使用国内镜像源优化pip install下载的方法步骤

《使用国内镜像源优化pipinstall下载的方法步骤》在Python开发中,pip是一个不可或缺的工具,用于安装和管理Python包,然而,由于默认的PyPI服务器位于国外,国内用户在安装依赖时可... 目录引言1. 为什么需要国内镜像源?2. 常用的国内镜像源3. 临时使用国内镜像源4. 永久配置国内镜

pip install jupyterlab失败的原因问题及探索

《pipinstalljupyterlab失败的原因问题及探索》在学习Yolo模型时,尝试安装JupyterLab但遇到错误,错误提示缺少Rust和Cargo编译环境,因为pywinpty包需要它... 目录背景问题解决方案总结背景最近在学习Yolo模型,然后其中要下载jupyter(有点LSVmu像一个

CentOS系统Maven安装教程分享

《CentOS系统Maven安装教程分享》本文介绍了如何在CentOS系统中安装Maven,并提供了一个简单的实际应用案例,安装Maven需要先安装Java和设置环境变量,Maven可以自动管理项目的... 目录准备工作下载并安装Maven常见问题及解决方法实际应用案例总结Maven是一个流行的项目管理工具