Linux

Useful Linux stuff.

Sendmail - Masquerading multiple domains

I have a little VPS that is used as platform for POP'ing and SMTP relaying for internal projects and testing.  Originally it was all setup under a single domain and I had turned on masquerading.  However I needed to add another domain for a different project.

error - expat.h: No such file or directory

While trying to get a perl utility working, I had to install a bunch of prerequisite perl modules on my CentOS 5 VPS.  One requirement was XML::Parser.  However when I tried to install it like so:

[root@localhost]perl -MCPAN -e shell
cpan> install XML::Parser

I received errors with the below being the most relevent bit...

Tidbit - Find and Replace Text in Files with Perl

In our Nagios / Webinject environment, we have alot of text configuration files.  Sometimes a simple product update requires me to update LOTS of these files.  A majority of the time, a find and replace is all I need.  Using perl from the command line, I can quickly update a bunch of files saving countless hours of tedious file updates.

VPS and Authenticated Sendmail

I had a requirement to create a sendmail server that can authenticate a user and send mail from a remote location.  First off, I needed to figure out where to host this solution.  By choosing an inexpensive hosted linux VPS, I can scale my virtual server and have some more flexibility over the configuration.  Also by having a dedicated VPS I will not have to worry about impacting other app and software configurations as I work.

Utility - Linux "screen" command

Screen is a powerful tool for SysAdmins and Developers working at the command prompt of a *nix system.  Think of screen as an "ALT-TAB" in Windows, switching between DOS command prompts.