Sunday, January 14. 2007
I successfully switched my hosting from my real-hardware machine ‘daemon’ to my new virtual-hardware machine ‘gauss’ which is hosted by HostEurope.de. After turning off the services on ‘daemon’ and doing a final sync, I started the services on ‘gauss’ and activated the TCP-forwarding on ‘daemon’ with rinetd. I forwarded FTP, HTTP(S) and IMAP(S) such that users could connect to the old IP where those connections got forwarded to the new IP. With this, the new host only saw connections originating from the old IP although they actually belonged to strangers. Therefore I didn’t also forward the SMTP-port directly, because in that case the realtime blacklisting would have failed. So I configured Postfix to keep doing RBL lookups and SPAM and virus scanning, and to forward mails destined for the local domains to the new host. I did it this way:
Continue reading "Migration to virtual server accomplished"
Friday, December 29. 2006
I finally wanted to enable my users to relay mails via my own MTA, as it’s quite comfortable to be able to use the same outgoing mail server no matter what computing device you currently use or where you currently are. About three years ago there were no solutions enabling SMTP AUTH for Postfix without recompiling packages, so I had to wait until today where such features are now officially available within Debian.
I found several HOWTOs about configuring SMTP AUTH with Postfix on Debian Woody or Debian Sarge, but things have changed (or will change, as Etch hasn’t been released yet). The Postfix version in Sarge is 2.1, whereas in Etch it’s 2.3. This is how I did it:
First, note that you don’t have to patch or (re-)compile anything. Etch’s Postfix package already supports TLS! First, I cared about configuring authentication with SASL, and after that I restricted authentication to TLS only. This makes debugging easier during the process. Because encryption already happens at the TLS-layer, I don’t need MD5 authentication and can stay PLAIN.
Continue reading "SMTP AUTH with Postfix on Debian Etch"
Thursday, December 14. 2006
I’m using Linux for some years now. It provides a very robust server operating system. With Linux you have high performance file systems, intelligent process handling, transparent configuration and very stable server software. You can have Linux for free, its software is open-source, thousands of programmers care for quality assurance. It really works.
But some think that Linux could replace Microsoft Windows on the PC. Windows is a great gaming platform, and some admins even go that far and use it on their servers! Similarly, some Linux enthusiasts placed Linux onto their PC or notebook. They believe, the time is now ripe for a desktop revolution. I also tried it, but, in my eyes, Linux is not usable on the desktop for ordinary people as long as:
-
You have to know that there could be a hidden file named .lpoptions in your home directory which disturbs your printing system. Whatever you set in the print dialogs, that hidden file overrules your settings and makes you cursing why the prints are always rotated by 90° and therefore only covering one half of the paper.
-
You have to know the exact names of your programs. Those names almost won’t have anything to do with their function, e.g., if you’re searching for an audio editor, you have to know that it’s called Audacity. If you want to use a video editor, install the package Cinelerra. If you want to use a CD-burning program, it has the dazzling name K3b. Your file-browser is called Nautilus. Or do you prefer Konqueror? Would you guess the function of Rosegarden or Lilypond? What about Evolution? Liferea? This list doesn’t end. Ask a Linuxian about which software you could use for this and that, he/she’ll answer you to use Crixycraxy, or something like that, and you wouldn’t remember that name even if you used that software. And: Your favorite web-browser Firefox might be called Iceweasel on some Linux distro. This is because Linux freaks don’t like software which becomes too popular.
-
Programs don’t show error messages on the X-screen. Imagine you click on an icon to launch a certain program, but then nothing happens. You do it twice, nothing happens. WTF? You have to open a terminal, type in the name of that program (Do you know its name??) and then figure out the error messages on the terminal.
-
You cannot play MP3s and DVDs legally on your PC. Boom! If that ain’t a reason not to use Linux!
-
You cannot simply use the power-saving features of your notebook. This is because hardware manufacturers simply don’t support Linux. You have to search the web if some hacker already found a hack, but it would only work for another model, not for yours. And if something works, then only half. If you break your notebook, you’re on your own, because the hacker didn’t grant you warranty. GPL is like: Be so free, use it so freely, but never be safe.
-
You cannot simply use WLAN. You have to put up another Linux box with a WLAN adapter and set up a VPN connection between your PC/notebook and that Linux box. At least that is what Linux gurus tell you to do.
-
You have to be a real Linux expert to set up a GPRS modem connection via Bluetooth to your cellphone. There’s no software which does it for you. I can do it! Be sure your USB Bluetooth adapter is recognized and that the bluez-utils are installed and the kernel module is loaded. Curse around because you don’t manage to set up the Bluetooth connection because of that stupid PIN. Google around. Finally ping your phone successfully and copy its cryptic hardware number into the configuration file. Then set up a rfcomm mapping, the device /dev/rfcomm0 is then your modem. You have to configure a profile with the correct modem codes for use with GPRS. Then use it for your dialup configuration. It’s just as simple!
Linux is for hackers only. It always was and will always be so. Linux freaks waste their time compiling software, reading hundrets of e-mails on a text terminal, use IRC and Usenet and even browse the web in text terminals. Linux users don’t play games, at least no graphical ones. OpenGL is for stylish screensavers only.
Linux enthusiasts are pretty cool. They are hackers. Lots of textlines scroll over their X-desktop, just like in The Matrix. They encrypt their e-mails. If you want to be as cool, become it on your own. If you ask one of them to help you with your problem with Linux, they are unpolite and correct your misspellings. Linux freaks are assholes. I am one of them.
Sunday, November 26. 2006
Linux sucks on the desktop. I’ll write a rant on this soon.
In Nautilus, suddenly, one day, after a general (apt-get) upgrade, there were no more thumbnails generated for new JPEG images. When I clicked one of the icons, instead of opening the image in the viewer ‘eog’, a message raised, saying
The filename “IMG_1234.JPG” indicates that this file is of type “jpg document”. The contents of the file indicate that the file is of type “JPEG image”. If you open this file, the file might present a security risk to your system.
followed by the usual security-blah-blah. I couldn’t examine what the cause was, until I finally stepped over a posting telling that the file ~/.local/share/mime/globs contains an overfluid entry. Remove that entry containing the string ‘jpg’.
Saturday, November 4. 2006
For the usage of a local backup host, I defined the following scenario, which could also be used for a printer server or any other type of host, which shouldn’t run 24/7, but:
- The host should be able to be woken up manually by a special signal on the LAN, i.e., it should be capable of WOL. (This is only a hardware issue)
- If it is woken up, it should run at least for 30 minutes before trying to shutdown again.
- It shouldn’t shut down while certain processes are running, such as a backup, i.e., it should be capable of a shutdown-lock. If the lock is removed, it might shutdown.
- The host shouldn’t shut down as long as a certain client, e.g. a backup client, is (still) up and running (pingable)
- If the criteria above aren’t hurt, the host should finally shut down.
And here’s the shell-script which implements the above. It’s enough to have it run every five minutes. The “echoes” are only interesting for debugging purposes.
Continue reading "Host automatically up and down"
Monday, October 9. 2006
#!/bin/bash
# Number of letters as argument, default 7 if [ “$1” != “” ]; then num=$1 else num=7 fi
generate() { # Take 1 block from /dev/urandom, encode it base64, # remove first two and last status line, purge capital letters and # special characters from output, cut desired length from front # sed with [A-Z] doesn’t work with Suse - typical! password=$(dd if=/dev/urandom count=1 2>/dev/null | uuencode -m - \ | head -n 2 | tail -n 1 | sed -e ’s:[/+A-Z]::g’ | cut -c -$num) }
# Repeat until letters AND digits occur while true; do generate if echo $password | grep [a-z] | grep [0-9]; then break; fi done
Wednesday, September 27. 2006
I had so many problems using DVD-RAM on Linux. I formatted them as ext2 and mounted the device /dev/sr0 directly, and wondered why there were so many SCSI-errors. I retried formatting as UDF, but this wasn’t better either. With UDF, the writing process didn’t even finish overnight!
I finally found out what the problem was: I should have used Packet Writing. With this, and together with UDF and certain mount options, it finally worked, thanks to a (German) Linux DVD-RAM HOWTO.
In short: Load the pktcdvd kernel module (or compile support into your kernel). Then issue the pktsetup command as told in the HOWTO (or have a corresponding init-script do it). Format (or keep, if you just bought it) your DVD-RAM as UDF; the UDF revision is only important if you want to share the disk with old operating systems (such as Win2k). Then mount your disk using the options rw,noatime,async,users. I had to switch from kernel 2.6.15 to 2.6.17, as otherwise I got a pktcdvd: Wrong disc profile (0) error in the syslog. With 2.6.15, it only worked mounting read-only, and remounting ( -o remount,rw) as read-write.
Wednesday, September 6. 2006
For my mathematical Master’s thesis, I already downloaded and printed out some research papers—and that term already refers to the material it is printed on: To save paper, I like to print them out fitting two pages on one. To achieve this, I create a separate postscript document with the desired layout. I don’t want my printer to do that calculations, as it is not that flexible.
psutils is the package of choice for manipulating Postscript documents. It contains the command pstops to convert—literally—Postscript to Postscript. The standard version of fitting two pages on one is:
pstops ‘2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)’ infile.ps outfile.ps
This arrangement is exact. You might find the font size a bit too small, and the white margins offer you to have the text enlarged a bit. My modified version, which reduces whitespace and enlarges the text by 20%, is:
pstops ‘2:0L@.85(23.85cm,-1.5cm)+1L@.85(23.85cm,12.5cm)’ infile.ps outfile.ps
I even came over an article, rendered on A4, but only using the area of A5-pages for the text. Every actual A5-page was centered on a single A4-page. So I needed no magnification, but only different shifts:
pstops ‘2:0L(24.075cm,-2.175cm)+1L(24.075cm,10.5cm)’ infile.ps outfile.ps
|