betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

Entries : Category [ mac ]
Macintosh computers are some of the betabugs preferred tools. Sometimes something comes out of it, this category is a container for such knowledge.
[digital]  [language]  [life]  [security]  [media]  [zope]  [tourism]  [limnos]  [mac]  [athens]  [travel]  [montage]  [food]  [fire]  [zwiki]  [schnipsel]  [music]  [culture]  [shellfun]  [photography]  [hiking]  [pyramid]  [politics]  [bicycle]  [naxos]  [swim] 

19 October 2005

Switching to reject_rbl_client on Postfix / Mac OS X Server

Messing with the config file

On a Mac OS X Server 10.3 machine, the config file was having lots of warnings:

postfix/smtpd[5270]: warning: 
restriction reject_maps_rbl is going away. 
Please use reject_rbl_client  instead
I was searching up and down on the web to find out what exactly would be the right way to get rid of the warning. The problem is that I did not find where Mac OS X server stores the records from the GUI "Server Admin", so I could not "automatically" include them. (BTW: #postfix on freenode won the price for this weeks most unhelpfull irc channel this month, a well formulated question with a lot of background info and it gets ignored like it's a metaquestion from a known lamer? Go back to talking about beer, #postfix.) Read on for the solution...


Now I have the blacklist servers only in the /etc/postfix/main.cf file. The line in the main.cf file was:

smtpd_client_restrictions = 
    reject_maps_rbl,hash:/etc/postfix/smtpdreject
And now it is:
smtpd_client_restrictions =
    permit_sasl_authenticated,
    reject_rbl_client sbl-xbl.spamhaus.org,
    reject_rbl_client bl.spamcop.net,
    hash:/etc/postfix/smtpdreject
permit_sasl_authenticated was needed, because without that clients who wanted to relay using SMTP AUTH were denied too, based on some blacklist. On another note, to wrap lines in postfix config files you add whitespace on the start of the line, it's not using the common format of escaping the line break with \. Generally I think postfix configs are not better than sendmails, you still have to dig through a lot of weirdly named keywords to find the one that does what you want.

Posted by betabug at 15:33 | Comments (0) | Trackbacks (0)
02 November 2005

Checking System Activity on Mac OS X on the Command Line

Logging into server, no GUI, see?
 

So I'm logging into a Mac OS X machine (Server or not) remotely by ssh to do some maintenance and check on the health of the system. What I might be interested in is how CPU, memory and disk usage is coping with the jobs the server has to do. If I was sitting in front of the machine I could open "Activity Monitor" and click my way through the GUI. Not an option for this machine, since there is no GUI level remote access. So what do I do? There are some command line tools to give me the information I need, let me show you top, vm_stat and iostat...


On my OpenBSD box "systat vmstat" is what I use for a full overview. That is not available for OS X, but some other tools are there. Most often used is "top", followed by "vm_stat" and "iostat".

top

"top" is well known and you likely have heard about it and probably used it before. The version on OS X is quite useable. After switching to "compatibility mode" (with 'x'), one can see only the processes of a single user (with 'U' and entering the user id or name). Top is good for checking what eats all the CPU time.

vm_stat

If it comes to memory usage, especially for the question "how much swap space am I using", then vm_stat can help. On Mac OS X that's vm_stat with an underscore, not vmstat. You just give vm_stat a delay in seconds (by calling it like "vm_stat 10" on the command line) and it updates the display repeatedly. Go on, try that out and then open a bunch of applications to see if pageouts are going up (which would mean that your machine has to page memory out on disk to make room for the new ones).

$ vm_stat 5
Mach Virtual Memory Statistics: (page size of 4096 bytes, cache hits 58%)
  free active inac wire   faults     copy zerofill reactive  pageins pageout
 49314  97619 154001 26746 42361341   320895 24148787   145786    50308 3459
 49341  97814 153974 26551     2902       21     1429        0        0 0
 45297  98409 157246 26728    12056      805     5639        0      272 0
 40400 101288 158727 27265    14663      841     6746        0     1261 0
 36365 103524 160004 27787     8302      712     3519        0     1630 0
...looks like my workstation is OK, even with starting up Acrobat Reader and a bunch of smaller programs at once.

iostat

It took me longer to discover iostat. The man page says that "Iostat displays kernel I/O statistics on terminal, device and cpu operations." Which is quite a lot and probably more than I usually want. I just use it with a line like:

iostat -d -K -w 5
to show me only devices (-d), kilobytes instead of blocks (-K), and have a wait interval of 5 seconds (-w 5). Go ahead, try it and watch it while doing a find for "foobar" on your disks. As usual with all command line tools, read the fine man pages.
$ iostat -d -K -w 5
          disk0
  KB/t tps  MB/s
 16.90   1  0.01
 31.79 131  4.07
 32.00 752 23.51
 32.00  35  1.10
  4.00   1  0.00
  0.00   0  0.00
^C
Finding all files that start with "pimp" on my single disk got the activity up a bit, then I stopped it with control-C. The display shows me Kilobytes per transfer, transfers per second, and Megabytes per second. Interpretation is of course up to you not to the tool :-). Playing with the -I switch might be interesting.

