Tim's Web Home

Gentoo Mail server on the T website

Gentoo Mail server:

安装配置 postfix 服务器软件

  • 安装 postfix 服务器软件,转换档案的资料库需添加 USE: "berkdb"
      root # emerge -av postfix
      # 修改配置文件
      # /etc/postfix/main.cf : myhostname,  myorigin,  inet_interfaces,  mydestination,  mynetworks,  relay_domains,  alias_maps,  alias_database
      # /etc/mail/aliases    : root : root,tim
      # /etc/postfix/access  : 允许/不允许通过的IP地址
      root # vim /etc/postfix/main.cf
      root # vim /etc/mail/aliases
      root # echo "192.168.0.100  OK" >> /etc/postfix/access
      root # echo "192.168.0.101  OK" >> /etc/postfix/access
      root # echo "xxx.com  REJECT" >> /etc/postfix/access
      #检查配置
      root # postfix check
      #转换档案的资料库
      root # postmap hash:/etc/postfix/access
      root # postalias hash:/etc/mail/aliases
      #启动服务
      root # /etc/init.d/postfix start
      #开机启动
      root # rc-update add postfix default
    
     file     /etc/postfix/main.cf
      #修改了部分配置
      myhostname = tiimmm.com
      myorigin = $myhostname
      # inet_interfaces = $myhostname, localhost
      inet_interfaces = all
      mydestination = $myhostname, localhost, tiimmm.com
      mynetworks = 127.0.0.0/8, 192.168.0.0/24, 192.168.122.0/24, hash:/etc/postfix/access
      relay_domains = $mydestination
      alias_maps = hash:/etc/mail/aliases
      alias_database = hash:/etc/mail/aliases
    
     file     /etc/mail/aliases
      #修改了部分配置
      root : root,tim
    

版权声明

本文作者是一位开源理念的坚定支持者,所以本文内容遵照开源的精神发布。
无担保:本文作者不保证此文内容准确无误,亦不承担任何由于使用此文档所导致的损失。
自由使用:任何人都可以自由的阅读/链接/打印此文档,无需任何附加条件。
名誉权:任何人都可以自由的转载/引用/再创作此文档,但必须保留作者署名并注明出处。
其他作品
本文作者十分愿意与他人分享劳动成果,如果你对我的其他作品有兴趣,可以在如下位置查看现有的作品集:
Tim 作品集 [ https://tiimmm.com/ ]
联系方式
由于作者水平有限,因此不能保证此文内容准确无误。如果你发现了此文中的错误(哪怕是错别字也好),请来信指出,任何提高此文质量的建议我都将虚心接纳。
Email: tiimmm dot chen at gmail dot com



网站制作者:Author:tiimmm dot chen at gmail dot com, Welcome to email for discussion!



T站勉强运行341天3时1分4秒
多伦多时间:2024-05-20 Monday 01:34:19 AM