The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Running your own mail server

Contributed by: David Muszynski
This tip is valid for: Both BeOS and Haiku

Stegemann & Stegemman’s enamel is one of two complete mail server packages available for BeOS (the other is Stalker Software’s CommuniGate Pro). Unfortunately, its documentation leaves most users scratching their heads. David Muszynski has prepared this QuickStart guide to setting up and using enamel, to get you up and running with your own BeOS mail server quickly.

enamel – A Quick Guide

The enamel package comes with seven executible binaries. Since all this guide is meant to do is offer those unfamiliar with e-mail server software a quick and easy way to send and receive e-mail on their own computer (in the mail server sense of send and receive, not in the normal sense), we will only be dealing with three of those binaries. First of all you should install everything according to the directions that come with enamel (that part is clear enough anyway).

The three apps we’ll be dealing with are MCP, pop3d, and smtpd. MCP is like the brains of the operation — it’s what all your mail transactions are routed through whether you’re sending or receiving mail. smtpd is what listens for incoming mail (and outgoing mail as well, but I’ll discuss that later) and puts it where it needs to go. Lastly, pop3d waits for someone to check their account and gives them mail that’s waiting for them. We’re now going to be editing text files to get everything configured the way you want it.

First up, MCP. Obviously the first thing to set in the MCP_settings file is the LogFile path. Easy enough — mine is set to LogFile /boot/home/logs/MCP.log. I haven’t changed any of the indexes that were set by default, and my guess is you won’t want to either right away. Next we set targets. In their simplest form they look like this:

Target david TargetPattern "david@technospider.ath.cx" 

This sets a target named david, which means that when ‘david’ logs in via pop3, he’ll receive all mail that has been sent to his pattern david@technospider.ath.cx.

Mailing lists should be simple enough to set up with the ‘Redirect’ statement (I say should be because I haven’t done it since I’m using the non-commercial restricted version). Anyhow, say I want to maintain a mailing list for my BUG. I’d only need to send mail to buglist@technospider.ath.cx and it will be sent to everyone on the list. Here’s how it’s done:

	Redirect cflbug ReplyTo david@technospider.ath.cx
	"John Doe <john@aol.com>"
	"Sally Struthers <sally@unicef.org>"
	"Scot Hacker <beos@birdhouse.org>"

ad infinitum (you must hit return after the last name in the list). In order for this to work you must create a target statement that corresponds to the Redirect statement:

 Target cflbug TargetPattern "buglist@technospider.ath.cx"

That’s it for MCP, and you thought it was gonna be hard. ;)

Next we’ll tackle smtpd. Nothin’ to it — just set your LogFile path. Leave the port setting alone unless you have good reason to change it and set your MaxConnections to something reasonable. Mine’s set to ten. Done.

Lastly is pop3d. Again, really simple. Set LogFile (deja vu, huh?) to your selected path. Leave the port setting alone. Don’t go crazy with MaxConnections. And lastly define your users like this:

	User david Password ****** Target "david"
	User joann Password ****** Target "joann"

Of course, in the text file your passwords will be visible so don’t let anyone go snooping around on your computer if you don’t want anyone to find out what they are.

I’ll explain as best I can what these statements do. When someone logs into enamel’s pop3d from a remote client, enamel checks the username and password against the list you’ve defined in the pop3d_settings file, and if it find a match it sends that person all the mail that was sent to the addresses defined by MCP’s target statements.

You’ll most likely want to start MCP, smtpd, and pop3d automatically at boot time from your UserBootscript.

I have just one warning: Since everyone on the internet has an ISP, unless you run your own ISP, I would recommend that you set the smtp server settings on any mail clients you’re using to your ISP’s smtp server. Just trust me on this, it may not turn out bad for you but I wouldn’t take any chances.

I hope this has helped you out a bit. I know I downloaded, installed, and tried to configure enamel several times before it finally clicked. If anyone has suggestions, comments or questions please feel free to e-mail them to me. If you see anything in here that is wrong please let me know about it — I don’t claim to have this stuff down pat by any means.

Posted in Networking


(comments are closed).