Mail服务器架设

workstation(192.168.1.105):

yum -y install postfix //centos系统已经默认安装了

vim /etc/postfix/main.cf //配置SMTP

75 myhostname = workstation.example.com

83 mydomain = example.com

99 myorigin = $mydomain

116 inet_interfaces = all

164 mydestination = $myhostname, localhost.$mydomain, localhost,$mydomain

264 mynetworks = 192.168.1.0/24, 127.0.0.0/8

419 home_mailbox = Maildir/

574 smtpd_banner = $myhostname ESMTP

在最后添加:

680 message_size_limit = 10485760

681 mailbox_size_limit = 1073741824

682 smtpd_sasl_type = dovecot

683 smtpd_sasl_path = private/auth

684 smtpd_sasl_auth_enable = yes

685 smtpd_sasl_security_options = noanonymous

686 smtpd_sasl_local_domain = $myhostname

687 smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject

systemctl restart postfix

systemctl enable postfix

yum -y install dovecot //安装DOVECOT来配置pop/imap

vim /etc/dovecot/dovecot.conf

protocols = imap pop3 lmtp

listen = *

vim /etc/dovecot/conf.d/10-auth.conf

10 disable_plaintext_auth = no

100 auth_mechanisms = plain login

vim /etc/dovecot/conf.d/10-mail.conf

30 mail_location = maildir:~/Maildir

97     mode = 0666

98         user = postfix

99         group = postfix

100   }

vim /etc/dovecot/conf.d/10-ssl.conf

ssl = no //不使用ssl登录

systemctl restart dovecot;systemctl enable dovecot

给http服务器安装php

yum -y install php php-mbstring php-pear

vim /etc/php.ini

878 ;date.timezone = "Asia/Shanghai" //配置时区

systemctl restart httpd

配置ssl

创建密钥

cd /etc/pki/tls/certs/

make server.key

openssl rsa -in server.key -out server.key //生成ssl密钥

make server.csr

openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650

配置ssl

yum -y install mod_ssl

vim /etc/httpd/conf.d/ssl.conf

59 DocumentRoot "/var/www/html"

60 ServerName workstation.example.com:443//修改为自己的主机名

100 SSLCertificateFile /etc/pki/tls/certs/server.crt//修改为自己第一步创建的证书

107 SSLCertificateKeyFile /etc/pki/tls/certs/server.key//修改为第一步创建的密钥

systemctl restart httpd //重启服务

安装和配置squirrelmail

yum -y install squirrelmail

在http://www.squirrelmail.org/plugins/分别下载如下三个包并解压缩到/usr/share/squirrelmail/plugins/下

empty_trash-2.0-1.2.2.tar.gz

compatibility-2.0.16-1.0.tar.gz

secure_login-1.4-1.2.8.tar.gz

/usr/share/squirrelmail/config/conf.pl//运行配置脚本

具体设置见附件

cp /usr/share/squirrelmail/plugins/secure_login/config.sample.php /usr/share/squirrelmail/plugins/secure_login/config.php

vim /usr/share/squirrelmail/plugins/secure_login/config.php

systemctl restart httpd

登陆网页验证:分别输入自己系统当中两个用户,互相发邮件

时间: 2024-08-10 15:11:55

Mail服务器架设的相关文章

Linux与云计算——第二阶段Linux服务器架设 第九章:Mail电子邮件服务器架设—postfix和Dovecot

Linux与云计算--第二阶段Linux服务器架设 第九章:Mail电子邮件服务器架设-postfix和Dovecot 安装Postfix 安装Postfix来配置SMTP服务器. SMTP使用25/TCP. [1] Postfix 是CentOS系统默认安装,哪怕你选择了最小安装,如果确认没有安装,请先安装. [[email protected] ~]# yum -y install postfix [2] 使用Dovecot's SASL 来配置SMTP认证. [[email protect

Linux与云计算——第二阶段 第九章:Mail电子邮件服务器架设—配置基于SSL的邮件服务器以及虚拟域的使用

Linux与云计算--第二阶段Linux服务器架设 第九章:Mail电子邮件服务器架设-配置基于SSL的邮件服务器以及虚拟域的使用 邮件客户端配置 可以自行选择电子邮件客户端根据服务器的配置进行设置即可.推荐使用foxmail或者outlook等客户端软件. 配置SSL 配置SSL来加密连接. SMTPS使用端口465/TCP, POP3S使用端口995/TCP, IMAPS使用端口993/TCP. [1] 创建证书 [2] 给Postfix和Dovecot配置SSL. [[email prot

Linux与云计算——第二阶段Linux服务器架设 第六章:目录Directory服务器架设—FreeIPA

Linux与云计算--第二阶段Linux服务器架设 第六章:目录Directory服务器架设-FreeIPA 1 FreeIPA 配置FreeIPA服务器 Configure IPA Server to share users' account in your local network. [1] Install FreeIPA. [[email protected] ~]# yum -y install ipa-server ipa-server-dns bind bind-dyndb-lda

linux sendmail 邮件服务器架设(fedora 8)

linux sendmail 邮件服务器架设(fedora 8) 2009-01-22 17:27 3316人阅读 评论(2) 收藏 举报 邮件服务器linuxprotocolscaching测试login 近来一直在学习LINUX,我的博客前段时间有写架设DNS的详细步骤,这节主要讲架设邮件服务器,大家都知道架邮件服务器首先要架DNS服务,如果要了解架设DNS服务,可以参加我之前写的文章.再看这邮件服这样会连惯性,架邮件服务我也是参考网上大量的文章,在这里感谢前辈们.由于LINUX版本不同有些

Linux与云计算——第二阶段 第十章:Samba服务器架设—SMB共享目录及多用户SMB挂载

Linux与云计算--第二阶段Linux服务器架设 第十章:Samba服务器架设-SMB共享目录及多用户SMB挂载 通过SMB共享目录 在Server上配置SMB服务 您的SMB服务器必须是STAFF工作组的一个成员 共享/common目录 共享名必须为common 只有example.com域内的客户端可以访问common共享 common必须是可以浏览的 用户andy必须能够读取共享中的内容,如果需要的话,验证密码是redhat [1] 安装配置Samba. [[email protecte

Linux与云计算——第二阶段 第五章:存储Storage服务器架设—分布式存储Ceph

Linux与云计算--第二阶段Linux服务器架设 第五章:存储Storage服务器架设-分布式存储Ceph 1 Ceph 配置Ceph集群 Install Distributed File System "Ceph" to Configure Storage Cluster. For example on here, Configure Cluster with 1 admin Node and 3 Storage Node like follows. | +------------

服务器架设笔记——Apache模块开发基础知识

通过上节的例子,我们发现Apache插件开发的一个门槛便是学习它自成体系的一套API.虽然Apache的官网上有对这些API的详细介绍,但是空拿着一些零散的说明书,是很难快速建立起一套可以运行的系统.(转载请指明出于breaksoftware的csdn博客) 为了实现最基础的URL解析等功能,我把<Apache模块开发指南>一书粗略了翻看了两遍,以利于迅速了解Apache模块编程的相关知识.至于书中具体的知识点,我并不在此赘述.但是为了便于大家了解之后遇到的各种相关的知识点,我大致罗列几条(摘

《Linux应用大全 服务器架设》配套视频实验内容

<Linux应用大全 服务器架设>配套视频实验内容下载网址: http://pan.baidu.com/s/1mgD3Sq0 <Linux应用大全 服务器架设>介绍了Linux服务器配置各方面的知识,主要包括网络配置文件和网络命令.OpenSSH.VNC.NFS.Samba.DHCP.DNS.Apache.Tomcat.Nginx.SVN.Vsftpd.Sendmail.NTP.NIS.OpenLDAP.MySQL.PostgreSQL.iptables.NAT.Squid.路由器

Linux与云计算——第二阶段 第一十一章:代理Proxy服务器架设—Squid代理服务器正向代理和客户端配置

Linux与云计算--第二阶段Linux服务器架设 第一十一章:代理Proxy服务器架设-Squid代理服务器正向代理和客户端配置 安装Squid 安装Squid来配置代理服务器. [1] 这是一个通用的转发代理配置 [[email protected] ~]# yum -y install squid [[email protected] ~]# vi /etc/squid/squid.conf # line 26: 添加一条新的ACL acl lan src 192.168.96.0/24