CentOS Linux release 7.7.1908 (Core),关闭防火墙,有独立的内部DNS服务器。
yum -y install postfix


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 =,
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,
debug_peer_level = 2
debugger_command =
ddd d a e m o n d i r e c t o r y / daemon_directory/ daemondirectory/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

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
Connected to localhost.
Escape character is ‘^]’.
+OK Dovecot ready.
user 账号
pass 密码
+OK Logged in.
+OK Logging out.
Connection closed by foreign host.

yum install cyrus-sasl-*

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

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

[root@adm ~]# testsaslauthd -u 账号 -p ‘密码
0: OK “Success.”
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
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

第三步: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

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


https://blog.csdn.net/weixin_34109408/article/details/93563074 (openwebmail 无法支持 Maildir/,postfix和dovecot格式统一修改)

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。




简单算法 设计LRU缓存结构(java)_完整java 设计lru缓存结构get\set_搞不懂语言的程序员的博客-程序员宅基地

简单算法 设计LRU缓存结构(java)描述设计LRU缓存结构,该结构在构造时确定大小,假设大小为K,并有如下两个功能set(key, value):将记录(key, value)插入该结构get(key):返回key对应的value值[要求]set和get方法的时间复杂度为O(1)某个key的set或get操作一旦发生,认为这个key的记录成了最常使用的。当缓存的大小超过K时,移除最不经常使用的记录,即set或get最久远的。若opt=1,接下来两个整数x, y,表示set(x, y)_完整java 设计lru缓存结构get\set


上节练习linux基础(一) 一、用文件系统权限控制文件访问二、归档与复制三、访问文件系统利一、用文件系统权限控制文件访问切换到root用户创建/home/stooges目录,并更改组权限,以使其属于stooges组对/home/stooges目录设置权限,使GID位目录(2)、所有者(7)和组(7)具有完全的读取和写入执行权限,而其他用户对该用户没有权限。修改全局登陆脚本,使..._在/home/stooges目录中更改组权限,使其属于stooges组


https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp14211353191. 开发者提交信息后,微信服务器将发送GET请求到填写的服务器地址URL上,GET请求携带参数如下表所示:参数 描述 signature 微信加密签名,signature结合了开发者填写的token参数和请求中的timest..._返回验证消息给微信服务器是请求公众号哪个地址


0. 背景原子操作就是不可再分的操作。在多线程程序中原子操作是一个非常重要的概念,它常常用来实现一些同步机制,同时也是一些常见的多线程Bug的源头。本文主要讨论了三个问题:1. 多线程程序中对变量的读写操作是否是原子的?2. 多线程程序中对Bit field(位域)的读写操作是否是线程安全的?3. 程序员该如何使用原子操作?1. 多线程环境下对变量的读写操作是否是原子的?我们先从一道..._it would run faster quadword aligned


**“当我们展望未来新技术的挑战时,采用统一的开发和应用标准至关重要。”** --- 通用汽车副总裁 Ken Kelzer, 2018。在诸多的标准与规范中,ISO 26262(汽车功能安全标准),继承自 IEC 61508(通用电子电气功能安全标准),定义了针对汽车工业的安全(Safety)相关组件的国际标准。_功能安全概念阶段最后输出物


Java基础学习总结:网络编程之(四)TCP与UDP的区别及常见的网络协议(转)_socketjava tcp和udp区别-程序员宅基地

TCP和UDP的区别原文:https://blog.csdn.net/li_ning_/article/details/521174631、TCP与UDP基本区别基于连接与无连接 TCP要求系统资源较多,UDP较少; UDP程序结构较简单 流模式(TCP)与数据报模式(UDP); TCP保证数据正确性,UDP可能丢包 TCP保证数据顺序,U..._socketjava tcp和udp区别

Apache PHP 等服务器时间时区修改-程序员宅基地

今天在研究Moodle的时候, 突然发现系统中记录的时间和实际时间有出入.所以就深入了解了一下, 发现Apache(PHP)的服务器时间时区默认为UTC(Coordinated UniversalTime 世界统一时间).既然问题发现了就修改一下吧.(如图)1. 找到 php.ini 如果是集成整合的PHP运行环境就修改整合环境下的Apache/bin文件夹中的 php

python version 3.4 required_解决Win10安装PyWin32问题Python Version 3.4 required which was not found in the...-程序员宅基地

程序找不到注册表项Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\SOFTWARE\Python][HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore][HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.4][HKEY_CURRENT_USER\SOFTW...





字体粗细与fontWeight的对应关系_bold font weight对照-程序员宅基地

usWeight/bWeight100 2渺 極細Airline100 2絲   Ultralight100 2纖200 3線200 3輕 纖細 Thin300 4細 細體 Light350-  準細 Demilight350-  半細 Semilight--- -書 標準Book/Text400 5標 常規 Regula..._bold font weight对照