I suspect that there are a lot of folks who are in a position similar to mine: using Unix at school or work on a minicomputer or mainframe, and running Linux on our PCs at home. If this is the case, it is quite likely that your Internet connection is via a dial-up connection, PPP, CSLIP, or SLIP. If this is the case, your options for getting mail into and out of your Linux box have almost invariably included having to set up sendmail, sendmail+IDA, or smail. Setting any of these up is not a trivial task. If you are fortunate, your choices also include popmail, in which your mail is left on a popmail server in your own mailbox, waiting for you to retrieve it at your leisure. But to retrieve it, you need a mail program installed on your Linux box which can talk to the popmail server.
XF-Mail To the Rescue.
What I'd like to do is take an in-depth look at compiling and configuring XF-Mail. Let me offer one caveat at this point: this is not meant to insult anyone's intelligence. I'm writing this primarily for the benefit of those DOS-converts, like myself, who may initially view the notion of compiling programs as a task for wizards. It's not that bad. Honest! However, until you get the hang of this, getting Linux programs working may well be a formidable task. If you're pretty adept at compiling programs, you may want to skip to the next section, on configuration, although even that is admittedly pretty straightforward.
Just a word for those of you who are left. If you are an absolute Linux newbie and the thought of compiling anything sorta gives you the heebie-jeebies, stick with me. This will be fun. Really!
The philosophy behind Linux, and much of Unix, is vastly different from that of DOS. While you can often find pre-compiled binaries that work simply by dropping them into a directory in your path, there are MANY instances in which this is simply not the case. You'll get an archive with the .tar.gz suffix and un-archive it, only to discover that it's all source code and needs to be compiled. Eventually, you'll want to be able to do this. It's often not as hard as it first seems, although admittedly, not everything compiles cleanly “out of the box”.
I'm going to take you through each step needed to compile XF-Mail. I think this is extremely important, for a couple reasons:
This will be good practice in compiling and setting up a couple programs that are quite well behaved and need little modification to get working.
If you're using Linux on a home PC and have a dial-up connection, you really need to have an easy-to-use e-mail client. You need to be connected. Seriously. You're quite handicapped and cut off if you don't.
If you've never compiled anything under Linux, this is your golden opportunity to do so and feel pretty good about yourself!
Let's begin. You'll need to have a few things set up in order to do this:
You need to have X-Windows up and running.
You need to have installed the development applications—for those of you using Slackware, that's the stuff in the D disk sets. Other distributions will use different designations. You should have the GCC (GNU C Compiler) installed, as well as the include files and so forth.
You need to ftp some files.
You need to be able to use at least one of the Linux text editors such as vi, Emacs, xedit (if you're running X-Windows), pico, joe, jed, or one of the many others.
You need to get the following files (use a web browser):
The first two links—those for xfmail-0.3.tar.gz and bxform-075.tgz—will take you to the home pages of these impressive programs. Read the info and follow the directions for getting the Linux version of these programs. The last link—for the libXpm stuff—will drop you off at one of the sunsite mirrors (that's GA Tech, if you're curious about this). Because versions of programs can change fairly quickly, I'll leave it up to you to get the most recent version. I'm currently using the libXpm-3.4f.tar.gz sources. Note that you may already have libXpm installed, in which case you don't need to install it again.
$ ls -l /usr/X11R6/lib/libXpm.so*
will tell you whether you have the library available.
In case you are curious, those files you got contain:
The source code for the XF-Mail client version 0.3.
The binaries for the XForm toolkit libraries.
The source code and precompiled libraries for the libXpm libraries.
XF-Mail needs those last two libraries in order to be compiled. As an additional benefit, there are lots of programs that require the libXpm libraries, and a growing number of programs use the XForm libraries. Having set these up once, you'll be all set when it comes time to compile other programs that require them.
Since I'm using Slackware 2.2.0 at the moment, my descriptions of where things will go may be just a bit different from yours, if you are using a different distribution. Not to fret... I'll try to be as broad as I can in terms of describing how to proceed.
Let's begin by setting up the libXpm libraries. If you already have them, skip this section. If you use one of the new ELF-based distributions, you probably already have them, but if you don't, you will have to get ELF versions instead of the a.out ones documented here. The procedure is the same.
Since the libXpm-3.4f.tar.gz archive contains precompiled libraries and the necessary header files, let's use these. On my system, I have created a /usr/local/src directory in which I store and compile all new programs. You don't have to do this yourself, but it does help keep things organized. Now, let me quickly take you through the steps to set this stuff up:
$ mv libXpm-3.4f.tar.gz /usr/local/src/ $ cd /usr/local/src $ tar -xvzf libXpm-3.4f.tar.gz $ cd xpm-3.4f/ $ ls -l
look for libXpm.a, libXpm.sa, and libXpm.so.4.6. Now become root, and install the files:
$ su (type your root password) # cp libXpm.* /usr/X11R6/lib/ # cp lib/xpm*.h /usr/X11R6/include/X11/ # ldconfig # exit bni:Congrats! The libXpm libraries should now be installed. Make sure you go back to being a normal user again by pressing Ctrl-D. No point is doing something dumb as root and making a mess of things, right?
Next, let's deal with bxform-075.tgz. This archive contains the binaries (actually, the static libraries) for the XForm libs. It's almost as easy to set up as the libXpm libs, except you'll need to do a little bit of editing to put things where they belong. Note that if you have an ELF-based distribution, you will need to get the ELF version of the library, rather than the a.out version.
We'll start the same way we did the last time:
$ mv bxform-075.tgz /usr/local/src $ cd /usr/local/src $ tar -xvzf bxform-075.tgz $ cd xforms/ $ ls -l
One of the files you will notice is a README file. It's always a good idea to read through the README files for anything, and this is no exception. It'll inform you that the file you need to edit in order to make any modifications is the mkconfig.h file. It's another good idea to always make a backup copy of any file you modify before you modify it. If things get screwed up, you should have a “clean” copy to fall back on. I've called my backup copy mkconfig.h.dist since it came with the distribution. cp mkconfig.h mkconfig.h.dist does the trick.
There are two modifications you may want to make. When you load up the file, you should see lines a bit down the page that look like this:
LIB_DIR=/usr/lib LIBMODE=644 HEADER_DIR=/usr/include HEADERMODE=644
You might want to consider installing the libforms.a library into the /usr/X11R6/lib directory, and the header file, form.h into the /usr/X11R6/include/Xf directory, because that is where XF-Mail will be looking for these files. If you do this now, it'll be a bit easier during the next step. So, change the LIB_DIR= and the HEADER_DIR= lines to read:
LIB_DIR=/usr/X11R6/lib LIBMODE=644 HEADER_DIR=/usr/X11R6/include/Xf HEADERMODE=644
This should put everything where it belongs.
Now, all that remains to finish the installation, after you've saved the modifications, is to become root again, and type in make install.
You are now ready to compile XF-Mail. At this point you merely un-archive the file, copy a file, optionally edit the Makefile (which orchestrates the process of compiling), and compile the program.
$ mv xfmail-0.3.tar.gz /usr/local/src $ cd /usr/local/src $ tar -xvzf xfmail-0.3.tar.gz $ cd xfmail/ui $ cp Makefile.Linux Makefile At this point, there's really nothing much left to do but compile the program. I'll add here that you can optionally change the directories in which the program and the manual pages are installed. Why? Well, there are a couple of schools of thought regarding the installation of new programs. The one that I ascribe to suggests putting all user-added programs into the /usr/local directory. You don't need to do this following step, but to change the default location of the program installation from /usr/X11R6 to /usr/local, let's take a look at the Makefile. When you edit the Makefile you've just created, you'll see a section near the top that looks like:
BINDIR = /usr/X11R6/bin MANDIR = /usr/X11R6/man/man1
You'll notice that the section delimited by the # change the following... statement at the top and the # end of user configurable settings statement at the bottom is the only section of the file that you should edit. Also notice the lines that define the XForm include directory (XFINC) and the line for the XForm library directory (XFLIB). Now you'll see why we edited the Makefile above for XForms: /usr/X11R6/include/Xf is where XF-Mail will look for the form.h header file, and /usr/X11R6/lib is where it will look for the libforms.a file.
To install the xfmail program into your /usr/local/bin directory, and the manual pages into the /usr/local/man/man1 directory, simply edit the BINDIR and the MANDIR entries:
BINDIR = /usr/local/bin MANDIR = /usr/local/man/man1
At this point, all that's left to do is compile and install the program. Simply enter:
$ make $ su # make install # exit
The first step will take a while, especially if you don't have very much memory, but if the compilation has gone well you should see no error messages. After the make install step, the program will be completely installed.
The hardest part is done.
If you have troubles of any sort compiling XF-Mail, you can take the easy way out. The author has Linux binaries available for ftp at burka.netvision.net.il in /pub/xfmail/.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Client-Side Performance
- Tibbo Technology's Tibbo Project System
- Sony Settles in Linux Battle
- Peppermint 7 Released
- Libarchive Security Flaw Discovered
- July 2016 Issue of Linux Journal
- The Giant Zero, Part 0.x
- Maru OS Brings Debian to Your Phone
- Profiles and RC Files
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide