You can imagine where it goes from here…

SMTP & POP3 on Mac OSX

I need a SMTP & POP3 server for the current project I’m working on. This would be a 10 minute operation to get going on Linux (in all fairness in part due to familiarity).

I selected Exim for SMTP and QPopper for POP3.

Exim

Pretty straight forward, installation process just like on any other *nix. Make sure $PREFIX/var/spool and $PREFIX/var/spool/log and $PREFIX/var/mail exists and are owned by the exim user (compiled into the binary, i just used account manager to add an exim user). Add sticky bit to /var/mail (chmod 1777).

QPopper

Less straight forward, configure with:

./configure –enable-debug –with-pam=pop3 –enable-standalone

The included pam sample file does not work for me, in the end i just copied /etc/pam.d/ftpd to /etc/pam.d/pop3

To test, fire it up on the command line with:

sudo /usr/local/sbin/popper 127.0.0.1:110 -d -t /var/log/qpopper.log -S

which should fork off and create a daemon process.

Write a StartupItem script based on CrashReporter as the documentation suggests, here’s my interpretation:

[xxx@xxx QPopper]$ cat QPopper
#!/bin/sh##
# QPopper Daemon
##. /etc/rc.common

StartService ()
{
        if [ "$QPOPPER:=-YES-}" = "-YES-" ]; then
                /usr/local/sbin/popper 0.0.0.0:110 -d -t /var/log/qpopper.log -S
	fi
}

StopService ()
{
        killall popper
}

RestartService ()
{
        StopService
        StartService
}

RunService "$1"
Advertisements

January 1, 2007 - Posted by | Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: