views:

30

answers:

1

Hello, i'm about to start the development of a new automated-email application. The idea is that customers (or other external users) send emails to a mailbox and then an automated process will read them, extract their information and insert it into some database. It's a requirement that the emails have an standard format in order to be parsed (standard subject, etc.). The obvious thing to do would be to set up a process that periodically polls an ordinary mailbox, through pop-3 for example, processing the messages it finds. However, it would be for me much nicer to be able to process the emails as they arrive. I was wondering then, is there any way to set up a process that acts as a fake email-box? do you know about any open-source implementation of something like that I can extend? I would prefer something already written in c#.

Thanks in advance for your help, bernabé

+1  A: 

It's probably easiest to set up a local mail system with a mail retrieval agent (MRA) and mail delivery agent (MDA). A common combination is fetchmail for an MRA and either procmail or maildrop for an MDA. The MRA downloads mail from your account (POP3, IMAP, etc.), and the MDA processes it to figure out what mailbox it belongs in. I know at least maildrop, but probably procmail as well, supports running arbitrary scripts on the messages, so you could use that to process each e-mail

Michael Mrozek