Thunderbird 2 on Centos 5.1

Tags:

Found at tbox.myblogspot.com:

  1. Download Thunderbird 2 from Mozilla (http://www.mozilla.com/en-US/thunderbird/) or other mirros like (http://mirror.oscc.org.my/mozilla/thunderbird/). I downloaded thunderbird-2.0.0.14.tar.gz to the directory /tmp.

  2. Extract the files

  3. Open a terminal and login as root to the directory /opt

    `

    su - cd /opt `

    `

    1. Copy the extracted forlders to /opt cp -rf /tmp/thunderbird /opt `

    `

    1. Install the older library of libstdc++.so.5 (5.1 comes with version libstdc++.so.6) yum install compat-libstdc++-33.i386

    `

    `

    1. Test the Thunderbird as a normal user /opt/thunderbird/thunderbird

    `

    `

    1. Copy the icons to the user wide pixmap cp thunderbird/icons/mozicon*.xpm /usr/share/pixmaps/ `

    `

    1. When Thunderbird starts, it complains about the mode for /var/spool/mail, as it cannot write to this folder. As root do the following chmod 01777 /var/spool/mail `

Add the application launcher in the panel/menu using the mozicon icon. Only things left is to install other plugins. My first plugins are always the Calendar (lightning) and birthday.

Postfix as mail relay for Exchange

Tags:

Taken from http://www-personal.umich.edu/~malth/gaptuning/postfix/ however note that the "your_recipients" file in the postfix main.cf, the "plusone_recipients" in the cron job, and the "example_recipients" in the Perl file should probably all be the same. -- wl 200808


This method consists of a simple perl script which uses Net::LDAP to retrieve Active Directory users' "proxyAddresses" which are both primary and secondary SMTP addresses (as opposed to using "mail" which would only retrieve a user's primary SMTP address). Nothing needs to be run on the Active Directory domain controllers; this script requires only TCP port 389 access to your Active Directory domain controllers

The resulting output is in the format: "user@example.com OK" which then must be postmap(ped).

Add the following to your Postfix 2.0+ main.cf to use the relay_recipient_maps feature of Postfix, which will now reject unknown users:

relay_recipient_maps = hash:/etc/postfix/your_recipients

Note: the Exchange domains in question MUST be entered in relay_domains, and NOT in mydestination.

Also note if you would like to prevent Postfix from rejecting with "User unknown in relay recipient table" and would rather Postfix say "User unknown" set show_user_unknown_table_name = no in main.cf.

I have the script cronned every hour with the following cron job:

#!/bin/sh
cd /etc/postfix ; ./getadsmtp.pl && postmap plusone_recipients

Conceivably this script can be easily modified to support other LDAP servers by changing the M$-specific "proxyAddresses" search base and output modification.

Installing Horde with Virtualmin on Centos 5.x

Tags:

CentOS specific instructions found here; Also see the general Horde install document. Tested on CentOS 5.1, 5.2, 5.3.

CentOS + Virtualmin Walk-through Tutorial

With Centos 5.x and a Webmin/Virtualmin installation you'll do things this way:

# yum install horde imp

to install both the Horde general module and the Imp email IMAP gateway. Next, run the database generation script, usually like this:

# cd /usr/share/horde/scripts/sql/
# mysql -u root -p < create.mysql.sql

You'll need to use the MySQL root password. Then, in your database administration screen for MySQL, set the password for the new MySQL user "horde" to something nicely random and hard to guess; keep a momentary record as you'll need it below.

Make a copy of the default configuration, which is set to log everyone in as Horde Administrator without a password. You'll need this if you box yourself in, in the configuration later.

# cd /usr/share/horde/config
cp -a conf.php conf.php.everyone-as-admin

Later on you can always blitz a broken configuration by recopying the "everyone-as-admin" script right over the conf.php.

Redirection of domain URLs to the horde system is set in Apache's /etc/httpd/conf.d/horde.conf

#
# Horde is a web application framework written in PHP.
#

Alias /horde /usr/share/horde

which means that www.mydomain.com/horde [the first argument] is mapped to the default page [index.php] in the actual filesystem's /usr/share/horde directory. (You may have to refresh the Apache configuration if that file changes.)

