如何指定Sendmail smtp服务器?

Sendmail

1 前言

一个问题,一篇文章,一出故事。
笔者配置Sendmail生产环境需要指定一个发送的SMTP服务器,于是笔者整理此文。
详细的Sendmail环境配置请参阅以下章节,

如何部署Sendmail?

2 最佳实践

2.1 修改配置

vim /etc/mail.rc

加入如下配置,

set [email protected]
set smtp=smtp.cmdschool.org:25
set from=will@cmdschool.org
set smtp-auth-user=username
set smtp-auth-password=userpassword
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/ssl/certs/

注:以上配置请根据实际情况修改,很多为非必要配置。

2.2 测试邮件发送

echo 'it is only a test' | mail -s "test eamil"  will@cmdschool.org

参阅文档
====================
https://discussions.apple.com/thread/4612047
https://forums.centos.org/viewtopic.php?t=74727

没有评论

发表回复

Sendmail
如何编译安装Sendmail?

1 Sendmail的简介 – Sendmail是一种重要的邮件传输代理程序(MTA即M …

Sendmail
如何配置Sendmail虚拟邮件映射?

1 前言 一个问题,一篇文章,一出故事。 笔者需要将邮件“will@mail03.cmdschool …

Sendmail
如何部署Sendmail?

1 基础知识 1.1 邮件的基本概念 – MUA即Mail User Agent,接受用 …