19.postfix邮件服务器配置安装

安装postfix

1.修改主机名

hostname mail.yang.com 改临时主机名

vim /etc/sysconfig/network 改主机名

2配置DNS

配置DNS zone

mail            IN A            192.168.0.1

yang.com.       IN MX 10        mail.yang.com.

重启DNS服务

3关闭防火墙

iptables –L

关闭策略

Chain INPUT (policy ACCEPT)

target     prot opt source               destination

Chain FORWARD (policy ACCEPT)

target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination

iptables –F

chkconfig --level 345 iptables off

4。关闭selinux

vim /etc/selinux/config

5.关闭 Sendmail 服务

Netstat –nutlp |grep :25

Service sendmail stop

Chkconfig –level 345 sendmail off

E-mail 服务器切换方法

Rpm –ivh system-switch-mail*.rpm

6安装postfix服务

rpm -ivh /mnt/Server/postfix-2.3.3-2.i386.rpm

7.postfix配置

/etc/postfix/main.cf

设置运行 postfix 服务的邮件主机的主机名、域名

myhostname = mail.yang.com

mydomain = yang.com

设置由本机寄出的邮件所使用的域名或主机名称

myorigin = $mydomain

设置 postfix 服务监听的网络接口

inet_interfaces = all

设置可接收邮件的主机名称或域名

mydestination = $mydomain, $myhostname

设置可转发( Relay )哪些网络的邮件

mynetworks = 192.168.16.0/24

设置可转发哪些网域的邮件

relay_domains = yang.com

8. SMTP 认证的配置

Cyrus-SASL 认证包的安装

#rpm -qa | grep sasl

#rpm -ivh cyrus-sasl-2.1.22-5.el5_4.3.i386.rpm

#saslauehd –v

# vim /etc/sysconfig/saslauthd  (改为SHADOW模式)

测试 saslauthd 进程的认证功能:

# /usr/sbin/testsaslauthd -u test -p '123.com'

0: OK "Success."

telnet mail.yang.com 25

ehlo mail.yang.com

设置 postfix 启用配置文件 smtp 认证的设置部分 (在最后添加)

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain =  ' ‘

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

broken_sasl_auth_clients=yes

smtpd_client_restrictions = permit_sasl_authenticated

smtpd_sasl_security_options = noanonymous

开机启动

chkconfig --level 345 postfix on

service postfix on

POP 和 IMAP 服务: dovecot 和 cyrus-imapd

dovecot服务的安装

# rpm -q dovecot

使用下面的命令安装 dovecot 服务和相关程序:

rpm -ivh perl-DBI-1.52-2.el5.i386.rpm

mysql-5.0.77-4.el5_4.2.i386.rpm

dovecot-1.0.7-7.el5.i386.rpm

dovecot 服务的基本配置

#vim /etc/dovecot.conf

protocols =pop3 pop3s

protocol pop3 {     listen =  * :10100  }顶行写

开启服务:

chkconfig --level 345 dovecot on

service dovecot start

启动 Dovecot Imap:                                        [确定]

cyrus-imapd 服务的安装

rpm -qa | grep cyrus-imapd

安装

rpm -ivh cyrus-imapd-perl-2.3.7-7.el5_4.3.i386.rpm

cyrus-imapd-utils-2.3.7-7.el5_4.3.i386.rpm

db4-utils-4.3.29-10.el5.i386.rpm

lm_sensors-2.10.7-9.el5.i386.rpm

cyrus-imapd-2.3.7-7.el5_4.3.i386.rpm

cyrus-imapd-devel-2.3.7-7.el5_4.3.i386.rpm

主配置文件 /etc/postfix/main.cf 中加入以下内容:去掉注释

mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp

启动服务(先开dovecot,再开cyrus)

#service cyrus-imapd start

导入 cyrus-imapd 数据库:                                  [确定]

启动 cyrus-imapd:                                         [确定]

# chkconfig --level 345 cyrus-imapd on

为 Cyrus-IMAP管理员账户 cyrus 设置密码

# passwd cyrus

# cyradm -u cyrus localhost

yang> cm user.test

yang> cm user.test.Send

yang> cm user.test.Trash

yang> cm user.test.Drafts

安装客户端:

安装包(YUM安装)

Yum install php-mbstring

Yum install squirrelmail

squirrelmail 的配置

/usr/share/squirrelmail/config/conf.pl

先改D 输入3 cyrusa

再输3 改1和3  yang.com/smtp

再改10 1.zh_CN  2.gb2312

S保存 Q退出

开启APACHE服务器

Service httpd restart

访问网页http://mail.yang.com/webmail

转载于:https://blog.51cto.com/yangtong/475934