Posted by betabug at 13:20 | Comments (0) | Trackbacks (0)
06 November 2005

HelMUG Server Upgrade

In Thessaloniki on the road

Yesterday morning I went to Thessaloniki by train, along with libero and meLiS from HelMUG. Over here we are rebuilding HelMUGs server. Which is down since yesterday afternoon. Right now we are hard at work in the internet cafe "Blue Screens".


Posted by betabug at 10:00 | Comments (0) | Trackbacks (0)
18 November 2005

New HelMUG Website Online

Congratulations stefbystef, topgan1, and all helpers!
 

Today around 17:30 local Greek time, at the occasion of the COMDEX, the new website of the Greek Mac User Group HelMUG is being launched to the public. This is no small feat for a user group that relies entirely on volunteers to do the job. A big "ευχαριστώ" goes out to stefbystef, topgan1, and all other helpers! Congratulations, you are great!


Posted by betabug at 16:29 | Comments (0) | Trackbacks (0)
19 November 2005

HelMUG @ COMDEX

Lots of people here
 

I'm at the stand of HelMUG at the Athens COMDEX 2005 computer fair. After a short walk through the halls I'm sitting here now. The exhibition is not so special. Best of all was the booth of the telecommunications museum. Pictures and details later. Right when I came in, I was asked to help out with some club stuff. Some people I know are here, so it's fun.


Posted by betabug at 17:40 | Comments (0) | Trackbacks (0)
20 November 2005

Saturday Club Life

HelMUG at COMDEX, 2CV Club Party
HelMUG booth at COMDEX and 1970s video phone

Yesterdays visit at the HelMUG booth at the COMDEX turned into a small hacking project. But I managed to take some pictures (click on the preview for a bigger image). The smallish insert is a 1970s video phone from the booth of the telecommunications museum, absolute highlight of the exhibition. In the big picture there are a couple of its modern cousins: Plenty of Apples iSight cameras at the HelMUG booth. HelMUG webmaster stefbystef even presented the new HelMUG website over a video iChat connection. I came home pretty late from COMDEX, but not late enough to miss the party of the Greek 2CV club.

The HelMUG mini hack: I managed to write a small script to change the password of a lot of imported user accounts at once. Started out with a small expect script (found on the web, but easy to do yourself) to script /usr/bin/passwd. Then changed that a bit to our needs. Finally hooked it up with a small shell script to run on a text file with username and password on each line. The reason I used a shell script for the second task is that I don't use expect very often, and I did not want to mess up a task like this. But I love expect, even though I'm a python programmer, the tcl grammar is very cool and each time I use expect (which is based on tcl) it makes me whish I had more chance to play with it.

Then came the 2CV party: Last year I went on an excursion with the 2CV fans. So I knew some of them. At the party there were also a lot of unknown faces, since everybody had brought their friends. I enjoyed it nonetheless, good music, drinks, good people, and a very nice place. The clubs hangout is a very stylish neoclassical flat. Even at the party I could not miss my geekness. I went and fixed their 'puter. Installed a spam filter and adaware. But the poor machine is loaded with adware and spyware, so I'm not sure that will be enough. Actually it would be worth to install OpenBSD with Firefox and matching mail client, as I don't think the machine is being used for anything besides mail, web, and looking at an image CD sometime.


Posted by betabug at 15:40 | Comments (0) | Trackbacks (0)
02 December 2005

First Time Takeaway Macs in Greece

Big news I almost overlooked
 

The last few days news reached me from a few sides about Macs being sold through new channels here. First there was a post about Mediamarkt (a german electronics chain that just arrived in Greece) carrying the i*-range of Macs. Then meLiS posted at HelMUG again about fnac (a french bookstore and electronics outlet that too just arrived in Greece) carrying the same range of Macintosh computers.

And then my boss sent me a MMS with a pic of some white Macs at display. Apparently Multirama (a subsidiary of the greek electronics store Germanos) is carrying iMacs, iBooks, and Mac minis too now. Their website has no info about that though. Great news, but somehow I thought, what's the big deal? They sell Macs, so what.

