Loading
 

When starting spamassassin with empty sql database You can see

‘WARN: bayes: database version  is different than we understand (3), aborting!’ in logs.

 

It should be read as ‘database is too empty’.

Spamassassin stores its database version number in database. If it can not find its database version, it dies.

 

Simple fix for it:

insert into bayes_global_vars (variable,value) VALUES (“VERSION”,3);

 

You must use correct database of course.

 

 

Had to have a sphinx 1.10-beta rpm for CentOS 5. All good, just download. But the same machine also needed an updated PHP package. Which depended on MySQL 5.1. Downloaded those from www.jasonlitka.com

Sphinx 1.10-beta depends on MySQL 5.0 from CentOS.  No luck at all.

 

If, trying to do rpm -e You get

error: "package" specifies multiple packages

and looking for that package Your rpm database lists it twice or more

rpm -qa | grep package

package-1.0.00-1

package-1.0.00-1

then use the following to uninstall

rpm --erase --allmatches --nodeps package

 

Booting from cd and no /dev/md devices?

First, correct kernel modules are needed.
modprobe raid1
If configuration uses different raid, then a different raid module should be loaded. Be it a raid 0,5,6 or whatever.

Devices can be made then

mknod /dev/md0 b 9 0
mknod /dev/md1 b 9 1

and so on. As many of them as needed.
From this point on door is open for mdadm create,assemble or whatever is needed.

Creating a device goes like this:
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdc2

 

After setting up postfix to use mysql as lookup backend for alias or virtual or whatever table, everything seems ok. Mails are delivered.
But sometimes strange “Postfix SMTP server: errors from ” e-mails are received. Usually more than one in the same second, then there can be no errors for days or weeks. Then they appear again. There is a “Temporary lookup failure” or “queue file write error” cited in those error e-mails but everything seems to work ok again. Even those e-mails that get error on first try get delivered on second try some minutes later.

One thing to look out for is

 

Sometimes squid stops working and “WARNING! Your cache is running out of filedescriptors” is logged in cache.log. Restart usually resolves that problem. Temporarily though.
This article is based on http://www.cyberciti.biz/faq/squid-proxy-server-running-out-filedescriptors/ adding some Gentoo specific bits.

Squid, as a web cache should, holds a lot of files from internet on a local hard disk. It means that a lot of files are open at the same time. On busy servers this amount grows till the limit imposed by the operating system. Then no more files can be opened and squid seemingly dies.

 

Using LDAP from command line can be quite man (or info) expensive.

Usually LDAP is used for samba authentication, so it is set up something like this:

domain example.com is described in LDAP as base dn:
"dc=example,dc=com"

also two OU-s are usually present:
ou=groups for all groups and
ou=users for all users.
All this is case insensitive.

Selecting all groups from LDAP is done using ldapsearch.
ldapsearch -x -b "ou=groups,dc=example,dc=com" -h LDAP_host

This lists all groups.

 

Sometimes it is needed to have multiple internet connections in one Linux box. To distinguish it from a more common scenario – it means that multiple default routes are specified.
Multiple default routes is a bit of a dilemma – default route is loosely defined as ‘if everything else fails send packets there’. By definition there can not be two or more last resort options.
One of those internet connections therefore should be designed as default, and configured normally, giving it IP address, default gateway and so on.
The rest should have its IP addresses configured.

 

A crude way to release e-mails from amavisd-new quarantine.

As amavisd-release works well for file based quarantines, but sometimes just a plain telnet is all You’ve got.

First find email id from logs. Something like ChRQj9iij3-V is probably ok.
Then more data can be found from MySQL, where msgs is a table in standard amavisd-new MySQL schema.


select mail_id,secret_id,quar_type from msgs where mail_id="ChRQj9iij3-V";

the release bit is simple:


telnet localhost 9998
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.

 

Linux software raid or md raid can be used as a boot device. But only if that raid device is a RAID-1 or mirror.
As boot loader, grub in this case, does not know anything about software raid that is managed by kernel, it needs to be installed on both devices on that software mirror.

grub --no-floppy

Select disk and partition where Your /boot resides.
Countdown starts from zero, so /dev/sda3, if it is Your first drive, becomes hd(0,2)

root (hd0,2)
Filesystem type is ext2fs, partition type 0xfd

install grub into boot sector of that hard drive