Archive for October 2008


Migration from /etc/aliases to MySQL

October 4th, 2008 — 06:20 pm

I wrote a small shellscript which converts existing mail
relays in /etc/aliases to a SQL database. It worked for me in this
simple form but I can take no responsibility whatsover for any other
setup.

The usage is pretty much straight forward – simply give the script
the needed information as to where the aliases file is located, the
account for MySQL and so forth.
Note: In the current implementation you have to create the database,
a user and a valid relay table yourself. If you don’t know how to do that
you can extract this information in my howto on migrating Postfix to
MySQL.

download

2 comments » | articles

Maradns on OpenSolaris(Sparc)

October 4th, 2008 — 06:19 pm

In order to compile Maradns (http://www.maradns.org) on a Sparc machine you have to edit the Makefile.
I changed line 19-36 to following:

# Uncomment the following three lines to get this to compile on Solaris
 LDFLAGS=-lxnet
 CC=cc $(LDFLAGS) -DSOLARIS -DNO_FLOCK
 M="CC=$(CC)"
# These are currently unused, but will be needed again if we use flock() again
# CFLAGS=-I/usr/ucbinclude
# L="CC=$(CC) $(CFLAGS)"
# LDFLAGS=-L/usr/ucblib -lucb -lxnet
# end the Solaris section
# Non-Solaris version of "M"
#M="CC=$(CC) -O2 -Wall" DEBUG=-DNO_FLOCK
#V="VERSION=$(VERSION)"
# Debug
D="VERSION=$(VERSION)" DEBUG="-DDEBUG -DNO_FLOCK"
#FLAGS = -O2 -Wall
FLAGS = -g

afterwards a simple make did the job.

Comment » | articles

First installation troubles (Solaris)

October 4th, 2008 — 06:19 pm

Various small problems

VIM / Cursor Keys
If you wonder why VIM keeps writing ‘A’, ‘B’, ‘C’, ‘D’ on your screen when it is supposed just to move the cursor in writing mode, the answer is that the cursor keys are not being mapped the right way. The solution is to extend your favourite .vimrc file with:

map! ^[OD ^[h
map! ^[OC ^[l
map! ^[OA ^[k
map! ^[OB ^[j

“/usr/ucb/cc: language optional software package not installed”
/usr/ucb/cc is only a wrapper to a real C compiler. Solaris 10 won’t have a C compiler preinstalled, normally. This means that you will have to install it yourself (Sun Studio would be a good idea, too). All you have to see to then is that your PATH is set correctly; meaning that /usr/ucb is either deleted or after your real compiler.

“WARNING: loghost could not be resolved.”
That’s because your syslogd doesn’t have a defined host to work on. To fix it simply add “loghost” to your 127.0.0.1 entry in the /etc/hosts file

127.0.0.1       localhost loghost

“Sendmail: My unqualified host name (domain) unknown;”
If you get this warning on computer startup, then you haven’t configured a fully qualified domain name for your system. If you don’t need a mailing system on your computer the solution is easy by simply disabling the service via:

svcadm disable sendmail

If you need a working mailsystem, there is a howto from SUN.

3 comments » | articles

« Previous Entries     Next Entries »