The point that gets everybody excited is that like the first time you can walk into a store here in Athens, look at Macs on display, buy a Macintosh and walk out with the box. Not just order it and wait till the cows come home. Not having to supply photocopies of ID documents. It also gives a lot more exposure to Macs in a country where you had to be an insider to know where the Mac dealers were. That is what makes people say "oh". Buying a Mac in Greece just got a lot easier.


Posted by betabug at 08:53 | Comments (1) | Trackbacks (0)
13 December 2005

Where Does That New iChat Window Go?

The small nuisances of iWorking
 

Can anyone please explain to me how iChat calculates where it opens new chat windows? It's a major mess for me. I'm sitting here, trying to work with a Firefox window, a Safari window, 3 to 5 Terminal.app windows and... iChat. We use iChat via Bonjour (née Rendezvous [1]) to communicate inhouse. But everytime I open a new chat window it will open somewhere, anywhere on my big screen. I've chatted with that same person 5 minutes ago, why can't the window position be remembered? It messes up my workarea.

From what I see windows are just placed quasi random around, more or less a few pixels to the right and down from where iChat last opened a window. Not in any relation to where I last placed a window.

[1] Having to rename an already rolled out product is not fun. Not even when it's for trademark reasons and the company itself is big time int he trademark game. They should have asked me, I'd have suggested "Καλημέρα" (Kalimera), which nobody would have understood and thus they couldn't have been sued.


Posted by betabug at 13:22 | Comments (2) | Trackbacks (0)
31 December 2005

Greek in vim with langmap - only ISO-8859-7

Still not there yet for UTF-8

In a comment to my old post about State of Greek and UTF-8 in the Mac OS X Terminal Andreas Triantafillidis asks if I finally managed to use vim with Greek. Answer: The state is still somehow the same. Using a vim with multilingual capabilities compiled in, I can read and write in Greek, but not as good as I want, because mapping of keyboard commands does not work with Unicode, but read on for what I got with ISO-8859-7...


Tassos Pavlakos (in another comment to that post) had suggested vim's langmap command, which is the right tool for the job. But typing :help langmap in vim gives us the following information:

This only works for 8-bit characters. The value of 'langmap' may be specified with multi-byte characters (e.g., UTF-8), but only the lower 8 bits of each character will be used.
This maps right with my experience. Trying to use the langmap feature with Greek in UTF-8 will leave vim just beeping at you.

So today I tried a small experiment. The Mac OS X Terminal.app does not offer ISO-8859-7 in its list of default encodings (and at least for Mac OS X 10.3 there is no way to change that list through the GUI). So I tweaked the rules a bit to see if I could get it to work, here are the steps I took:

