使用脚本处理收到的电子邮件 [英] Process incoming emails with script

查看:56
本文介绍了使用脚本处理收到的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

还记得 iwansandy.com 吗?它的所作所为非常受欢迎.无论如何,我想做类似的事情,但我的问题是,如何处理传入的电子邮件?假设我使用 PHP 甚至 Ruby 来执行此操作.我需要一种方法来处理电子邮件并将它们转储到数据库或其他东西中.好的,但我的主要问题是让脚本在收到电子邮件时启动.

Remember iwantsandy.com? It was quite popular for what it did. ANyways, I'm looking to do something similar, but my question is, how does one process incoming emails? Let's assuming I'm using PHP or maybe even Ruby to do this. I would need a way to process the emails and dump them into a DB or something. Ok fine, but my main question is getting a script to kick off when an email comes in.

我有一个 VPS,所以我可以完全控制我的环境并且它运行 Centos.

I have a VPS so I have full control over my environment and it's running Centos.

推荐答案

设置管道别名,将消息转发到脚本的标准输入:

Set up a pipe alias which forwards the message to the stdin of a script:

/etc/aliases:

/etc/aliases:

sendmailhere:    |/usr/local/bin/myscript

这篇关于使用脚本处理收到的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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