Poor man’s milter-ahead

I have blogged before that the reason that I like MIMEDefang is that it gives the Postmaster a Perl interpreter (a programming language that is) and a library of functions that can be used to filter and manipulate incoming and outgoing email.

Of the functions available I believe that md_check_against_smtp_server() deserves special mention since it can be used to quickly implement a poor man’s milter-ahead or milter-sender. Of course milter-ahead implements many features (caching among others), but with some effort most (if not all) of the functionality can be implemented withing mimedefang-filter.

Then again, milter-ahead does not cost much (€90) even for small organizations, so the not invented here syndrome can be supressed.

twitterless for a week

Last week I went mostly twitterless. I meant to do so ever since I had read Tom Limoncelli’s piece. There had been twitterless weekends but hey the stream that I am following is small enough to read on a Monday morning.

This time it was a little over a week: 8 days. And you know what? I did not miss it. Twitter bankruptcy is like INBOX bankruptcy without feeling any regret. For if I missed a good tweet or link to information I am sure it will pop up again sometime in the near future.

GReaderless for a week

Google Reader is showing 1000+ items waiting to be dealt with. Yet I do not feel ready to declare GReader bankruptcy even though most of the unread stuff comes from the Theory of Computing Blog Aggregator (and most stuff from it comes from the arXiv). It seems that I view my RSS feeds more like email.

Update 2012/12/05: I press “mark all as read” with no regret.

No FriendFeed for a week

I use my FriendFeed account mostly for interconnecting my twitter account, my blog and the items that I share through Google Reader. Nothing to worry about then.

Update 2012/12/05: FriendFeed?

clickomania

Clickomania, ο απόλυτος χρονοφάγος. Για χρόνια έπαιζα μια εκδοχή του παιχνιδιού που έτρεχε σαν Java Applet κάπου στο Brown (εάν τη θυμάται κανείς, ας μου στείλει το (πεθαμένο) URL). Όμοια και η εκδοχή του που περιλαμβάνεται στο Axim X3 με έχει συντροφέψει σε πάμπολλες διαδρομές με το λεωφορείο. Ψάχνοντας μετά από καιρό το site του παιχνιδιού, είδα πως έχει και Ελληνική μετάφραση.

Μην το παίξετε. Έχετε προειδοποιηθεί.

The Gosling Tarpit

I think Panagiotis is going to love this:

“because the Java programming language and Java Virtual Machine are (surprise!) so tightlyCoupled, new language designers are compelled to make their languages such that they use only those features they can implement efficiently on the JVM. For example, implementations of Scheme for the JVM either lack call/cc or have a very slow and slightly buggy implementation of it. We call this the Gosling Tarpit.”

From Phosphorous, The Popular Lisp.

[via]

Warren’s Abstract Machine: A Tutorial Reconstruction

Hassan Aït-Kaci has written the excellent tutorial on the WAM entitled Warren’s Abstract Machine: A Tutorial Reconstruction. This book is out of print (I consider myself one of the lucky ones to have purchased a copy). For years it was available at vanx.org, but now the domain seems parked.

I had downloaded a copy of the files, and now the electronic version of the book has a new home at: http://wambook.sourceforge.net

Update 2013/04/13: Also available on https://github.com/a-yiorgos/wambook

Exceptions

Usually a system manager proposes a policy, gets approval from higher management (a written one if lucky enough, or if compliance with standards is needed) and proceeds to implement it.

Then it begins:

The manager must enforce the policy, with one exception. Then another and another. And later an exception of the form: Deny access to this resource, except from these people, with the exception of these circumstances and provided that the stars are in the right angles. Or in order to give a real life (pseudo)example:

You use a DNSBL. A certain host is included and there are valid reasons for this. But you need to unblock this host because someone with authority asks you to. However, the hard reality forces you not only to implement the exception, but also an exception to the exception (unblock this host for certain recipients, who do not want certain senders from this host, etc).

