一、安装环境:
CentOS Linux release 7.7.1908 (Core),关闭防火墙,有独立的内部DNS服务器。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
二、安装postfix:
yum -y install postfix

postfix配置如下(/etc/postfix/main.cf):

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.xxx.xxx #修改邮件主机
mydomain = xxx.xxx #修改域名
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = m y h o s t n a m e , l o c a l h o s t . myhostname, localhost. myhostname,localhost.mydomain, localhost, $mydomain # $mydomain必须要引用,没有引用会出现已域名为结尾的邮件无法接收。
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8, 10.36.0.0/16
relay_domains = $mydestination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_spool_directory = /var/spool/mail #openwebmail 无法支持 Maildir/
smtpd_banner = $myhostname ESMTP
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
#smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd d a e m o n d i r e c t o r y / daemon_directory/ daemond​irectory/process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
message_size_limit = 100000000
mailbox_size_limit = 1000000000

systemctl enable postfix

systemctl start postfix
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
三、安装dovecot

yum -y install dovecot

vi /etc/dovecot/dovecot.conf
protocols = imap pop3
listen = *

vi /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain login

vi /etc/dovecot/conf.d/10-mail.conf
first_valid_uid = 501 # uid 501开始的都能登录。默认是1000导致部分邮件账号无法登录
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u #openwebmail支持Mbox

vi /etc/dovecot/conf.d/10-master.conf
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}

vi /etc/dovecot/conf.d/10-ssl.conf
ssl = no

systemctl start dovecot

systemctl enable dovecot

验证:
[root@adm ~]# telnet localhost 110
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
+OK Dovecot ready.
user 账号
+OK
pass 密码
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
四、cyrus-sasl配置

yum install cyrus-sasl-*

[root@adm ~]# vi /etc/sysconfig/saslauthd
MECH=shadow

vi /etc/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
log_level: 3

验证:
[root@adm ~]# testsaslauthd -u 账号 -p ‘密码
0: OK “Success.”
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
五、openwebmail
第一步:
到http://www.openwebmail.org/openwebmail/download/处下载如下文件包:
openwebmail-2.53.tar.gz
1 CGI.pm-3.05.tar.gz
2 Text-Iconv-1.2.tar.gz
3 Digest-1.08.tar.gz
4 libiconv-1.9.1.tar.gz (非必须)
5 libnet-1.19.tar.gz
6 Digest-MD5-2.33.tar.gz
7 MIME-Base64-3.01.tar.gz

第二步:
分别对于他们进行编译安装:

[root@linux CGI.pm-3.05]# perl Makefile.PL
Checking if your kit is complete…
Looks good
Writing Makefile for CGI

[root@linux CGI.pm-3.05]# make; make install
Writing /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/CGI/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod

[root@linux openwebmail]# tar zvxf libnet-1.19.tar.gz
[root@linux openwebmail]# cd libnet-1.19
[root@linux libnet-1.19]# perl Makefile.PL
Checking for Socket…ok
Checking for IO::Socket…ok
Checking if your kit is complete…
Looks good
Ah, I see you already have installed libnet before.
Do you want to modify/update your configuration (y|n) ? [no] no
这里提示要不要对原有网络配置进行更新修改,我们选择no
This script will prompt you to enter hostnames that can be used as
defaults for some of the modules in the libnet distribution.
To ensure that you do not enter an invalid hostname, I can perform a
lookup on each hostname you enter. If your internet connection is via
a dialup line then you may not want me to perform these lookups, as
it will require you to be on-line.
Do you want me to perform hostname lookups (y|n) ? [yes]
The following questions all require a list of host names, separated
with spaces. If you do not have a host available for any of the
services, then enter a single space, followed by . To accept the
default, hit
Enter a list of available NNTP hosts : []
Enter a list of available SMTP hosts : []
Enter a list of available POP3 hosts : []
Enter a list of available SNPP hosts : []
Enter a list of available PH Hosts : []
Enter a list of available TIME Hosts : []
Enter a list of available DAYTIME Hosts : []
Do you have a firewall/ftp proxy between your machine and the internet
If you use a SOCKS firewall answer no
(y|n) ? [no]
Normally when FTP needs a data connection the client tells the server
a port to connect to, and the server initiates a connection to the client.
Some setups, in particular firewall setups, can/do not work using this
protocol. In these situations the client must make the connection to the
server, this is called a passive transfer.
Should all FTP connections be passive (y|n) ? [yes]
What is your local internet domain name : []
If you specified some default hosts above, it is possible for me to
do some basic tests when you run make test' This will causemake test’ to be quite a bit slower and, if your
internet connection is via dialup, will require you to be on-line
unless the hosts are local.
Do you want me to run these tests (y|n) ? [yes]
To allow Net::FTP to be tested I will need a hostname. This host
should allow anonymous access and have a /pub directory
What host can I use : []
Writing libnet.cfg
Writing Makefile for Net
make install:同样提示(目前看来是perl编译器有些问题,但不知道会不会对他有影响)
Writing /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Net/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
同上安装Digest-MD5-2.33正常
同上安装MIME-Base64-3.01正常
同上安装Text-Iconv-1.2正常
同上安装Digest-1.08正常

第三步:Install a Repostory File for CentOS 7
cd /etc/yum.repo.d
wget ftp://openwebmail.org/pub/openwebmail/el7/openwebmail-el7.repo
yum install openwebmail
yum install gcc perl-CGI
/usr/local/bin/openwebmail-tool --init

The version of Perl on your system (5.016003) 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 3.10.0-123.el7.x86_64 x86_64
Perl: 5.016003
WebMail: OpenWebMail 2.54 20141206

