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

相关文章

CentOS系统使用yum命令报错问题及解决

《CentOS系统使用yum命令报错问题及解决》文章主要讲述了在CentOS系统中使用yum命令时遇到的错误,并提供了个人解决方法,希望对大家有所帮助,并鼓励大家支持脚本之家... 目录Centos系统使用yum命令报错找到文件替换源文件为总结CentOS系统使用yum命令报错http://www.cppc

centos 6安装 vim

centos 安装vim 1.首先查询当前当前vim所依赖的包存在不存在.检查缺少哪个几个依赖包 [root@bogon firstCopy]# rpm -qa|grep vivimvim-common-7.4.160-5.el7.x86_64vim-enhanced-7.4.160-5.el7.x86_64vim-filesystem-7.4.160-5.el7.x86_64vim-

NGINX轻松管理10万长连接 --- 基于2GB内存的CentOS 6.5 x86-64

转自:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=190176&id=4234854 一 前言 当管理大量连接时,特别是只有少量活跃连接,NGINX有比较好的CPU和RAM利用率,如今是多终端保持在线的时代,更能让NGINX发挥这个优点。本文做一个简单测试,NGINX在一个普通PC虚拟机上维护100k的HTTP

CentOS下mysql数据库data目录迁移

https://my.oschina.net/u/873762/blog/180388        公司新上线一个资讯网站,独立主机,raid5,lamp架构。由于资讯网是面向小行业,初步估计一两年内访问量压力不大,故,在做服务器系统搭建的时候,只是简单分出一个独立的data区作为数据库和网站程序的专区,其他按照linux的默认分区。apache,mysql,php均使用yum安装(也尝试

Linux Centos 迁移Mysql 数据位置

转自:http://www.tuicool.com/articles/zmqIn2 由于业务量增加导致安装在系统盘(20G)磁盘空间被占满了, 现在进行数据库的迁移. Mysql 是通过 yum 安装的. Centos6.5Mysql5.1 yum 安装的 mysql 服务 查看 mysql 的安装路径 执行查询 SQL show variables like

秒变高手:玩转CentOS 7软件更换的方法大全

在 CentOS 7 中更换软件源可以通过以下步骤完成。更换源可以加快软件包的下载速度,特别是当默认源速度较慢时。以下是详细步骤: 前言 为了帮助您解决在使用CentOS 7安装不了软件速度慢的问题,我们推出了这份由浪浪云赞助的教程——“CentOS7如何更换软件源加快下载速度”。 浪浪云,以他们卓越的弹性计算、云存储和网络服务受到广泛好评,他们的支持和帮助使得我们可以将最前沿的技术知识分

Open a folder or workspace... (File -> Open Folder)

问题:vscode Open with Live Server 时 显示Open a folder or workspace... (File -> Open Folder)报错 解决:不可以单独打开文件1.html ; 需要在文件夹里打开 像这样

android java.io.IOException: open failed: ENOENT (No such file or directory)-api23+权限受权

问题描述 在安卓上,清单明明已经受权了读写文件权限,但偏偏就是创建不了目录和文件 调用mkdirs()总是返回false. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission android:name="android.permission.READ_E

CentOS 7 SVN的搭建和使用

https://subversion.apache.org/packages.html#centos 阿里云的ECS貌似已经自带了SVN [root@xxx ~]# svn --versionsvn, version 1.7.14 (r1542130)compiled Aug 23 2017, 20:43:38Copyright (C) 2013 The Apache Software Fo

CentOS 7 x64下安装MySql5.7图文详解

参考: https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ http://www.jianshu.com/p/7cccdaa2d177 http://www.linuxidc.com/Linux/2016-09/135288.htm 最近搞了台阿里云服务器,搭载的是CentOS 7系统,这里记录下mysql5.7的安装流程 查