In this process nobody tries to understand the very root cause of the problem: Are we correct in using the particular DNSBL? And if we are, is there a valid reason for the sending host to be (black)listed? And if there is, is it wise to implement a series of exceptions, or is it better to wait for the host’s administrators solve the problem?

A great number of people seem to misunderstand the robustness principle: “Be liberal in what you accept; be conservative in what you send” (they stick to the “accept” part) and I think we need to rephrase it:

If you want me to be liberal in what I accept, be conservative in what you send

A policy ruled by exceptions is not an exceptional policy.

Asking the security team for a firewall exception.

reboot before dist-upgrade

[ Παρόλο το debianism του τίτλου, αυτό είναι ένα γενικότερο post ]

Πριν από δραστικές αλλαγές στο λειτουργικό σύστημα ενός server, καλό είναι να γίνεται ένα reboot. Ειδικά εάν έχουν περάσει αρκετές ημέρες (μήνες, χρόνια) από το προηγούμενο reboot. Οι εξαρτήσεις στο πολύπλοκο περιβάλλον που ζουν οι servers φτάνουν σε σημεία που δεν μπορούμε να ελένξουμε ή δεν θυμόμαστε πάντα από μνήμης (Documentation; Τι είναι αυτό;).

Για αυτό ένα reboot πριν μια θεμελιώδη αλλαγή επιβάλλεται. Downtime is an option, αρκεί να μπορούμε να έχουμε μια ιδέα τι το προκάλεσε. Μετά π.χ. από ένα dist-upgrade από Etch σε Lenny, δεν είναι σίγουρο πως θα μπορεί να εντοπιστεί το πιθανό πρόβλημα στην αναβάθμιση του software ή σε μια άλλη εξάρτηση που έχει προστεθεί στην πορεία και δεν μας περνάει από το μυαλό.

Αλλάζουμε μία μεταβλητή (από όσες ελέγχουμε) τη φορά και θυμόμαστε πως συνήθως εάν ένα ext3 filesystem δεν έχει γίνει fsck για περισσότερες από 30 μέρες, θα κάνει fsck στο επόμενο reboot. Είσαι σίγουρος πως αυτό θέλεις να είναι το reboot του dist-upgrade;

Fear of rebooting.

tee.gr & teemail.gr downtime

Υπάρχει ανακοίνωση στην πρώτη σελίδα εδώ και μέρες, στείλαμε και email σε όλο τον κόσμο, αλλά για το φόβο του Murphy το βαζω και εδώ:

Σας ενημερώνουμε ότι την Τετάρτη 10 Ιουνίου 2009 από τις 09:00 μέχρι τις 16:00 θα διακόπτονται σταδιακά οι υπηρεσίες της ΤΠ/ΤΕΕ, λόγω απαραίτητων ηλεκτρολογικών εργασιών.

Στις υπηρεσίες που θα επηρεαστούν περιλαμβάνονται:

– πρόσβαση στο Διαδίκτυο (Internet) με οποιαδήποτε από τις μεθόδους που προσφέρει η ΤΠ/ΤΕΕ στους συνδρομητές της (dialup και ADSL).
– υπηρεσίες ηλεκτρονικού ταχυδρομείου (@tee.gr, @teemail.gr)
– υπηρεσίες αμοιβών μηχανικών
– το portal του ΤΕΕ, http://www.tee.gr
– λοιπές συνδρομητικές υπηρεσίες της ΤΠ/ΤΕΕ.

Το προσωπικό της ΤΠ/ΤΕΕ θα καταβάλει κάθε δυνατή προσπάθεια προκειμένου ο χρόνος διακοπής να είναι ο ελάχιστος δυνατός.

on AMKA

