zoukankan      html  css  js  c++  java
  • 安装postifx邮件服务器和简单配置

    1、安装postfix邮件服务器

    yum -y install postfix*  //安装邮件发送服务器
    yum -y install dovecot*  //安装邮件接受服务器


    2、邮件服务器的配置

    修改postfix的配置  vi /etc/postfix/main.cf  下面是一些修改的

    myhostname = mail.g.cn
    mydomain = g.cn  //邮件的后缀

    myorigin = $myhostname
    myorigin = $mydomain

    inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    #inet_interfaces = localhost

    mydestination = $myhostname,$mydomain

    mynetworks = 192.168.0.0/24, 127.0.0.0/8
    #mynetworks = $config_directory/mynetworks
    #mynetworks = hash:/etc/postfix/network_table

    relay_domains = $mydestination


    修改dovecot的配置  vi /etc/dovecot.conf

    protocols = imap imaps pop3 pop3s

    3、重启邮件服务器和自启动

    service postfix restart
    service dovecot restart

    chkconfig postfix on
    chkconfig dovecot on
    chkconfig --list postfix

    修改邮件默认服务器:alternatives --config mta
    选着2,即postfix

    4、添加邮件用户

    useradd user1
    passwd user1

    这样系统就添加了user1@g.cn的邮件帐号

    5、发邮件
    echo "root->user1" |mail user1@g.cn -s "test"  //root@g.cn发给user1@g.cn的邮件

    6、windows·收发邮件

    使用windows自带的邮件客户端来收发,只需要配置相应的发送和接受邮件服务器的IP地址就OK了。



  • 相关阅读:
    2018-4-17-软件设计-白话依赖注入
    2018-2-13-wpf-PreviewTextInput-在鼠标输入获得-_u0003
    2018-5-23-为何-987654321_123456789-的值是-8.0000000729
    寄存器位写操作
    Linux多IP配置
    Kconfig和Makefile
    linux设置网卡速率
    Winmanager,NERDTree和MiniBufExplorer
    SuperTab
    ping
  • 原文地址:https://www.cnblogs.com/gxldan/p/4066909.html
Copyright © 2011-2022 走看看