LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Seek tips on setting up OpenBSD IMAP and IRC server (https://www.linuxquestions.org/questions/%2Absd-17/seek-tips-on-setting-up-openbsd-imap-and-irc-server-513724/)

hussar 12-26-2006 04:22 AM

Seek tips on setting up OpenBSD IMAP and IRC server
 
I am looking for some tips on setting up an OpenBSD machine as an IMAP server and possibly as an IRC server. Specifically, I am looking for links to howto documents that experienced users here think are good and also for some idea of how much storage space I would probably require for an IMAP server supporting three users with five or six email accounts total. Pointers to additional considerations I should make would also be welcome.

I have a home network with several machines on it, and recently I purchased an Apple MacBook. I use a wireless connection to the network to connnect with the MacBook. Up to now, I have been reading my email on three separate accounts that I have using thunderbird on my main Linux (slackware -current) desktop. Now that I have the laptop, I would like to be able to read mail from all three accounts on both the desktop and the laptop without running into the "Oh, that email's on the other machine" problem. Right now, my plan for accomplishing this is to set up my OpenBSD machine (currently running 3.8; soon to be running 4.0) as an IMAP server. I figure that way, I can read mail on the desktop or on the laptop, since both would be reading from the same account.

As I see it now, the IMAP server would use fetchmail to download email from the separate accounts and then, after spam filtering and virus scanning, sort it into the appropriate mail boxes (either mbox or maildir format) which could be read from either computer without necessarily closing out the mail client on one machine before launching the client on the other machine. Eventually, I would like to migrate my wife's and daughter's email to the IMAP server as well. Based on the initial reading I have done, I am considering dovecot as the IMAP server and squirrelmail as a web interface to use to read my email when I am not at home. But, I am open to suggestions of other applications.

The IMAP server will sit behind a Netgear websafe router and outside of the rest of the network, which will be protected by a firewall machine running OpenBSD, IPCOP or Linux (a slimmed-down slackware -current install) on a VIA EPIA-M 800MHz box with 512MB RAM that didn't quite live up to my expectations as a personal video recorder but which will probably make a fine firewall. In the future, I may add an IRC server to the OpenBSD server to allow my daughter and her school friends to chat.

Thank you in advance for your advice and assistance.

chort 12-26-2006 04:30 AM

I found that dovecot works quite well as an IMAP daemon on OpenBSD. It's in the Ports tree. The config file is copiously documented, so it was no problem configuring it. Oh yeah, I installed it with SASL2 authentication support. SASL actually took quite a bit more time to setup than dovecot did. There some good HOW-TOs out there for SASL. I think I followed one on postfix.org (since that's the MTA that I use).

As for IRC server, OpenBSD has a few in the Ports tree.

BTW almost everything in Ports can be installed as a pre-compiled binary package as well.

hussar 12-26-2006 06:02 AM

Thanks for the quick response.

I've downloaded dovecot, and I'll start going through its configuration file. Your post points up something I hadn't considered though, the secure connection bit. I'll look around for some info on SASL2.

chort 12-26-2006 08:14 PM

Quote:

Originally Posted by hussar
Thanks for the quick response.

I've downloaded dovecot, and I'll start going through its configuration file.

Did you build it from ports, or just download the source tarball from the dovecot website? BSD operating systems have pre-defined ways to build from source (if you don't install from the binary package provided by the BSD OS). If you download the source yourself and try to build it, things could get messy and it's a lot more trouble than you really need to go to.

Quote:

Your post points up something I hadn't considered though, the secure connection bit. I'll look around for some info on SASL2.
SASL2 is for authentication. Encryption is provided separately with TLS. Using TLS is highly recommended, because no authentication scheme is really safe unless the connection is encrypted.

hussar 12-27-2006 03:11 AM

Quote:

Originally Posted by chort
Did you build it from ports, or just download the source tarball from the dovecot website? BSD operating systems have pre-defined ways to build from source (if you don't install from the binary package provided by the BSD OS). If you download the source yourself and try to build it, things could get messy and it's a lot more trouble than you really need to go to.

I used pkg_add to install it from one of the package depositories. I am assuming that that is okay. You've piqued my curiosity though. What is different about compiling on *BSD systems? I've compiled quite a few applications from source on my linux boxen with relatively few problems. Is the process significantly different on *BSD systems?

It is clear that I am going to need to do a good bit of reading. There is the question of getting the emails into dovecot in the first place. My original plan was to fetch the mail with fetchmail, but it will probably need to be configured to pass what it fetches to dovecot, unless dovecot has that capability built in. I will also need to figure out how to work the spam filtering and virus scanning in.

In the meantime, I've found this site, http://www.pantz.org/os/openbsd/post...-dovecot.shtml, which appears to be pretty useful. And, I have found several magazines from the past few months that cover email set up.

chort 12-27-2006 05:52 AM

Quote:

Originally Posted by hussar
I used pkg_add to install it from one of the package depositories. I am assuming that that is okay. You've piqued my curiosity though. What is different about compiling on *BSD systems? I've compiled quite a few applications from source on my linux boxen with relatively few problems. Is the process significantly different on *BSD systems?

Installing with pkg_add is just fine. As long as it has the support you want, you're all set (example of using Ports instead would be if the package was only available with one particular "flavor" and you wanted some different combination). What is different about compiling from source on BSD operating systems is that they use Ports (FreeBSD, OpenBSD) or pkgsrc (NetBSD, DragonflyBSD) system to supply changes relevant to that OS. Often this includes patches required for compatibility or security on that particular OS, and nearly always it has configured the installation prefix, included and excluded configure flags, and OS-specific versions of the config files. In short: it's tailored to the OS you're installing it on.

If you just got a tarball, unzipped it and did the usual ./configure && make && make install game you might end up with it installed in a different place than executables and/or libraries are supposed to go, and the config file would be generic and possibly not compatible or ideal for your OS. If some software is in the Ports tree, that means it should compile, install, and run just fine on your system. If it doesn't, you report it to the maintainer (their e-mail address is listed in the directory for that Port) and it should be fixed. If some software is not in the Ports tree, that generally means either it is not popular/useful enough to merit inclusion, or there are serious security or license issues with it that prevent inclusion.

Summary: Install with pkg_add when you can, if that doesn't have the right flavors, use Ports and specify your flavors when you build it. If it isn't in Ports, think long and hard about whether you really want to use that software, or if perhaps some other software that is in the Ports tree would work just as well.


All times are GMT -5. The time now is 12:34 PM.