REQUIREMENTS
- FreePOPs (POP3 proxy server)
Download FreePOPS for OS X from the OS X Downloads page. There are packages available for Panther and Jaguar. These are standard OS X style installer packages that will install a single directory named "FreePOPs" into your applications directory.
Since this is basically a command-line binary and has no GUI, and also because I wanted it to be accesible as a startup item, I decided to move the FreePOPs directory to a more suitable location -- /usr/local/. You can do this manually after running the installer package, or you can use something like Pacifist to extract the package contents directly into /usr/local/.
START THE FREEPOPS SERVER DEAMON
To start the server, you will need to use the Terminal and change directories (cd) to the FreePOPs directory (wherever you installed it):.
cd /usr/local/bin/FreePOPs
There really is no configuration required, so you can just issue the following command to start the server and put it in the background:
sudo ./freepopsd -p 110 -d
You should now be able to check your processes and see the freepopsd process running:
ps ax | grep freepopsd
CONFIGURE MAIL CLIENT (MAIL.APP)Open Mail.app -> Preferences, and create a new account. For the details use:
- Account Type: POP
- Username: your_full_gmail_address>
- Password: your_gmail_password
- Incoming Mail Server: 127.0.0.1
NOTES:
- The server will needed to be manually restarted every time you restart your machine
- You can only check/read your gmail - THERE IS NO OUTGOING MAIL THROUGH GMAIL
If you wish to have the freepops server daemon startup each time you reboot then follow the procedure below:
Create the following directory and files (as root):
/Library/StartupItems/freepops
/Library/StartupItems/freepops/freepops
/Library/StartupItems/StartupParameters.plist
Change permissions to executable on both freepopsd and StartupParameters.plist:
chmod 755 /Library/StartupItems/freepops/*
The structure should look something like this when done:
drwxr-xr-x 4 root admin 136 Sep 29 01:55 .
drwxrwxr-x 13 root admin 442 Sep 29 01:22 ..
-rwxr-xr-x 1 root admin 530 Sep 29 13:01 StartupParameters.plist
-rwxr-xr-x 1 root admin 523 Sep 29 13:25 freepopsd
Open the file /Library -> StartupItems -> freepops -> freepops, and paste in the following:
#!/bin/sh
##
# FreePOPs Server
##
## Note this is geared towards an installation of freepops in
## /usr/local/freepops. If you installed in some other location,
## change the 'base' line below to reflect the install directory:
base=/usr/local/FreePOPs
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting FreePOPs Server..."
#/usr/local/FreePOPs/src/freepopsd -w -l /var/log/freepops.log -p 110 -d
cd $base
/usr/local/FreePOPs/freepopsd -p 110 -d
}
StopService ()
{
if [ -f "/var/run/freepopsd.pid" ]; then
ConsoleMessage "Stopping FreePOPs Server..."
PID=`cat /var/run/freepopsd.pid`
kill -9 $PID
fi
}
RestartService ()
{
StopService
StartService
}
RunService "$1"
Open the file /Library -> StartupItems -> StartupParameters.plist, and paste in the following:
<?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>Description</key>
<string>FreePOPs Server</string>
<key>OrderPreference</key>
<string>Late</string>
<key>Provides</key>
<array>
<string>freepops</string>
</array>
<key>Requires</key>
<array>
<string>Resolver</string>
</array>
<key>Uses</key>
<array>
<string>Disks</string>
<string>Network</string>
</array>
</dict>
</plist>
To start the server for the first time manually, you can issue the command:
sudo SystemStarter start freepops
STARTUPITEM NOTES:
- I am a bit unsure about the correct permissions, but I believe they are set correctly above. If anyone has any thoughts, please post.
- I also changed permissions on /usr/local/freepops to:
Not sure about those either - but I believe they are correct.drwxr-xr-x 11 root admin 374 Sep 29 12:54 . drwxr-xr-x 40 root admin 1360 Sep 25 01:29 .. -rw-r--r-- 1 root admin 560 Sep 19 06:53 AUTHORS -rw-r--r-- 1 root admin 17987 Sep 19 06:53 COPYING -rw-r--r-- 1 root admin 8200 Sep 19 06:53 ChangeLog -rw-r--r-- 1 root admin 1442 Sep 19 06:53 README-osx.txt -rw-r--r-- 1 root admin 7406 Sep 19 06:53 config.lua drwxr-xr-x 4 root admin 136 Sep 19 06:53 doc lrwxr-xr-x 1 root wheel 13 Sep 25 01:29 freepopsd -> src/freepopsd drwxr-xr-x 3 root admin 102 Sep 19 06:53 modules drwxr-xr-x 4 root admin 136 Sep 19 06:53 src - I have been unable to get the StartupItem method to log correctly. If anyone has any suggestion ... it just never seems to write to the log when started via the StartupItems method. Manually starting it works fine. See the commented line in /Library -> StartupItems -> freepops -> freepops
- The following commands are also valid with the StartupItems method:
sudo SystemStarter stop freepops sudo SystemStarter restart freepops