So, what does that show us? With a bit of quirky hacking and the right version / compilation settings of vim, we can read and write unhindered in Greek, as long as it's ISO-8859-7 Greek. Which is kind of funny, since vim claims to be UTF-8 internally. But I guess that's just the way the langmap command and it's underlying architecture are implemented. If the terminal software you use supports ISO-8859-7 it's not even that difficult to try it out (I don't know about Linux/BSD terminal apps, my trials are on the Mac). I don't think I will like it though, since I believe the time for the ISO encodings is over, I became a Unicode believer. Last remark: This is vim 6.1, once I'm back on the net I will check out if anything has changed in newer versions.

Posted by betabug at 13:57 | Comments (1) | Trackbacks (0)
18 January 2006

OS X on Intel... Any Intel

What now?
 

Apparently the new Mac OS X for Intel, really intended for the new Intel processor based Macs, is being run on "any brand" PC hardware. There is a mention on Wired News called Mac Hacks Allow OS X on PCs. And right now I got asked a support question on irc from someone playing around with it. (Yes, this implies that the person is actually using it, it's running.)

What will be the implications of this? For the high income countries I think Apple will loose only very few sales because of this. It's just not the same as buying supported hardware and software. But the lower the incomes go, the higher the chances that lousy hardware will replace Apple stuff and rippoff copies will replace original software CDs. It's a showing sign that a page for the necessary patches to get this going is in Russia.

Personally, if I was to own hardware with Intel processors (appart from Apple stuff), I would choose to run with OpenBSD. But even for Apple hardware, for my own, personal taste, Intel processors are just so un-sexy. I think this whole development is just sad, another part of diversity going down the drain.


Posted by betabug at 10:56 | Comments (0) | Trackbacks (1)
19 January 2006

Generalversammlung verschoben

Wahlen zum HelMUG Vorstand, Athener Treffen am Freitag
 

Letzten Sonntag wäre eigentlich die Generalversammlung des Vereins der griechischen Mac-User gewesen. Am Abend vorher erreichte mich noch ein Mail, dass die Wahlen verschoben werden, weil nicht genug Bewerber für die Vorstandsplätze da waren. Es wäre jetzt natürlich einfach, witzige Bemerkungen über die chaotischen Griechen zu machen. Doch ich weiss aus eigener Erfahrung, dass es nicht so einfach ist, einen Verein am laufen zu halten, noch dazu einen mit vielen Mitgliedern und mit grossen geographischen Distanzen. Letztes Jahr waren die Wahlen in Larissa, dieses Jahr sollten sie in Athen sein, doch speziell die Leute aus Thessaloniki waren wohl von der Ortswahl nicht begeistert.

Mehr von den Hintergründen könnte ich am Freitag abend erfahren. In Athen gibt es nämlich ein Treffen mit (wie üblich) lockerem Zusammensitzen, 20. Januar, um 19 Uhr, Shoppingcenter "The Mall" (mit der Metro ΗΣΑΠ - ISAP einfach zu erreichen), im 3. Stock, das Lokal heisst glaube ich B-Tween.

Ich bin kein grosser Fan von "The Mall", der Monster-Shopping-Palast ist mir einfach zu Seelenlos. Ich denke das Treffen ist dort, weil man dann gleich Ortstermin bei einigen Läden machen kann, die dort Macs verkaufen: Besonders die französische Buch- und Medienkette fnac ist hier aufgefallen, aber auch MultiRama verkauft Macs und ist dort. Ob ich hingehe weiss ich noch nicht, im Moment sind meine Augen von der Arbeit etwas übermüdet und so könnte ich etwas Ruhe schätzen. Wenn mich jemand dort treffen will, einfach einen Kommentar machen oder ein Mail schicken, vielleicht ändere ich dann meine Meinung... :-)


Posted by betabug at 21:18 | Comments (0) | Trackbacks (0)
07 February 2006

iCab jetzt mit CSS 2

iCab ist wieder da... Taxi, Taxi!
 

iCab war lange Zeit mein Lieblings-Browser. Zwar nicht Open Source, aber schnell, klein, und unabhänging. Dann kam (endlich) CSS 2 auf das Netz und viele Seiten funktionierten mit iCab zwar noch, sahen aber eher seltsam aus, weil iCab kein richtiges CSS kannte. Irgendwie sah es aus, als ob es mit iCab nicht weiterginge. Das hat sich jetzt geändert. Die "Public Beta 3" von iCab 3 ist da und damit auch die Unterstützung von CSS 2. CSSZenGarden sieht damit aus wie es soll (nämlich geschniegelt). "Meine" Applikation (die ich hier unten in Athen entwickle) sieht auf den ersten Blick auch schon aus wie sie soll. Willkommen zurück, iCab!


Posted by betabug at 09:12 | Comments (0) | Trackbacks (0)
11 February 2006

Greek Mac User Sunday

HelMUG meetings in Athens and Thessaloniki

This sunday we will have HelMUG meetings in the two biggest cities of Greece: At 12:00 in Athens (Flocafe Thission), and at 17:00 in the "Clocks" in Thessaloniki. These are relaxed meetings in a Cafeteria, no speeches or presentations, no protocol, just a bunch of people hanging out and talking the Mac talk. Since the weather turned nice again, we will possibly be sitting outside. And since I am in Athens, I will go to Thission. If you are around this sunday and want to pass by, consider yourself invited! The meetings are open to non-members too.

The guys from Thessaloniki plan to do a live streaming of their meeting. To do this we (the admins who look after the HelMUG server) will have to setup the QuickTime Streaming Server. We haven't done this before, so we have some QTSS RTFM to do. If we can pull it off in time, I will post a link here, so stay tuned.


Posted by betabug at 11:08 | Comments (1) | Trackbacks (0)
12 February 2006

Sunshine with HelMUG, Darkness with QTSS

Always an experience
 

So I went to see the HelMUG crowd today. We sat in a Cafeteria in the sun. The sun was nice, but the wind was cold, when we left we were all frozen up. Still it was nice to see them again and talk about Macs and the club. We definitely should find a good location and start making fixed meetings once a month. With all the hype about the phone tapping, it would be a good chance to give an introduction to PGP for example :-) On the way there I took a fitting image... and then we tried to stream the meeting in Thessaloniki to the 'net...


American Embassy in Athens with Vodafone Advertising on Kiosk

The american embassy together with an advertisment for prepaid phone cards from Vodafone (on a kiosk opposite the embassy). This reminded me that I should really give an introduction talk about PGP for HelMUG some day.

