OpenBSD Journal

IMAP Daemons?

Contributed by jose on from the mail-folders-on-a-remote-box dept.

While I found a POP3 daemon I liked (popa3d, in OpenBSD base for a while), I haven't been able to find an IMAP daemon with similar strengths. I'm aware of the Courier IMAP daemon, but I have no experience with it. I have used the UW IMAP distribution but am always leary of it due to its questionable security record (and obfuscated codebase).

Anyone have an IMAP daemon they're happy with on OpenBSD, preferably one that supports mbox style mail boxes?

(Comments are closed)


Comments
  1. By Chris () on

    i really like cyrus IMAP. i have only used it in linux, but i am pretty sure its in OpenBSD ports.

    -Chris

    Comments
    1. By Matthew () on

      Last I heard there were serious performance problems because cyrus doesn't know how to use mmap() on BSD properly (and so falls back on less efficient ways of handling files). This is just from memory of list traffic, though. Me, I'm going with Linux behind an OpenBSD firewall for now.

      Comments
      1. By click46 () click46@operamail.com on mailto:click46@operamail.com

        its primarily developed on solaris boxen so all of cmu's software works best on solaris boxes.

      2. By Anonymous Coward () on

        Last I heard there were serious performance problems because cyrus doesn't know how to use mmap() on BSD properly

        That isn't the case anymore. I've been using Cyrus IMAPD on NetBSD 1.6 and it detects mmap() , its configure script chose not to use it in versions before 1.6 but like I said, that was in the past. I've also set it up on a FreeBSD 4.6 server with absolutely no complaints.

  2. By djm () on

    I use courier-imap at home, but I too would prefer one which was used mbox files and was reasonably trustworthy (which excludes UW-IMAP).

    That being said, I have never had a problem with courier-imap - I just don't like Maildirs.

    Comments
    1. By schubert () on

      Keep an eye on 'dovecot' the author claims it is supposedly coded with security in mind.

    2. By Anonymous Coward () on

      What is the problem with Maildir? It is way easier to crowl with a good skript and it is much easier to code some imports into a database for making a knowledge base out of a maillist.

      Besides all the other pluses like better stability etc...

      Comments
      1. By Anonymous Coward () on

        i dont thing there is anything wrong with Maildir, its just mbox & pop3 are nice and simple.

      2. By pravus () on

        personally i don't have anything against maildir, but many of the mbox vs. maildir arguments present valid points for each side. someone has probably already suggested it, but i've always thought a combo of both of them might be a good middle ground between the two. use the maildir style of individual files to represent each message, but keep an mbox-style cache of the headers for quick searching.

        of course, this adds to the complexity since it would mean the cache could desync from the message store. also, it's extra work every time a message is either added, moved, or deleted... however, if done properly, it might be quite nice.

        anyone seen any work done on a system like this?

        Comments
        1. By Anonymous Coward () on


          anyone seen any work done on a system like this?

          Sure, check how cyrus handles its mail store for example ... or Evolution mua ... they both implement some interesting caching techniques for speed.

        2. By Anonymous Coward () on

          There's neato pop3 client for windows that is a bit more intelligent about how it fetches messages (i.e. grabbing headers first; then messages) making it a bit more akin to imap in some benefit senses. Unfortunately, I haven't seen another client that has a similar design, regardless of platform. Even as a win32 client it's a bit lacking in some respects, no attachment support (and definitely nothing security related like apop, etc.).

          mbox or maildir shouldn't matter quite so much at the client side anyway though.

    3. By Anonymous Coward () on

      I actually know someone, a real person, who I am not making up, who never uses arrays. They program, but they don't use arrays -- anywhere. The reason given was that they "don't like them".

      As anyone who's ever done any sort of programming beyond "Hello, world" knows, arrays are an absolute neccessity for many applications. Yet, rather than have a multidimensional array, this kid would rather have 25 variables that look like

      value1_subvalue1
      value1_subvalue2
      value1_subvalue3
      value1_subvalue4
      value1_subvalue5
      value2_subvalue1
      value2_subvalue2

      ...and so on. This kid also "doesn't like" good chicken -- he preferres stale chicken -- and he "doesn't like" ice cream. I'm not sure if the kid is masochistic or just very, very misguided -- he's not stupid, he's a mathematical genius, but he certainly seems stupendously retarted at times.

      I am not making any of this up.

      I know all of this for a fact.

      I would swear on my reputation, my balls, my life, the entire world, or God himself that this is true.

      Bear that in mind the next time you say you "don't like" something. Because to me, maildir seems like a logical, evolutionary step -- just as logical as arrays, over a huge number of individual variables. If you have a good reason for not liking maildir, please tell me.

  3. By RC () on

    I'm always surprised by how rare an e-mail service with IMAP is... I has most of the benefits of Web-mail, as well as the advantages of POP. Anyone know why webmail+pop reamain popular rather than webmail+imap?

    Comments
    1. By schubert () on

      IMAP is more taxing on server resources.

      Comments
      1. By Anonymous Coward () on

        not as taxing as imp is on apache (at least my ppro 200) it can easily push to 60% cpu usage for 5-10seconds (just loading your inbox)

        Comments
        1. By Anil Madhavapeddy () anil@recoil.org on mailto:anil@recoil.org

          That's because IMP is an IMAP client. Unfortunately, since it doesn't maintain persistent connections, it has to open your mailbox and do all the handshaking every time you click on a link.

          There's some work underway by Horde called 'imapproxy' which holds persistent IMAP connections open for webmail clients, but it's early days yet.

          Comments
          1. By James () on

            well it's version 1.0
            I tried it out, though it doesn't seem to change anything the high load is apache not imapd
            doing a top -s 1 and no idle i can see httpd processes spike and on *RARE* occasion i might see imapd jump to 1% cpu

          2. By James () on

            well it's version 1.0
            I tried it out, though it doesn't seem to change anything the high load is apache not imapd
            doing a top -s 1 and no idle i can see httpd processes spike and on *RARE* occasion i might see imapd jump to 1% cpu

          3. By James () on

            well it's version 1.0
            I tried it out, though it doesn't seem to change anything the high load is apache not imapd
            doing a top -s 1 and no idle i can see httpd processes spike and on *RARE* occasion i might see imapd jump to 1% cpu

        2. By schubert () on

          I didn't say it wasn't. You're answering a comparison never made.

      2. By RC () on

        Taxing how? Memory, CPU, etc? I have a difficult time beliving that it cound be more taxing than dynamically generating numerous web-pages every time a user clicks on a link. Only having to work when the user connects, and deletes, or moves a message seems minor in comparison.

        Comments
        1. By Matthew () on

          Hmmm... only having to do something every time a user clicks a link to view or delete a message is going to be more taxing than processing when the user connects, or views, or deletes, or moves, or stores a new message? IMAP is more disk-intensive, and it has basically the same processing spikes that pop-webmail has.

          Comments
          1. By RC () on

            > only having to do something every time a user clicks a link to view or delete a message is going to be more taxing than processing when the user connects, or views, or deletes, or moves, or stores a new message?

            You lost me there. What were you trying to say and what were you saying it about?

        2. By schubert () on

          ... taxing in COMPARISON TO POP3 which is what the original thread question ASKED. I doubt it could be more taxing than 'dynamically generating numerous web-pages every time a user clicks on a link' or do you mean a web server generating dynamic content? Sure I bet it is to. Too bad my statement was referring to pop3 versus imap. Think before you type.

          Comments
          1. By RC () on

            > ... taxing in COMPARISON TO POP3 which is what the original thread question ASKED

            Thank you for clarifying, but I'm rather sure I already knew what I had asked.

            > Too bad my statement was referring to pop3 versus imap.

            Yep, that is too bad.

            > Think before you type.

            Always a good idea. Be sure to follow your own advice.

        3. By Anonymous Coward () on

          We've a couple IMAP users that have well over 10,000 messages stored on one of our servers. Taxing.

      3. By Anonymous Coward () on

        I've noticed that the whole OpenBSD crowd is paranoid not just about security... but about server resources. "But... but.... my 486 will grind to a halt if I try that!" I understand that some people simply cannot afford to spend $200 to get a new-to-me machine... but how exciting is it to spend all this time worrying about getting use out of antique machines thereby saving $100, in the process of spending $1000 worth of time? Really, you can get brand-new 1ghz machines from Dell these days for $500 or so. Any 1st-world business user will just buy a new machine with 2ghz and 1gb of RAM for <$1000.

        Comments
        1. By Anonymous Coward () on

          missed the point: free, functional AND secure.

          i think we all understand free and secure(sometimes not everyone), but functionality is big too...why *waste* resources do something inefficient? who cares what type of box it is? it comes down to sane implementations and using the right tool for the job. sure some application or protocol, that you *have* to use, might not be the best, but why sit there and except it? it's this relatively young community's duty to bring to light todays' issues so that they may be addressed.

          don't harp on OpenBSD.

        2. By Ben Johnson () on

          You can, perhaps, quadruple the thuroughput of a server buy throwing more hardware at the probplem with PC-based hardware (unless you're upgrading old hardware) But by using the correct server, on the same hardware, you can achieve a hundred-fold increase in speed. Don't belive me?

          We've been lucky to get 50 clinets working smoothly using MS-Exchange, 5000 clients using any of the open-source mail programs is a cinch.



    2. By Anonymous Coward () on

      IMAP might be harder to code for?

    3. By orev () on

      ISPs don't want your mail sitting on their server. They don't want to have to worry about it. Sure, you can set POP to leave it on the server, but I bet more people than not don't set that option.

      Comments
      1. By RC () on

        > ISPs don't want your mail sitting on their server. They don't want to have to worry about it.

        What about all those providing web-based email? The mail remains on their server. Besides, pop still requires them to save the mail at least until you next check your mail... For some, that may mean minutes, for others, months.

        Your answer doesn't add up.

  4. By ViPER () viper@dmrt.net on http://www.dmrt.net

    Works great low cpu usage on our 550 Mhz P3 512mb
    About 100 users using imap over ssl here.
    courier-imap imap 127.0.0.1 acess (by ssl webmail)
    courier-imap imaps mail clients outside.

    (we use Maildir & postfix as MTA)

    Comments
    1. By Brian () on

      we have almost this exact same setup, and it works great. However, we put a little program called "IMAPProxy" in between the webmail and Courier, which greatly sped up webmail access on large folders.

  5. By Tim () jabbo@yahoo.com on http://flaver.com/

    Courier-IMAP + Postfix + other stuff HOWTO:
    http://howtos.eoutfitters.net/email/

    Also think about using Qmail-LDAP-control and PHP-QLadmin for the Final Solution to all email concerns:
    http://www.mrzesty.net/index.html?frame=http://braindump.MrZesty.net/qmail-ldap.html

    I think you will be happy you did. I have been setting up a qmail-ldap-control MRA/MTA cluster, using Courier-IMAP on a couple of RAID-happy fileservers for delivery, and using Squirrelmail across our webservers to provide webmail decoupled from the MTA/MRA or MUA. That way people can use Mutt, Outlook, webmail, whatever, and not worry about a single point of failure. The architecture scales up and down nicely -- you can do it all on a single Free/OpenBSD box (qmail-ldap + openldap + courier + phpqladmin + sqwebmail) or scale it almost infinitely with the automatic QMQP clustering of the MTA/MRA machines.

    The Maildir format is also easier to do atomic backups of -- I routinely sync my personal email off-site with a machine in a friend's garage, 3000 miles away, by rsync'ing my Maildir in the background from .profile. Try that with mbox...

    Comments
    1. By Anonymous Coward () on

      Qmail-LDAP + alot other patches and Courier-IMAP + Horde/IMP here. Works lovely :) could also use Squirelmail webmail for this one, haven't tried it yet though.

      NOFI against Postfix, i don't have hard feelings against Postfix.

  6. By tom () tom@replic8.net on mailto:tom@replic8.net

    Cyrus works fine, but doesn't handle Maildir-style directories; Courier-IMAP (http://www.inter7.com/courierimap/)
    works great on OpenBSD, I'm running it together
    with Postfix on my home server. Using it I can connect via IMAP or read my mails using mutt or whatever on the 'Maildir' in my home directory,
    too. SQL- and LDAP- is supported to make large
    installations easy.

  7. By Anonymous Coward () on

    Check out dovecot. I believe Margarida Sequiera either commited it to -current or was looking into it. In regards to some of the comments of why IMAP isn't popular, I can give my main reason.
    That is simply that it's complex and obtuse in comparison to POP3. Yes it has more features, like mailboxes and such. But hey, is this more of a functional crowd, or a featuristic one ?

    grep "feature request" /usr/src/usr.bin/mg/theo.c

    Comments
    1. By RC () on

      > In regards to some of the comments of why IMAP
      > isn't popular, I can give my main reason.
      > That is simply that it's complex and obtuse in
      > comparison to POP3.

      Okay, but web-mail is even more complex. So for services already providing web-mail, why would IMAP be difficult to provide?

      Comments
      1. By Anonymous Coward () on

        Web mail over pop is relatively straightforward by comparision IMO. Login->read mbox->manipulate mbox->Logout. Getting webmail to be all nice and pretty and compatible with all browsers is probably a totally different story. (I wouldn't wish web programming on anyone). Also I found setting up IMP/Horde to do just POP was very straightforward, whereas trying to configure any of the IMAP servers just would not for me. (This is probably due to me not really being an IMAP guy, but still).

      2. By Anonymous Coward () on

        IMAP doesn't sell. To the average user (ms windows and outlook express) there's no difference between POP and IMAP, they both just get the mail.
        Webmail however does look different to those users, and does give them an extra value.

        Only 'power-users' understand, and appreciate, the extra value IMAP offers over POP. So only companies that target these users will offer IMAP. Others just won't bother, since it doesn't get them any $$$

      3. By Anonymous Coward () on

        Okay, but web-mail is even more complex. So for services already providing web-mail, why would IMAP be difficult to provide?

        because it's still added complexity. why make webmail even more complex?

        let's look at the difference in complexity: POPv3: rfc 1939 (23 pages) , IMAPv4r1: rfc 2060 (82 pages)

        also, with regards to imap maintaining a connection, this might be more taxing since throughout a user's session some mem will be used, whereas with pop the use will come and go. so while the user is reading a long email or composing a new mail no system resources are being used.

    2. By Anonymous Coward () on

      I'd think that we're a server crowd, which makes me wonder why IMAP isnt more common...

      Let the server have the redundancy (and the data), and leave the desktop to what it does best.

      IMAP rocks. I will NEVER use POP again. Period.

      WebMail = IMAP. Feature sets are almost identical. When designing a webmail application, it makes perfect sense to have it be a simple front-end to an IMAP server.

  8. By Anonymous Coward () on

    Are you by chance mixing WU *.* with UW? ie, WU-FTP.... Two different beasts.

    Comments
    1. By matteo () on

      no they aren't. UW is for university of washington, which provides a version of imap which while open source and fairly common, is fairly obtuse, more academic than stable, and has a history of security problems.

      Comments
      1. By Buck () on


        Ironically, the WU in WU-FTPD stands for Washington University which is actually in St. Louis, MO. It has its own history of security problems.

  9. By synfin () on

    i personally use courier-imap (over ssl) as may imap server, postfix+qmail as may mta. i used postfix as my smtp server and qmail's sendmail binary to my vpopmail accounts. i use vpopmail as may postfix' backend.

  10. By janus () janus@errornet.de on http://janus.errornet.de

    ... is courier-imap and exim.
    I've it running since a few months and it works great. It's all based on LDAP, so the administration is really easy.
    I tried cyrus, but struggeling all the time with the SASL-lib made myself go crazy, so i switched to courier.
    If someone is interested in the configs, mail me :)

  11. By ben () boudiou at reynerie.org on mailto:boudiou at reynerie.org

    While I was looking for an imapd that could manage virtual domains, I found UW and Cyrus disqualified. So the only leaving one was... courier-imap.
    I would have prefered unix mbox to maildir but...

    An other thing: courier provide a lot of possible authentif methodes (ldap, mysql, dbfile, passwd, ...) and allow you to have pop/imap account without corresponding /etc/passwd account, fine, no ?

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]