总结:安装过程中会出现各种各样的异常,参考了很多分享出来的过程,环境不尽相同问题得不到解决,复制命令的时候回出现字符格式不同导致命令出错,分享出来与各位共勉。感谢分享,重要参考链接如下,再次表示感谢。

参考链接:
postfix+dovecot+cyrus-sasl:
https://blog.csdn.net/zuo187qiang/article/details/78201118
openwebmail:
https://blog.csdn.net/weixin_34109408/article/details/93563074 (openwebmail 无法支持 Maildir/,postfix和dovecot格式统一修改)
http://www.openwebmail.org/openwebmail/download/centos/el7/
https://www.cnblogs.com/wwufengg/articles/centos-openwebmail-postfix-perl.html

CENTOS7架设邮件服务器(实测1000以上用户)postfix+dovecot+cyrus-sasl+openwebmail相关推荐

  1. MDaemon架设邮件服务器案例

    MDaemon架设邮件服务器案例<!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="Content& ...

  2. Linux下架设邮件服务器全攻略(二)

    Linux下架设邮件服务器全攻略(二) (三)sendmail.cf难以配置,Sendmail的开发人员为sendmail的管理者提供了更加容易理解和配置的sendmail.mc文件. 一般情况下,要 ...

  3. winmail 数据库设置_Windows - 2003下搭建邮件服务器教程和使用 - Winmail - Server - 轻松架设邮件服务器 - 图文...

    Windows 2003邮件服务器配置全攻略 在windows2003下架设邮件服务器的过程跟XP系统类似,可以用系统自带的POP3及SMTP服务建立,也可以借助第三方软件实现.适用环境不同自然采取的 ...

  4. 新网邮箱手机服务器,怎么架设邮件服务器

    怎么架设邮件服务器?恐怕很多站长对此问题不是很熟悉,架设邮件服务器是我们不曾接触过的,这些工作可以让服务器供应商来做,不过如果你想做好邮件服务器的维护,我们还是要了解怎么架设邮件服务器的步骤的,接下来 ...

  5. Windows 2003架设邮件服务器大全

    http://blog.163.com/yong5123@126/blog/static/455160622010017021848/ 在Windows2003架设邮件服务器的过程跟XP系统类似,可以 ...

  6. Linux Centos7搭建邮件服务器

    Linux Centos7搭建邮件服务器 基于sendmail和Dovecot 一.关闭防火墙和selinux systemctl stop firewalld setenctoce 0 二.下载se ...

  7. 如何从零开始架设邮件服务器

    对于没有邮件服务器架设基础的人来说如何轻松搭建邮件服务器?U-Mail邮件系统可以帮您解决这个问题.U-Mail从安装.配置.维护提供一站式服务,让您自建企业邮箱无后顾之忧.如果您需要架设邮件服务器需 ...

  8. 1.架设邮件服务器-概念

    以下所有操作的操作系统为:windows 2003 企业版 架设邮件服务器有两种 1.windows 2003中自带的Pop3服务,SMTP服务来收发邮件. 2.用第三方软件.(这个简单,功能强大), ...

  9. 使用动态IP+MDaemon架设邮件服务器

    最近和几个朋友以前在捣鼓MDaemon,在慢慢看教程跟摸索的情况下,了解了MD最基本的一些应用,下面我们就一步一步来做,目标是建立一个能收发外网的拥有顶级域名的内部邮件服务器.像我这样的属于穷鬼一族, ...

  10. 2.架设邮件服务器-windows 2003 POP3服务,SMTP服务收发邮件

    1.默认安装的系统是没有安装POP3组件,SMTP组件,搞个盘过来,或从网上下载一个i386(下载地址:http://down.spdns.com/i386.rar ). (1)从"控制面板 ...

最新文章

  1. 设计模式:备忘录模式??
  2. java基础-方法重载
  3. SNMP AGENT函数介绍
  4. stm32实际运用中遇到的问题
  5. stringstream和cin
  6. python的自带数据集_盘点 | Python自带的那些数据集
  7. HashMap(摘)
  8. Alley Bird 跳跳鸟源码
  9. SpringBootDubboZookeeper远程调用项目搭建
  10. Callback Functions Tutorial
  11. S_ISREG等几个常见的宏(转)
  12. 用matlab解根3乘根2,第六章 信号与系统v1.ppt
  13. python批量查询ip归属地_利用python实现批量查询ip地址归属地址
  14. MYSQL 安装时出现的问题error: Failed dependencies
  15. Excel 如何用万元单位表示,并且保留两位小数点,亲测真实有效!自定义格式即可解决!如:100.25万---但是此方法会导致最后一位永远都是0
  16. 5V转1.8V稳压芯片,3.7V转1.8V稳压芯片
  17. 1、基于51单片机智能水杯系统设计
  18. 单端反激式变换器开关稳压电源原理图 此博文包含图片 (2009-02-24 12:17:53)转载▼ 标签: 单端反激式 变换器 高频变压器 原理图 磁滞回线 磁心 杂谈 分类: technical
  19. 团队作业-博客2(团队介绍)
  20. Token和Session有什么区别,面试官满意的答案

热门文章

  1. 入学计算机水平考试,2017级本科新生计算机水平入学考试要点
  2. 接触skynet框架7个月
  3. git 配置用户名与邮箱(git篇)
  4. CentOS 8.5安装-解决Error setting up base repository问题
  5. vxe-table 使用固定列并清除表格自带左右间距,表头边框线丢失
  6. 数据库密码遗忘如何重置
  7. java命令:java命令错误: 找不到或无法加载主类
  8. lammps案例 delete_atoms命令实现球壳结构建模
  9. 计算机英语 考研 翻译,2022考研英语翻译练习(3.2)
  10. 一些关于人性的思考~