postfix 是一个可以取代 sendmail 的邮件服务器

postfix 是一个可以取代 sendmail 的邮件服务器。它在普通机器上可以达到 sendmail 3 倍的吞吐率。而且相当安全。它可以在 www.postfix.org 下载安装过程如下:

  1. 编译的时候你需要让 postfix 支持 SASL 验证,使用以下选项编译:
    % make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include" \
            AUXLIBS="-L/usr/local/lib -lsasl"                       
    
    然后安装
    % make; make install
    
  2. 为了 postfix 能够正确发送本地邮件,请在 /etc/postfix/main.cf 加上:
    myhostname = tu140066.tsinghua.edu.cn
    mydestination = wangyin.com, $myhostname, localhost.$mydomain
    

    $myhostname 指明了你的主机域名,清华大学的网络给了每个人一个域名,其实就是 tuxxxxxx.tsinghua.edu.cn, xxxxxx 就是你的 IP 后面的数字,比如我的IP是166.111.140.66, 所以我的域名是 tu140066.tsinghua.edu.cn.

    $mydestination 指出哪些地址是认为是你自己的地址。你应该把你的机器名(我的是 wangyin.com),$myhostname, $localhost.$mydomain 加进去。

  3. 为了能够使用 SASL 验证登录,把这些行加到 /etc/postfix/main.cf
    smtp_sasl_auth_enable = yes         
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    relayhost = mails.tsinghua.edu.cn
    
  4. 编辑口令文件 /etc/postfix/sasl_passwd。加入一行:
    Your.Relay.Server           your_auth_login_name:Your_PassWord
    

    比如我的口令文件是这样的:

    mails.tsinghua.edu.cn          wang-y01:aDF2m@3d$q=+
    

    当然密码不是那个 :P

  5. 把口令文件转成 Berkeley DB 格式:
    #postmap hash:sasl_passwd
    
  6. 启动你的 postfix 服务器
    postfix start
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值