Linux 开发 SMTP 服务器

发布于 2024-10-29 19:28:59 字数 352 浏览 8 评论 0原文

大家好,我正在为我的开发机器寻找一个好的 SMTP 服务器。我正在运行 Linux mint 10。我需要一个好的 SMTP 电子邮件陷阱,它将侦听本地主机端口并拦截来自我正在开发的 Ruby on Rails 应用程序的所有电子邮件,而不将它们转发给全世界。该应用程序需要允许我打开和查看电子邮件,以便我可以查看正在发送的测试电子邮件。

我问这个问题是因为当我在 Windows 上工作时,我可以安装大量的小应用程序,它们会侦听端口 25,并在我开发和测试应用程序时收集从应用程序发送的所有电子邮件。这些小应用程序允许我在收到电子邮件后打开电子邮件,以便我可以验证电子邮件的内容。我在 Linux 上需要类似的东西(确切地说是 Mint 10)。

高级致谢

Everyone, I am looking for a good SMTP server for my development machine. I am running Linux mint 10. I need a good SMTP email trap that will listen to the localhost port and intercept all email originating from Ruby on Rails applications I am developing on without relaying them out to the world. The app needs to allow me to open and view the emails so I can review the test emails that are being sent.

I ask because when I worked on Windows there were tons of little applications I could install which would listen on port 25 and gather all the email sent from my applications as I developed and tested them. These little apps would allow me to open the emails after receipt so that I could verify the content of the emails. I need something like that on Linux (Mint 10 to be exact).

Advanced Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

弃爱 2024-11-05 19:28:59

如果您不告诉 Linux 的所有 SMTP 服务器如何发送数据,它们都会对您的邮件进行排队。我使用exim,所有用于此和sendmail的文件都以文本格式存储,因此非常可读。因此,两者都应该满足您的需求(我知道的每个发行版都附带 sendmail)

All SMTP servers for linux can queue your mail if you dont tell them how to send the data on. I use exim, all the files for this and sendmail are stored in text format, so are very readable. So, both should suit your needs (sendmail comes with every distro Im aware of)

╰◇生如夏花灿烂 2024-11-05 19:28:59

如果您希望在本地运行某些内容(特别是如果您已经有 ruby​​),MailCatcher 是一个不错的选择。它通过网络界面显示捕获的邮件。非常简单且易于安装。然后,您只需将应用程序配置为与不同的主机/端口进行 smtp 通信(如 mailtrap 答案中所示)

http://mailcatcher.me/

MailCatcher is a good option if you want something running locally (especially if you already have ruby). It presents caught mail via a web interface. Very simple and easy to install. You then just configure your app to talk smtp to a different host/port (like in the mailtrap answer)

http://mailcatcher.me/

溇涏 2024-11-05 19:28:59

我可能迟到了,但是 fakeSMTP 是一个非常好的且易于使用的开源软件和跨平台工具。

I may be late to the game, but fakeSMTP is a really nice and easy to use, open-source and cross-platform tool.

物价感观 2024-11-05 19:28:59

您选择的 SMTP 服务器,在 virtusertable 中有一个 *@* 或这样的条目,可以传送到单个帐户。

An SMTP server of your choice, with an entry in the virtusertable for *@* or so that delivers to a single account.

简美 2024-11-05 19:28:59

好的,对于 Ruby on Rails 开发,有一个简单的 gem,可以通过名为 Mailtrap 的 gem 管理器安装。


http://www.rubyinside .com/mailtrap-dummy-ruby-smtp-server-ideal-for-testing-actionmailer-629.html

[sudo] gem install mailtrap

确保将以下内容添加到您的环境文件中(开发)

  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.perform_deliveries = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :domain => "mydomain.net",
    :address => "localhost",
    :port => 2525,
  }
  config.action_mailer.default_url_options = { :host => 'localhost:2525' }

Ok, for Ruby on Rails development there is a simple gem that can be installed via your gem manager called Mailtrap.

See
http://www.rubyinside.com/mailtrap-dummy-ruby-smtp-server-ideal-for-testing-actionmailer-629.html

[sudo] gem install mailtrap

Make sure to add the following to your environment file (development)

  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.perform_deliveries = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :domain => "mydomain.net",
    :address => "localhost",
    :port => 2525,
  }
  config.action_mailer.default_url_options = { :host => 'localhost:2525' }
め可乐爱微笑 2024-11-05 19:28:59

qmail 速度快且可扩展,请参阅 http://www.qmail.org/top.html

qmail is quick and scalable, see http://www.qmail.org/top.html

淑女气质 2024-11-05 19:28:59

我们使用 mail_safe。它将开发中的外发电子邮件重定向到您在 git 中注册的任何电子邮件地址。非常简单的解决方案。

不过,仅当您使用 Ruby on Rails 进行开发时才适用。

We use mail_safe. It redirects outgoing email in development to whatever email address you have registered with git. Really easy solution.

Only applicable if you're developing in Ruby on Rails though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文