最新消息:

Postfix邮件系统常用检查命令

命令 admin 2浏览

1.使用命令行发送邮件进行测试

# telnet localhost 25

Trying 127.0.0.1…

Connected to localhost.localdomain (127.0.0.1).

Escape character is ‘^]’.

220 mail.extmail.org ESMTP Postfix – by extmail.org

mail from:user1@yaukb.com –>输入内容

250 2.1.0 Ok

rcpt to:user2@yaukb.com –> 输入内容

250 2.1.5 Ok

This is test mail –> 输入邮件内容

. —>退出

250 2.0.0 Ok: queued as BC24E85260

quit

221 2.0.0 Bye

Connection closed by foreign host.

2.查看日志

#tail -f /var/log/maillog

3.查看Mail Queue中邮件队列

#mailq

#postqueue -p

4.重新发送邮件

postfix flush

5.删除发送不成功的邮件

#删除某一天邮件

#postsuper -d ID号

#删除所有发送不成功的邮件

#postsuper -d ALL

刪除所有正在deferred队列(/var/spool/postfix/deferred:曾经发送失败的邮件)中的邮件

#postsuper -d ALL deferred

刪掉三天以前无法发出的邮件

#find /var/spool/postfix/deferred -type f -mtime +3 -exec rm -f {} ;

转载请注明:爱开源 » Postfix邮件系统常用检查命令

转载请注明:爱开源 » Postfix邮件系统常用检查命令