开发者

Storage/database solution for a custom POP3 Client?

开发者 https://www.devze.com 2023-02-01 03:43 出处:网络
The POP3 client is an homework assignment at one of my courses. It has to be done in Qt from scratch. Target platform: Linux (Ubuntu).

The POP3 client is an homework assignment at one of my courses. It has to be done in Qt from scratch. Target platform: Linux (Ubuntu).

What solutio开发者_开发问答n would you recommend when it comes to mail storage ? Since it is a homework assignment it has to be done "right"...

P.S. For now I think I would go with plain text, each message in a separate .txt and another file as an index. I'm not sure how this will be handled when the folder with the messages will get really big.


If my options where totally open, I'd pick a database tool (MySQL is overkill, SQLite would be perfect) because the tool can deal with sorting, IO access, file locks (if multiple instances are possible), deleting, defragmenting/cleaning/vacuuming.

On the other hand... there's a pair of standards for storing mail: MBOX and maildir (nice primer here) which it wouldn't be too hard to adopt into your programme.

What of attachments, text encoding and transfer encoding? That's where the real work's going to lie (unless it's out of scope of the assignment).

0

精彩评论

暂无评论...
验证码 换一张
取 消