Quantcast

Store for e-mail messages

classic Classic list List threaded Threaded
7 messages Options
shk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Store for e-mail messages

shk
Hello,

I need advice.

I'm going to create smtp/pop3 mail server in erlang and i want to ask question: What store the best for e-mail messages text( + maybe attachment): database, files or something else?

Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

Tomasz Maciejewski
Dnia 20-12-2010 o 16:57:46 shk <[hidden email]> napisaƂ(a):

> What store the best for e-mail messages text( + maybe attachment):
> database, files or something else?
>
> Thank you.

There are generally two popular ways of storing emails:

1. http://en.wikipedia.org/wiki/Mbox

2. http://en.wikipedia.org/wiki/Maildir

--
Tomasz Maciejewski

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

Jesper Louis Andersen-2
In reply to this post by shk
On Mon, Dec 20, 2010 at 16:57, shk <[hidden email]> wrote:
>
> Hello,
>
> I need advice.
>
> I'm going to create smtp/pop3 mail server in erlang and i want to ask
> question: What store the best for e-mail messages text( + maybe attachment):
> database, files or something else?
>

Don't dwell too much on that. Build a fast, easy storage first, but
keep in mind it will be replaced later if it proves to be too
ugly/slow/incorrect. There are other things in your project which are
far more important getting right first. In the long run, you should
spy on what postfix does :)


--
J.

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

Jeffm-3
I don't know what the intended use is, but...

I'd suggest using MailDir including the method outlined for creating
files and moving them. . I'd then build a database on top of that to
find individual messages. This has the advantages that,

* it's easy to manage individual messages using standard unix shell
commands.
* if it crashes you can rebuild the database using the message files
* if you suffer file system corruption it's easier to at least get some
of the messages back.
* You can use existing tools, eg a MUA, to inspect the messages during
development.

If you haven't already take a look at qmail but don't copy it. It has
some nice ideas, but (to my mind) is not easy to work with. Look at
postfix as a good example of how to do things. There are things that it
could do better or doesn't do, and should be easier with Erlang, eg
distributed mail process and mail boxes.

Please keep us informed. I'd like to help if you start to make progress.

Anyway, hope that helps.

Jeff.

On 21/12/10 4:58 AM, Jesper Louis Andersen wrote:
> On Mon, Dec 20, 2010 at 16:57, shk<[hidden email]>  wrote:
> Don't dwell too much on that. Build a fast, easy storage first, but
> keep in mind it will be replaced later if it proves to be too
> ugly/slow/incorrect. There are other things in your project which are
> far more important getting right first. In the long run, you should
> spy on what postfix does :)
>
>


________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

shk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

shk
In reply to this post by shk
First of all, thank you for your advices.

What do you think about mnesia for mailbox store?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

Jan Vincent Liwanag
Here's a good one:

http://erldocs.com/

Sent from my iPhone

On Dec 25, 2010, at 5:19 PM, shk <[hidden email]> wrote:

>
> First of all, thank you for your advices.
>
> What do you think about mnesia for mailbox store?
> --
> View this message in context: http://erlang.2086793.n4.nabble.com/Store-for-e-mail-messages-tp3095726p3163676.html
> Sent from the Erlang Questions mailing list archive at Nabble.com.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:[hidden email]
>

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Store for e-mail messages

Chad Depue
In reply to this post by shk
mnesia is incredibly slow to restart a node if there's a lot of data and you
don't shut the node down correctly, at least in my experience - it's great
for certain types of data but i'd never build an email storage system around
it.

Chad

On Sat, Dec 25, 2010 at 6:19 AM, shk <[hidden email]> wrote:

>
> First of all, thank you for your advices.
>
> What do you think about mnesia for mailbox store?
> --
> View this message in context:
> http://erlang.2086793.n4.nabble.com/Store-for-e-mail-messages-tp3095726p3163676.html
> Sent from the Erlang Questions mailing list archive at Nabble.com.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:[hidden email]
>
>
Loading...