English 中文(简体)
请批评我提议的架构:将新电子邮件的窗户服务到因特网数据库
原标题:Please critique my proposed architecture: windows service for parsing incoming emails to asp.net database

我有一份现有的“p.net c#”申请,我谨执行一个功能,使用户能够通过电子邮件张贴内容。 用户将发送电子邮件给指定地址,该系统将安装电子邮件,并利用电子邮件主题、机构和任何所附图像制作数据库条目。 我提议的办法是建立一个窗口服务,使电子邮件提供人能够检索收到的电子邮件。 然后,该处将利用现有图书馆进行电子邮件:。 用户将按外地电子邮件地址与作为自动网成员的对应,然后从该用户的电子邮件内容中插入新的记录。 最初,窗户服务将有一个单独的EC2案例,由于目前的东道方不允许根本进入,我为此设置了这个例子。 但是,最终我很可能把整个地点移至EC2。

Before I dive in I wanted to get some feedback from you all on my overall approach and architecture. More specifically:

  • Is what I described above the approach you would take?
  • Would you recommend implementing a web service to manage the interactions between the windows service and the database of the asp.net site? Or would you recommend hitting the database directly?
  • If I program the windows service to ping the email provider every 30 seconds, will that be a problem?
  • Do you foresee any security issues with this approach I ve outlined?
  • What about issues with reliability (needs to be a 24x7 service)?

附加背景——即星号网站是一个清单系统,每个条目都有名称、描述和选择性图像。 从电子邮件中,该主题将成为名称,尸体将成为描述,图像是图像。 如果你重新熟悉邮政博客平台,那么你就有一个很好的参照点来说明我所要完成的工作。

最佳回答

Is what I described above the approach you would take?

It would be better if you could set up an Exchange server or sth similiar where you get notifications about new emails, so you don t have to ping every 30 minutes, but I never did it this way and cannot tell you if this is even possible.
The approach itself sounds plausible, because sending emails is really easy and everybody knows how to do that.

Would you recommend implementing a web service to manage the interactions between the windows service and the database of the asp.net site? Or would you recommend hitting the database directly?

I would recommend an extra abstraction layer, because it is not much effort and improves the design. This decreases performance (shouldn t be that much), so it depends on your requirements.

If I program the windows service to ping the email provider every 30 seconds, will that be a problem?

Depends on your email provider. Normally and if they allow it: No. You should definetly ask them first.
If it s your own: You re good to go.
There can be problems however if you re doing this inside a thread and you re accessing the IMAP multiple times at the same time. You should try to avoid that.

您是否预见到在我概述的这种做法中有任何安全问题?

Yes. You can easily forge the "from" field of an email you ve send. There can be issues then, if the email is known. You should definetly add some kind of extra security like sending the mail to <SaltedHashThatIsDifferentForEachUser>@example.com. (Facebook does this too for example)

可靠问题是什么(需要24x7服务)?

I see more problems with the reliability of your email provider than with your service, because as long as the emails are saved, you can still parse them later.
You should investigate the maximum size of your imap to avoid rejected mails (e.g. delete them once you ve successfully parsed them)

问题回答

你们是否建议实施一个网络服务,以管理窗口服务与因特网网站数据库之间的互动? 或者,你是否建议直接打上数据库?

没有必要有一个网络服务,它只会增加复杂性,并在你的网络服务器上引入另一个攻击目标。 您的窗口服务直接打到你的数据库,将更加简单、安全。

如果我计划每30秒向电子邮件提供人提供窗口服务,这将是一个问题吗?

不应成为问题...... 电子邮件提供者提供持久性有机污染物3和亚甲苯胺,以便外部服务能够使用这些服务(外观、bird鸟、一听电话),以便他们期望他们不断 p。

Do you foresee any security issues with this approach I ve outlined?

正如西蒙所说,电子邮件很容易伪造,从而造成安全的脆弱性。 http://www.google.com/url?sa=t&source=web&cd=6&ved=0CEEQFjAF&url=http%3A%2F%2Fblog.dustincurtis.com%2Fthoughts-on-the-posterous-hack&rct=j&q=security%20email%20updating%20posterous&ei=4erwTdbMP4fkhtm 作为独联体经济体方案,我倾向于倾向于安全,特别是在脆弱性非常容易利用的情况下。

独一无二的“秘密”电子邮件地址在安全方面是一个更好的解决办法。 然而,这远远超出了你简化更新进程的目标。 这也使你的解决办法更加复杂和昂贵,因为你们需要能够支持(并在方案上创建)每个用户的独特地址。

What about issues with reliability (needs to be a 24x7 service)?

多数主流电子邮件提供商尚未获得。 关于这种解决办法的有无(如果没有诸如您目前的硬件和东道设施等以前存在的因素),你希望确保窗口服务是精心撰写的,并包括一些“不宽容”。 例如,过去书写的服务处理外部依赖因素(数据库或无法使用的电子邮件)造成的几个选定的错误,以便它不会坠毁,而只是等待在线回来。 这提供了更好的可用性,因为当依赖性再次出现时,服务已准备好进行,而不需要有人人工重新启用窗口服务。

Is what I described above the approach you would take?

Due to the security vulnerability exposed by relying on the sender of the email for authentication and authorization, I would not take this approach. If the main goal was to simplify and streamline the addition of new items from mobile platforms, I would probably create a "mobile friendly" web page to accomplish this.

我刚刚从西雅图的一次网络设计会议返回,会议主要侧重于“非pc”平台。 在列举其为机动工业设计的非常创新的想法和最佳做法之后,我可以看到一个网络图是实现这一目标的伟大解决办法。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签