Sendmail 与 SMTP [英] Sendmail vs SMTP

查看:82
本文介绍了Sendmail 与 SMTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

生产中的 rails 应用程序应该使用 smtp 还是 sendmail 发送邮件?

A rails application in production should use smtp or sendmail to send mails?

推荐答案

SMTP 是几乎所有 Internet 主机用于发送邮件的协议.该协议由 sendmail 使用.Sendmail 决定将邮件发送到何处以及如何发送.

SMTP is the protocol that is used by nearly all Internet hosts to send mail. This protocol is spoken by sendmail. Sendmail determines where to send your message and how.

一些邮件程序(大多数,今天)将直接连接到邮件服务器并与它通信 SMTP.然而,传统"方法——并且可以说是更好的方法——是让 sendmail 来做.

Some mail programs (most, today) will connect directly to a mail server and speak SMTP to it. However, the "traditional" method - and arguable the better method - is to let sendmail do it.

这有两个原因:1) 几乎所有 UNIX 中执行 sendmail 功能的程序都被设计为替代品(这包括 PostfixExim 例如);和 2) sendmail 或其替代品旨在处理邮件而不是其他任何东西 - 通过使用 sendmail,您不必设计 SMTP 客户端.

There are two reasons for this: 1) nearly every program in UNIX that does what sendmail does is designed to be a drop-in replacement (this includes Postfix and Exim for instance); and 2) sendmail or its replacement was designed to handle mail and nothing else - by using sendmail you don't have to design a SMTP client.

用于 UNIX 的 Mutt 电子邮件客户端是一种仍然拒绝与邮件服务器直接使用 SMTP 通信的电子邮件客户端;wiki 上有一个很好的(技术)描述.

The Mutt email client for UNIX is one email client that still refuses to talk SMTP directly to a mail server; a good (technical) description is on the wiki.

如果您可以选择(无论如何在 UNIX 上)直接使用 SMTP 或使用 sendmail,请使用 sendmail - 尤其是在服务器上.

If you have a choice (on UNIX anyway) of talking SMTP directly or using sendmail, use sendmail - especially on servers.

这篇关于Sendmail 与 SMTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