Tag Archives: grlug

Replacing Faxmaker with Hylafax+

Faxmaker is an excellent product that I work with, but it is also expensive. When I ran into some issues with my Faxmaker server (I think it was more modem driver issues, but whatever), I decided to investigate other options instead of renewing/upgrading. That’s when I came across Hylafax+.

My workplace uses Faxmaker for 3 things: email-to-fax, fax-to-email, and PDF-to-fax. After some reading, Hylafax will do all of this as well, so I’m going to document the entire conversion process.

For now, I’m going to cover my initial setup of Hylafax to use a MultiTech MT5634 modem board to receive incoming faxes and send them to users as a PDF attachment.

Continue reading

Logging Email w/ Sendmail on CentOS 4

Need to archive messages on your server? Exchange can natively do this with a Journal mailbox, but if you’d like to set the same feature up in Sendmail, it will take some tweaks.

This has been adapted from some instructions found on Experts Exchange that were originally for RedHat 7.2, which is just a teensy bit out of date. As with all things, make sure you have a backup before you start in on this process.

Grab the Sendmail source package from either the CentOS source CDs or a site like RPMfind. Make sure the version of the source package matches the version of sendmail you’re running from rpm –query sendmail.

Make sure you have the rpm-build package installed (yum install rpm-build)

Start the rebuild for the source package with the command rpmbuild –recompile sendmail-8.12.x.src.rpm (replace the source filename with the name of the one you downloaded). You will see a lot of ‘missing user’ errors scroll by, these can be ignored.

Change to the specs folder in your source tree (usually this is /usr/src/redhat/SPECS) and edit the sendmail.spec file, commenting out or removing any lines starting with ‘rm -rf’. These lines would normally clean up the source files once the build is complete, but for now, we want to keep them.

After you’ve saved the spec file, run rpmbuild -bp sendmail.spec. This will apply patches to the sendmail source that come as part of CentOS. It should only take a few seconds.

Download the logall.c file to a directory of your choosing (wget http://www.freakout.de/logall.c), then change to the sendmail source folder (cd /usr/src/redhat/BUILD/sendmail-8.13.1/sendmail) and edit the conf.c file. Look for a line which says #ifdef EXAMPLE_CODE, and immediately before it, add a new line:

#include “/root/adm/mail/sendmail/logall.c”

(use the full path of wherever you downloaded logall.c). Save the file. Run make and if it doesn’t throw any errors, run make install. Now edit your /etc/mail/sendmail.mc. At the very bottom, add the following lines:

LOCAL_CONFIG
D{LogAll}/var/log/fullmail.log

You can replace the path and filename with wherever you’d like your log file saved. The LOCAL_CONFIG option specifies that everything following that directive should be passed directly to the config file for sendmail, and not parsed as normal config options. Rebuild your sendmail config with make -C /etc/mail (you will need the sendmail-devel package installed for this).

Create the file you referenced in your sendmail.mc by doing touch /var/log/fullmail.log, making sure that the sendmail process can write to it (set the file permissions to the same as your other maillog files basically). Now, restart sendmail, and send a test message to make sure everything still works. You should also find a copy of that message in the fullmail.log file as well.

The file generated by this is a standard mail file, so you can read the contents with a pager like less, or a command like mail -f fullmail.log. It stores a complete copy of every message sent and received, so it might be a good idea to keep an eye on your drive space and rotate that file every so often.

If you take a look at the logall.c file, there are many other options you can set in LOCAL_CONFIG for features such as keyword filtering, max log size, and exclusions. Keep in mind that this process did not update the currently installed sendmail package, so if an update comes down for sendmail, you will need to repeat this process to keep logging working.

Fixing ‘vmics eth0 not present’ Errors

During startup of a Linux machine under VMware, you might receive the following error:

vmnics device eth0 does not seem to be present, delaying initialization.

To fix this, you will need the VMware tools installed.  You can do this by selecting ‘Install VMware Tools’ from the Tools menu.  This will mount a virtual CD in /media/cdrom (or wherever your CD mountpoint is).  There are RPM and tarball packages, install whichever one best fits your distro.  Then run the command vmware-config-tools.pl.  This will scan your system and update some config files to point to the proper drivers for the hardware & kernel.

After the config tool has run, it will have a list of commands that you need to type in for the changes to take effect (some rmmod and depmod basically).  Run these commands, then reboot.

On rebooting, I ran into a kernel panic about a faulty APIC timer.  If you run into this, restart the guest OS, and edit the kernel command line (press A at the GRUB screen), and append noapic to the end.  Boot the system, and after it has finished rebooting, reboot once more.  This seems to have fixed it, at least for me.