Linux笔记19.postfix邮件服务器配置安装相关推荐

  1. linux 下邮件服务器,Linux 下搭建Postfix邮件服务器

    Linux 下搭建Postfix邮件服务器详解: 1.首先关闭sendmail服务 service sendmail stop 2.chkconfig sendmail off(关闭开机自启动) 3. ...

  2. Linux中搭建 Postfix 邮件服务器

    搭建背景:公司决定搭建邮件服务器,实现内部和外部交流的电子化,因为Linux系统稳定.安全性较好,该公司决定在Linux系统中搭建postfix邮件服务器,邮件服务器mail.pengqi.com能够 ...

  3. Centos7笔记之Postfix邮件服务器搭建

    一.目标 在centos7搭建邮件服务器postfix版.(无坑版) 二.平台 centos7.6,postfix-2.10.1-7.el7.x86_64 三.解析 1. 2. 四.Postfix邮件 ...

  4. centos 6.4 postfix mysql_CentOS 6.4下Postfix邮件服务安装和基本配置

    三.基于Postfix构建简单电子邮件 1.配置并测试Postfix服务器 1>.编辑main.cf文件,调整Postfix的基本运行参数 [root@mail~]# vi /etc/postf ...

  5. linux subversion rpm,[linux笔记]在CentOS7.3中安装配置Apache2.4+Subversion1.9.*版本库

    安装Apache2.4[httpd] yum install httpd 启动httpd并设置开机启动 systemctl enable httpd.service systemctl start h ...

  6. linux邮件系统之Postfix与Dovecot

    linux邮件系统之Postfix 邮件系统介绍 部署前提 邮件系统部署-Postfix 邮件系统部署-Dovecot 邮件的别名 检测 window系统 linux系统 邮件系统介绍 电子邮件系统基 ...

  7. linux mint 19新功能,Linux Mint 19.3将在2019年12月正式发布,附新功能简介

    Linux Mint 19.3 'Tricia'将定于2019年12月正式发布并提供ISO下载,在2019年圣诞节前后你就可以使用或升级到该版本.它基于稳定的Ubuntu 18.04.3 LTS版本, ...

  8. Linux笔记——软件包管理

    软件包管理,就是对Linux操作系统的软件及安装包进行管理,比如下载.安装.卸载.删除等,等同于Windows控制面板->软件管理. 一.软件包分类 二进制包--已经编译好的,如rpm包 源代码 ...

  9. 黑马Linux笔记05【Linux系统软件安装,MySQL、Tomcat、Nginx、RabbitMQ、Redis、ElasticSearch、Zookeeper】

    视频资源 视频地址:黑马-新版Linux快速入门到精通 资源下载:https://pan.baidu.com/s/1zExrsk09QVm3mpqaPTqe_g?pwd=6666,提取码:6666 课 ...

最新文章

  1. vue 结合 echarts
  2. 自己手写HashMap——红黑树的Java实现
  3. tensorflow keras 对应版本
  4. 声明式事务--@EnableTransactionManagement || @Transactional
  5. (Spring)使用注解开发
  6. Sublime Text插件的离线安装-使用htmlprettify美化您的HTML代码 1
  7. [蓝桥杯][算法提高VIP]线段和点(排序+贪心)
  8. .net core i上 K8S(六).netcore程序的service网络代理模式
  9. P3291-[SCOI2016]妖怪【凸壳】
  10. 数据结构-- 线性表之链式存储
  11. 十多款优秀的Vue组件库介绍
  12. Python 列表 sorted( )函数
  13. 矩阵论及其应用_群表示论笔记(一)
  14. 生成新的dataframe_Python之Pandas使用系列(九):DataFrame中列操作的技巧
  15. eclipse写javaee的时候js文件新增函数找不到
  16. cad快速看图2020|cad迷你画图2020 附安装教程
  17. css实现图片虚化_css怎么虚化背景图片?css虚化背景图片的方法介绍
  18. html给div加圆角边框,border-radius是向元素添加圆角边框的方法
  19. 26.gateway的IP 认证拦截,gateway做token验证 流程图(springcloud)
  20. Android studio 仿微信朋友圈页面(简单版)

热门文章

  1. Mongodb在Ubuntu下的安装
  2. MySQL新建用户,授权,删去用户,修改密码操作
  3. Application应用框架思考(三) 之[插件机制]
  4. ubuntu学习日记--Lesson6:shell,bash,dash
  5. xp 系统 mysql日志文件在哪里_SqlServer修改数据库文件及日志文件存放位置教程
  6. office另存为pdf的加载项_你可能需要用到的office转换技巧
  7. 麦克纳姆轮运动原理怎么安装_家用中央空调水系统原理是什么?怎么样安装比较好呢?...
  8. java 远程连接_java实现连接远程服务器并执行命令的基本原理
  9. 字符串函数-STUFF函数
  10. 样本修改 sample_如何在R中使用sample()获取样本?