Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

storage and retrieval of email - IMAP is lacking?

compared to mysql, the storage and retrieval of IMAP seems awful

9:03 pm on Oct 17, 2008 (gmt 0)

New User

10+ Year Member

joined:Aug 29, 2007
posts: 10
votes: 0

I just finished programming a webmail system using dovecot (imap).

As far as managing the sending and receiving of email, pop3 seems to take care of things.

However, the retrieval of email using imap seems slow compared to how fast mysql can store and retrieve data.

Also, I created a 'sent' folder, and use imap_append() to store sent messages. However, when there are multiple recipients, it mangles the recipients addresses, so I have to store the message multiple times for each address. I hate having to do it like that. Anyone know how to store multiple recipients for one message with dovecot?

Is there anything out there that uses smtp to send and receive mail, but uses a mysql database for storage and retrieval?

And one more thing. I want to append a link to every outgoing message that is a link back to the webmail system. When clicked on, this will put the viewer straight into a 'reply' mode in the webmail. However, I can't get the unique id to create the link as the unique id gets generated when the email is sent. And, of course, once it's sent, I can't add any link to it. I see facebook has a link back to the reply appended to their outbound messages. Wondering how it might be done.

Thanks for any thoughts.

[edited by: tedster at 9:47 pm (utc) on Oct. 31, 2008]

8:34 am on Oct 21, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 23, 2003
votes: 0

Did you really sit down and write a webmail system from scratch? (If so - why?)

You say IMAP seems slow... what kind of server are you using to run your IMAP server? What *filesystem* are you using on your IMAP server?

If you telnet to port 143 and connect directly to IMAP, how is the response?

Are you sure it's IMAP, rather than your webmail code, which is causing the issues?

[Background: I have experience with Courier-IMAP+SqWebmail, Courier-IMAP+RoundCube and Courier-IMAP+SquirrelMail. Can't say I find any of them slow - and that's processing several thousand messages per folder.]

9:26 pm on Oct 22, 2008 (gmt 0)

New User

10+ Year Member

joined:Aug 29, 2007
votes: 0

I wrote it from scratch because php's imap functions do everything to the point where I'm just managing arrays in php.

I'm running it on ubuntu.

I'm sure my code is fine, it's not that complicated. However, I'll keep an open mind that there might be something off.

The telnet connection is quick. However, load times are quick now, too.

It might simply be a spotty network connection. Argh.

Thanks for your response.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members