Then you can direct your web browser to: http://my-domain.com/horde and fill in the Administration screens. Choose MySQL as the database. The user is "horde" and the password is the one you set above.

For authentication method, choose "Let a Horde application handle" and then select Imp as that application. You could pick IMAP authentication but then your users will have to login twice (they will see "Log in to mail" before they can get to their email).

When you click the Generate Horde Configuration button, you'll get the text of your new conf.php ... Unless you've set the 'apache' group to have write permission on the conf.php file, you'll have to select the new configuration text displayed, and paste it into the conf.php ... or use the command:

# cd /usr/share/horde/config
# cat > conf.php

and then paste (possibly with Shift+Insert) the copied text, pressing Ctrl+D (end-of-file) to return to a prompt.

You should then be able to logout of the Horde administration page and log back in normally as a user.

If things aren't working, check the logs. A few places to look:

/var/log/messages
/home/username/logs/error_log   (for Virtualmin setup with "username")

If you get messages about "can't include" then check permissions on the file noted; most of the php scripts should belong to group 'apache' and have group read permissions.

Another useful step is to add yourself as an administrator. If you didn't do that on the initial setup screens, you can edit conf.php and modify the appropriate line to look like:

 $conf['auth']['admins'] = array('Administrator'<strong>,'myusername'</strong>);

Note that you will have to manually edit the Imp mail-server configuration file:

/usr/share/horde/imp/config/servers.php

by adding, for example, the localhost with IMAP protocol:

'server' => 'localhost'
'protocol' => 'imap/notls'
'port' => '143'

The Turba Contact Manager

You might also want to install the Turba contact manager. You can install a version found on the Turba download page or, to be sure you have a version matching your Horde install, just do:

# yum install turba

and then following the remainder of the "Configuration" instructions in the Turba documentation ... note that in our configuration the package is in /usr/share/horde/turba ... you will probably want to use the 'horde' SQL database and the SQL username 'horde' as above, keeping all the Horde data together. Consult /usr/share/horde/config/conf.php and look for the lines like these for the values you set above:

$conf['sql']['username'] = 'horde';
$conf['sql']['database'] = 'horde';

And then you'll run the configuration script as:

$ mysql -u root -p horde < turba_objects.mysql.sql

and then go thru the Horde admin screens, setup the Turba parameters, and write the configuration file which in our example will be at /usr/share/horde/turba/config/conf.php.

If you don't see Turba (shown as main heading: Organizing) in the Horde menus, edit the main Horde configuration file (/usr/share/horde/config/conf.php in our case) and update the appropriate line to be:

$conf['menu']['apps'] = array('horde', 'imp', 'turba');

Emacs soft word wrapping

Tags:

If you're frustrated with Emacs' default behavior of displaying characters when wrapping long lines, try this:

M-x <strong>longlines-mode</strong>
M-x <strong>longlines-show-hard-newlines</strong>

This only changes the way your file is displayed -- it does not insert or remove anything from the file's contents. At the end of a line beyond 70 characters, if there is a reasonable word-break, then a | will be displayed (in red, if you have colors) and then the remainder of the line will wrap to the following line.

Network Installation of CentOS 5.2

Tags:

I'm moving my internal server to new hardware and wanting to load CentOS 5.2 ... without downloading a half dozen CDs or a 4+GB DVD image... half of which I probably won't need, or which will be replaced by updates anyway.

Fortunately, the latest releases have a Net install image, which is only about 8MB. Look for this file on the mirrors:

CentOS-5.2-x86_64-netinstall.iso

for the 64-bit version, or as appropriate for your architecture.

Booting that CD asks about your keyboard and such, and then asks for an Installation Method. Pick HTTP, and you'll be asked for the website and directory. Strangely, there's no automatic list of mirrors, so you have to do some scouting. I suggest using the mirror from singlehop -- enter this:

Web site name: yum.singlehop.com
CentOS directory: CentOS/5.2/os/x86_64

The first file downloaded is images/stage2.img which is about 90MB, and then off you go.

If you're setting up a large number of servers, you probably want to either download the ISOs or install a local mirror.