In the afternoon I tried together with macgiorgosgr from HelMUG to get the meeting in Thessaloniki to be streamed through the club's QuickTime Streaming Server. The first problem was that the QTSS would not start, neither in Server Admin (the control would always bounce back to "Start Service") nor from the command line (still reported as "STOPPED"). Noticing the processes in the pid file still running and looking at the error log file, it seemed that the admin interface thought the service is down, while the processes were either running or stuck. I shot down the processes and then the QTSS started. That way I managed from home to grab one of the sample movies off the server.

But the .sdp file that holds the connection information to stream from the onsite cam would not stream. Accessing it, QuickTime Player reported a 404 Not Found error. While kicking around with the server, trying to get this going, we also ran into the problem that we could access the QTSS admin webinterface, but could not get past the login screen, the password I had configured just wasn't accepted. Sometimes it's just all at once. When we noticed that one possible problem point was the locations router likely not letting the incoming traffic through, we gave up. That was a pitty, since there were lots of people there, I would have liked a look at the party action.

Posted by betabug at 19:05 | Comments (0) | Trackbacks (0)
13 February 2006

cyradm Cheatsheet for Mac OS X Server

One of those "note to self" posts
 

I rarely have to do stuff on Mac OS X Servers with cyradm (the cyrus imap server administration tool). That's why I always have to look the stuff up. Here is a little cheatsheet for some of the commands I have used so far...


So far most BOFH tasks I had to do where related to problems with deleting mails from overfull mailboxes through the webmail interface. Given the right amount of (in well adjusted proportions) whining, authentification, reasoning, authorization, kharma, and overall asking and being a nice person, I can be convinced to do stuff on the servers in question (no names). Here is what I use (hints for improvements welcome). I noticed that the sample chapter from O'Reilly's Managing IMAP - Cyrus System Adminnistration is a good guide, but for users on OS X Server I had to adjust some stuff, notably the user paths. Dunno why, I'm in no way a cyrus expert.

logging in:

/usr/bin/cyrus/admin/cyradm -user adminusername localhost

Yes, even that is causing a search through the docs sometimes :-) Note that it prompts for the password of that user account. The user should be listed in /etc/imapd.conf on a line like:

admins: admin1 anotheradmin luserwhoisadminbyerror

list quota:

lq 'Other Users/username'

On Mac OS X Server 10.4 I found the users not like 'users.betabug', but always in this form. Dunno what that means, if you know, please enlighten me.

delete a mailbox:

And recreate it empty. Note that I give the adminuser all the rights, contrary to the O'Reilly book that gives only 'd'. A big hammer, but with only d it did not let me delete (maybe child mailboxes settings? -- update: according to the man page 'c' would have been what I needed). After the re-creation of the mailbox, the admins extra acl rights are gone, so all is well.

setaclmailbox 'Other Users/username' adminusername lrswipcda
deletemailbox 'Other Users/username'
createmailbox 'Other Users/username'

List a mailboxes access rights

listacl 'Other Users/username'

Don't blame me if you shoot yourself in the foot, better read the manual and the documentation yourself, like a good BOFH should.

Posted by betabug at 12:58 | Comments (2) | Trackbacks (0)
28 February 2006

Wiggle Wireless

No contact, no Airport
 

Looks like my good old PowerBook is finally falling appart. I can connect to the Wifi network at home, but only when I screw open the PowerBook and wiggle the connection to the airport card just right. The Titanium PowerBook (a 550Mhz in my case) was never well known for good wifi connections. But my Ti is now 4 years old, I have carried it halfway across Europe and on daily commute back in Switzerland. The material wear is just showing, the Airport antenna connection seems to be on the definitive way out too now (the connection to the screen is already halfway gone)...


Today after I came home (see pic in the last post for the current weather in Athens) instead of relaxing I tried one more time to fix the wifi. I unscrewed the PB using my good old cybertool (swiss army knife, what we swiss call a "swiss *pocket* knife"), which has just the right torx screwdriver. In closed state the reception is down to zero, when I open it up and operate it upside down the reception is perfect. Sometimes it needs a little wiggle even then.

I can operate it open and upright too, but only when I push on the connector to the airport card. Attempts to fix the connector in place and reassemble the 'Book did not lead to success. So, hints and ideas welcome. One of those external antennas would likely do the trick, but it's not that they are easily available in Greece. Another trick would be to find a hardware hacker to fit a pigtail to hook up an antenna, even self built.

Posted by betabug at 22:42 | Comments (0) | Trackbacks (0)
Prev  1   [2]   3   4   5   Next