Not all those who wander are lostgnu | Just another WordPress weblog

Oct/09

28

uw imapd setup on OS X 10.6 (Snow Leopard)

For demo purposes I needed a mail + IMAP server on my laptop. IMAP because there seems to be no way for Thunderbird to read from an mbox file (shocking!). Postfix comes default with OS X, so that was a no brainer.

However getting IMAP to work took some work. I’m detailing the steps here.

  1. Get IMAP source code from http://www.washington.edu/imap/ and untar somewhere. (I’m assuming you have full XCode development environment setup. If not, dig out your Install DVD and do so)
  2. Edit the top level MAKEFILE and comment out this line:
      EXTRACFLAGS="$(EXTRACFLAGS) -DMAC_OSX_KLUDGE=1"
    

    Make sure the next line (which is SPECIALS= is not commented out)

  3. Run make oxp
  4. Copy generated imap/imapd to /usr/local/bin
  5. Since 10.6 has no xinetd anymore, I had to write a launchd plist file. Create this file as /Library/LaunchDaemons/com.uwimap.imap.plist. Contents:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <dict>
        <key>Disabled</key>
        <false/>
        <key>Label</key>
        <string>com.uwimap.imap</string>
        <key>ProgramArguments</key>
        <array>
          <string>/usr/local/bin/imapd</string>
        </array>
        <key>inetdCompatibility</key>
        <dict>
          <key>Wait</key>
          <false/>
        </dict>
        <key>InitGroups</key>
        <true/>
        <key>Sockets</key>
        <dict>
          <key>Listeners</key>
          <dict>
            <key>SockServiceName</key>
            <string>imap</string>
          </dict>
        </dict>
      </dict>
    </plist>
    

    The file should be owned by user root and group wheel.

  6. Configure PAM support. I did this by this kludge:
    sudo cp /etc/pam.d/ftpd /etc/pam.d/imap
  7. Ask launchd to load and start this service:
      sudo launchctl load /Library/LaunchDaemons/com.uwimap.imap.plist
      sudo launchctl start com.uwimap.imap
    
  8. Try telnetting to localhost 143 and 993 to see if imap is up

This should create a functioning IMAP server. YMMV ;-)

No tags

5 comments

  • NerdXpress » uw imapd setup on OS X 10.6 (Snow Leopard) – Not all those who … · October 28, 2009 at 1:49 am

    [...] View post: uw imapd setup on OS X 10.6 (Snow Leopard) – Not all those who … [...]

    Reply

  • Noufal Ibrahim · October 28, 2009 at 2:02 am

    Isn’t dovecot an option? I’ve seen that recommended as the way to go if you want an offline IMAP server. DOn’t know about easily installable packages for OSX though.

    Reply

    • Author comment by aaditya · October 30, 2009 at 12:08 pm

      Well, UW IMAPd support OS X compilation out of the box. Pretty much everything else will need macports to compile.

      Reply

  • Richard · October 31, 2009 at 1:11 am

    Hi, if you need instructions on how to setup dovecot or courier (which both I consider better imap servers then uw) have a look at http://diymacserver.com it has everything you need to get your mailserver up and running on any mac.

    Reply

  • http://david45hagnew.webs.com · September 25, 2013 at 3:00 am

    My coder is trying to convince me to move to
    .net from PHP. I have always disliked the idea because oof
    the expenses. But he’s tryiong none the less.
    I’ve been using Movable-type on numerous websites for about a year and amm nervous about switching to
    another platform. I have heard excellent things about blogengine.net.
    Is there a way I can transfer all my wordpress posts into it?
    Any help would be reeally appreciated!

    Reply

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me