Συνήθως αποφεύγω να κάνω κρίσεις από μακριά για την δουλειά των άλλων, αλλά η περίπτωση του ΑΜΚΑ είναι μία εξαίρεση. Μου γεννιόνται απορίες και ελπίζω να τις διαβάσει κάποιος και να μας διαφωτίσει. Αρχικά υπήρχε η παρατήρηση του Stazybo Horn πως τα πρώτα ψηφία του ΑΜΚΑ αποτελούνται από την ημερομηνία γέννησης του ασφαλισμένου. Μου φάνηκε περίεργο, αλλά δεν έδωσα ιδιαίτερη σημασία. Μέχρι που σήμερα η γυναίκα μου κάνοντας ένα paper mining, βρήκε τη δικιά της κάρτα με τον ΑΜΚΑ της, καθώς και το χαρτί που συνόδευε την κάρτα. Διαβάζει λοιπόν κανείς στο πίσω μέρος του χαρτιού:

Ελέγξετε την ημερομηνία γέννησης και το φύλο, που περιέχονται στον Α.Μ.Κ.Α., σύμφωνα με το παρακάτω παράδειγμα.

Έστω ότι ο Α.Μ.Κ.Α. είναι ο 270163 0012 5

  • Οι πρώτοι έξι (6) αριθμοί είναι η ημερομηνία γέννησης (27 Ιανουαρίου 1963).
  • Από τους επόμενους τέσσερις αριθμούς (0012) ο τελευταίος (δηλ. το 2) δηλώνει το φύλο και στη συγκεκριμένη περίπτωση πρόκειται για γυναίκα. Γιατί οι ζυγοί αριθμοί 0,2,4,6,8 δίδονται στις γυναίκες ενώ οι μονοί 1,3,5,7,9 δίδονται στους άνδρες.
  • Ο τελευταίος αριθμός (5) αφορά τη μηχανογράφηση και επομένως δεν ελέγχεται από εσάς.

 

Ερωτήματα:

  1. Η ασφαλισμένη γεννήθηκε στις 26/01/63. Y2K anyone; Η δικιά μου κάρτα έφτασε ~5 χρόνια πριν. Ξεχάστηκε τόσο γρήγορα; Τι θα γίνει εάν κάποιο νεογέννητο βρεθεί με το ΑΜΚΑ κάποιου υπεραιωνόβιου;
  2. 80 bits (ναι 80, όχι 88, θα το δούμε μετά) για να περιγραφεί ο ασφαλισμένος με μοναδικό τρόπο; Τη στιγμή που αρκούν 33 bits για να χαρακτηρίσουν μοναδικά όποιον ζει αυτή τη στιγμή στον πλανήτη;
  3. Δεν ξέρω πως είναι οργανωμένη η βάση του ΑΜΚΑ, καταλαβαίνω όμως πως ο ΑΜΚΑ είναι πρωτεύον κλειδί (ή χρησιμοποιείται ως τέτοιο). Είναι δυνατό να κάνει κανείς πράξεις στο πρωτεύον κλειδί για να εξάγει συμπεράσματα για τον ασφαλισμένο; Και εάν δεν κάνει τον υπολογισμό επί του κλειδιού αυτού, ξανασώζει την ίδια πληροφορία σε χωριστό πεδίο; Και όχι μόνο αυτό, αλλά η πληροφορία αυτή να είναι substring μήκους 6 bytes μέσα σε άλλο string, ενώ θα μπορούσε να είναι 4 bytes (ένας integer); Update: Χρόνια μετά υποψιάζομαι πως ο λόγος που ο ΑΜΚΑ έχει αυτή τη μορφή είναι για να τον θυμάται εύκολα ο ασφαλισμένος. Και τον δικό του και των παιδιών του.
  4. Το αυτό και για το φύλο του ασφαλισμένου. Γιατί πρέπει να είναι κομάτι του ΑΜΚΑ αυτό;
  5. Τι εξυπηρετούν τα 3 bytes για τα οποία δεν υπάρχει εξήγηση;
  6. Το 11ο byte (αυτό που αφορά τη μηχανογράφηση) είναι μάλλον κάποιο check digit.

This smells a lot like COBOL.

– Που πάνε οι ΑΜΚΑ όταν πεθαίνουν μπαμπά;