- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: Introduction to Mac OS X
- Chapter 1. Mac OS X Component Architecture
- Chapter 2. Installing Mac OS X
- Chapter 3. Mac OS X Basics
- Chapter 4. The Finder: Working with Files and Applications
- Chapter 5. Running Classic Mac OS Applications
- Part II: Inside Mac OS X
- Chapter 6. Native Utilities and Applications
- Chapter 7. Internet Communications
- Chapter 8. Installing Third-Party Applications
- Part III: User-Level OS X Configuration
- Chapter 9. Network Setup
- Chapter 10. Printer and Font Management
- Chapter 11. Additional System Components
- Part IV: Introduction to BSD Applications
- Chapter 12. Introducing the BSD Subsystem
- Chapter 13. Common Unix Shell Commands: File Operations
- Part V: Advanced Command-Line Concepts
- Chapter 14. Advanced Shell Concepts and Commands
- Chapter 15. Command-Line Applications and Application Suites
- Chapter 16. Command-Line Software Installation
- Chapter 17. Troubleshooting Software Installs, and Compiling and Debugging Manually
- Chapter 18. Advanced Unix Shell Use: Configuration and Programming (Shell Scripting)
- Part VI: Server/Network Administration
- Chapter 19. X Window System Applications
- Chapter 20. Command-Line Configuration and Administration
- Chapter 21. AppleScript
- Chapter 22. Perl Scripting and SQL Connectivity
- Chapter 23. File and Resource Sharing with NetInfo
- Chapter 24. User Management and Machine Clustering
- Chapter 25. FTP Serving
- Chapter 26. Remote Access and Administration
- Chapter 27. Web Serving
- Part VII: Server Health
- Chapter 28. Web Programming
- Chapter 29. Creating a Mail Server
- Chapter 30. Accessing and Serving a Windows Network
- Chapter 31. Server Security and Advanced Network Configuration
- Chapter 32. System Maintenance
- Appendix A. Command-Line Reference
- Appendix B. Administration Reference
Web-Based E-mail
There are a number of packages that you can install to create Web-based e-mail, such as FocalMail from http://home.focalmail.com/. In addition, the PHP Web development language has the capability to talk directly to the IMAP servers. The Horde Project has created a Web-based e-mail package called IMP that is available as a free download from www.horde.org/imp/2.3/.
If you're interested in an extremely easy to set up solution, you might want to check out the Majora software, which can be downloaded from www.poisontooth.com/.
Written in Perl, Majora is easy to understand and simple to set up. Assuming that you've enabled CGI support in Apache, you can add a Web front end to your mail server in a minute or two.
First, download and unarchive the Majora distribution, placing it in a Web-accessible directory. In this example, the files are placed in my local Sites directory:
[primal:~/Sites] jray% curl -o http://www.poisontooth.com/software/majora.tar.gz [primal:~/Sites] jray% tar zxf majora.tar.gz
Next, cd into the Majora directory and open the file majora.cgi. There are a few lines at the start of the file that can be configured to better suit your site.
The following lines affect the coloring of the message output table. Alter the colors to adjust the HTML display in the client browser:
#### Color information for the display $NormalColor="BGCOLOR=\"#FFFFE9\""; $SelectedColor="BGCOLOR=\"#A0A0DD\""; $HeadingColor="BGCOLOR=\"#D3D3FA\""; $NumberColor="BGCOLOR=\"#CDCDDD\""; $SubjectColor="BGCOLOR=\"#FFEDED\""; $DateColor="BGCOLOR=\"#EDFFED\"";
When viewing messages in a Web browser, you don't want to worry about downloading several megabytes of attachments to the remote Web browser. To get around this potential problem, set the $bigmessage variable to the largest message size (in bytes) to transfer.
#### Largest message (in bytes) to allow the user to view online $bigmessage=10000;
The variable $popmailcgi should only be changed if, for some reason, you've modified the name of the Majora CGI.
#### URL to this CGI $popmailcgi="majora.cgi";
Finally, the $smtpserver and $thishost variables should be set to the SMTP server that will be used for sending e-mail, and the hostname of the local computer, respectively.
#### SMTP server used to send mail... $smtpserver="poisontooth.com #### This server's hostname (in case `hostname` doesn't work) $thishost="poisontooth.com";
Save these changes to the Majora CGI file, and the system will be ready to go. To test it, start your Web browser and open the URL where Majora has been installed. Figure 29.1 shows the Majora login screen.
Figure 29.1 Log in to your e-mail account.
After logging in to the system, the available options Compose, Get Mail, and Logout are displayed along the right side of the browser window. Those should be reasonably self-explanatory.
Clicking Get Mail might take quite awhile, depending on the size of your inbox. After collecting information about each message, a listing will be displayed for each one, as shown in Figure 29.2. Click the number at the start of each line to read the corresponding message.
Figure 29.2 The messages in the inbox are listed.
The Majora code is open and can be modified as you see fit. Feel free to edit the Perl code to your heart's content.
Summary | Next Section

Account Sign In
View your cart