ubuntu Postfix安装使用

前端之家收集整理的这篇文章主要介绍了ubuntu Postfix安装使用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

postfix安装

  1. sudo apt-get install postfix
  2. sudo apt-get install mailutils

创建用户

  1. sudo useradd -m -s /bin/bash incoming
  2. sudo passwd incoming

启动postfix

  1. sudo postfix status
  2. sudo postfix start

测试

  1. telnet localhost 25
  2. # 填写邮箱信息
  3. ehlo localhost
  4. mail from: root@localhost
  5. rcpt to: incoming@localhost
  6. data
  7. Subject: Re: Some issue
  8.  
  9. Sounds good!
  10. .
  11. quit

配置postfix使用Maildir-style mailBoxes

  1. sudo postconf -e "home_mailBox = Maildir/"
  2. sudo service postfix restart

用户添加使用邮箱

  1. su - incoming
  2. mkdir /home/incoming/Maildir
  3. MAIL=/home/incoming/Maildir
  4. mail

postfix常用命令

  1. # 会列出当前在postfix发送队列中的所有邮件
  2. mailq
  3.  
  4. # 删除当前等待发送队列的所有邮件包括发送失败的退信
  5. postsuper -d ALL

猜你在找的Ubuntu相关文章